Forum Discussion

RN's avatar
RN
New Contributor
5 months ago

Executing DM Step using RESTAPI

Hi, I'm trying to execute DM Step using Rest API using below URL and Body Text but I'm getting an error with error code 400 and with the message unsupported API version. Can you please let me know what could ne the issue? Thanks for your help!

URL: https://servername/onestreamapi/api/DataManagement/ExecuteStep?api-version=8.2.2

Body Text:; {
"BaseWebServerUrl": [https://servername/onestreamweb],
"ApplicationName":[Consol],
"DataManagementGroupName": [DataCopy],
"StepName": [Test_Copy],
"CustomSubstVarsAsCommaSeparatedPairs": [""l
}

Error Message:

Request Status: 400 Bad Request
Result: Non-200 response code received: 400

URI 'https://servername/onestreamapi/api/DataManagement/ExecuteStep' does not support the API version '8.2.2'.","code":"UnsupportedApiVersion","traceId":"00-a6552d7760a854272b00c71c0b9fc82f-b8030eb56b2b0a75-00"}

 

  • RN if your instance is OS Cloud hosted, you will have to use a hard-coded "Personal Access Token" provided by the OneStream IdentityServer - see page 59 of Identity_and_Access_Management_Guide.pdf

    It appears the design intent of the REST API is automation of processes run by a machine account.  

    REST API comes in two flavors(versions): 5.2.0 and 7.2.0.  5.2.0 is send a request and wait for it to complete, Get.  7.2.0 is more fire and forget, though the docs are not clear when this (asynchronous) topology is used.  I think we can assume DM can be called Asynchronously using Post.

  • tschilling's avatar
    tschilling
    New Contributor III

    It's possible that 8.2.2 is not the right version to use in the API call.  Try 5.2.0 or 7.2.0

    • RN's avatar
      RN
      New Contributor

      Thanks for your quick response. I'm getting the same error when I tried with 7.2.0 but when I tried to with 5.2.0, I'm getting below error.

      Request Status: 401 Unauthorized 

      Result: Non-200 response code received: 401  

       

      • tschilling's avatar
        tschilling
        New Contributor III

        401 response typically means it did not like/accept the token you passed it in the authorization header.  

        Did you create the token request in a prior request?

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    RN if your instance is OS Cloud hosted, you will have to use a hard-coded "Personal Access Token" provided by the OneStream IdentityServer - see page 59 of Identity_and_Access_Management_Guide.pdf

    It appears the design intent of the REST API is automation of processes run by a machine account.  

    REST API comes in two flavors(versions): 5.2.0 and 7.2.0.  5.2.0 is send a request and wait for it to complete, Get.  7.2.0 is more fire and forget, though the docs are not clear when this (asynchronous) topology is used.  I think we can assume DM can be called Asynchronously using Post.