Skip to main content
Member
Sep 21, 2026 3:57 PM UTC
Solved

REST API 7.2.0 synchronous / asynchronous

Hello OneStream Community,


The REST API documentation indicates that the DataManagement endpoint supports both synchronous and asynchronous execution.
How do we choose between synchronous and asynchronous execution when calling the DataManagement API? Is this determined by the endpoint, a request parameter, or another mechanism?


Thanks in advance for your help.

sameburnAnswer
Employee - Advisor
Sep 28, 2026 12:45 PM UTC

That is correct. 

  • StartExecuteSequenceOrStep starts the job and returns immediately. The body includes TaskActivityID. We then use GetTaskActivityStatus to monitor that ID, as per example.. 
  • ExecuteSequenceOrStep starts the same type of job, then the REST call waits. The call returns only when the job ends.

4 replies

Employee - Advisor
Sep 27, 2026 8:42 AM UTC

Hi ​@RaphaelV 

From memory, the documentation covers both e.g see examples below

DataManagementSequenceV720 (Synchronous)

DataManagementSequenceAsyncV720 (Asynchronous)

Hope this helps clarify

Sam

Employee - Advisor
Sep 28, 2026 9:25 AM UTC

Sorry back at my computer now, so can be more helpful.  The main difference is that we

check that the task has completed successfully by checking TaskActivityStatus

Example below

JsonNode startBody = new JsonObject
{
["SI"] = applicationSi.DeepClone(),
["IsSequence"] = true,
["WorkspaceName"] = workspaceName,
["SequenceOrStepName"] = sequenceName,
["DataManagementGroupName"] = string.Empty,
["CustomSubstVarsAsCommaSeparatedPairs"] = customSubstVars
};

JsonNode started = await PostJsonAsync(
http,
$"{restApiBaseUrl}/api/DataManagement/StartExecuteSequenceOrStep?api-version={apiVersion}",
startBody);

string taskActivityId = started["TaskActivityID"]!.GetValue<string>();

JsonNode status;
do
{
await Task.Delay(TimeSpan.FromSeconds(5));
status = await PostJsonAsync(
http,
$"{restApiBaseUrl}/api/DataManagement/GetTaskActivityStatus?api-version={apiVersion}",
new JsonObject
{
["SI"] = applicationSi.DeepClone(),
["UniqueID"] = taskActivityId
});
}
while (status["IsTaskStillBeingProcessed"]!.GetValue<bool>());

Console.WriteLine(status["TaskActivityStatus"]!.ToJsonString());

 

RaphaelVAuthor
Member
Sep 28, 2026 11:15 AM UTC

Hi Sam, thanks for your reply.

If I understand correctly, StartExecuteSequenceOrStep starts the process asynchronously and returns a TaskActivityID that can be monitored using GetTaskActivityStatus, whereas ExecuteSequence runs synchronously and only returns once the sequence has completed.

Is that correct?

sameburnEmployee - AdvisorAnswer
Employee - Advisor
Sep 28, 2026 12:45 PM UTC

That is correct. 

  • StartExecuteSequenceOrStep starts the job and returns immediately. The body includes TaskActivityID. We then use GetTaskActivityStatus to monitor that ID, as per example.. 
  • ExecuteSequenceOrStep starts the same type of job, then the REST call waits. The call returns only when the job ends.