10.X REST API is throwing error while creating thread using CURL or POSTMAN

we are receiving following error wile making the API cal to create thread. 

Exception is as follows:

Parents
  • Our Apis do not support JSON inputs.  You will need to pass it as x-www-form-urlencoded

  • Thanks , post man  gave me success response while change it to  x-www-form-urlencoded. 

    but newly created thread is not visible at UI, is there any approval required form admin UI ?

    Also will you please let me know what wrong in below request. 

    Curl command used:

    curl -X POST \

      https://community2.dynamics-int.com/api.ashx/v2/forums/792/threads/350944.json \

      -H 'Postman-Token: 6f819433-d10b-4863-bc60-4beeb02997bb' \

      -H 'Rest-Method: PUT' \

      -H 'Rest-User-Token: REMOVED' \

      -H 'cache-control: no-cache' \

      -d 'Body=Key%20learnings%20for%20RSAT%20implementation%2C%20including%20best%20practices%20for%20data%20setup%20and%20tips%20%26%20tricks%20for%20creating%20tasks%20recording.%0A%0AOther%20resources%3A%20https%3A%2F%2Fmedius.studios.ms%2Fvideo%2Fasset%2FPPT%2FMBAS19-THR2065%0A%0ASession%20Code%3A%20THR2065%0A%0AProduct%20Category%3A%20Dynamics%20365%0A%0AProduct%3A%20Dynamics%20365%20for%20Finance%20and%20Operations%0A%0ALevel%3A%20Intermediate%20(200)%0A%0APresenter%3A%20Samy%20Sid%20Otmane%0A%0AEDIT%3A%20Checking%20to%20see%20if%20the%20edit%20posts%20successfully!&undefined='

     

    Response:

    {

        "Thread": null,

        "Info": [],

        "Warnings": [],

        "Errors": [

            "An unexpected error prevented your requested action from completing. The error has been logged for the administrator to review."

        ]

    }

  • First..Never Ever Ever Ever Ever Post the user token here :)  I Have removed it.

    This generated an error, you will have to check the  error logs.

    As for it not being visible..it could be moderated or in abuse.  You will have to look and see in the administration area.

  • And I am not sure why you have an 'undefined' parameter

Reply Children
  • Hi

    While Editing a forum thread via API getting error as mentioned below , Please suggest 

  • Receiving following exception

    <?xml version="1.0" encoding="utf-8"?>
    <exceptions generated="2019-07-10T21:18:44.2765781Z" version="10.3.2.7882" product="Telligent Community" machineName="EC2AMAZ-B5BFMCS" operatingSystem="Microsoft Windows NT 10.0.14393.0">
    <exception id="17061447" userAgent="Fiddler" serverName="EC2AMAZ-B5BFMCS" httpPathAndQuery="/api.ashx/v2/forums/792/threads/350946.xml" httpVerb="POST" httpReferrer="" message="Procedure or function te_Content_Content_Update has too many arguments specified." type="UnknownError" ipAddress="172.21.170.245" lastOcurred="2019-07-10T21:18:25.6400000Z" frequency="2">
    System.Data.SqlClient.SqlException (0x80131904): Procedure or function te_Content_Content_Update has too many arguments specified.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at Telligent.Evolution.Data.ContentSqlDataProvider.Update(IContent item)
    at Telligent.Evolution.Api.Content.ContentService.Update(IContent content)
    at Telligent.Evolution.Api.Content.ContentStateChanges.Updated(IContent content)
    at Telligent.Evolution.Forums.Plugins.Content.ForumThreadContentType.Events_AfterUpdate(ForumThreadAfterUpdateEventArgs e)
    at Telligent.Evolution.Components.EventsBase.Execute[T](Object eventObject, Action`1 executor, Boolean throwExceptions)
    ClientConnectionId:d5006f9e-6be9-4179-a580-757d5d7f0d29
    Error Number:8144,State:2,Class:16
    </exception>
    </exceptions>