07-05-2024 11:26 AM
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"}
Solved! Go to Solution.
07-06-2024 08:51 AM - edited 07-06-2024 08:53 AM
@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.
07-05-2024 11:41 AM
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
07-05-2024 11:55 AM
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
07-05-2024 12:35 PM
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?
07-06-2024 08:51 AM - edited 07-06-2024 08:53 AM
@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.