08-30-2024 02:31 PM
Another system on the network is pushing data into OneStream using a REST API. OneStream has a DataManagement group and a step to absorb this data. Is there a way we can pass back a custom response to the calling system?
Thank You for all your help in advance.
Indu
08-31-2024 07:15 PM - edited 09-02-2024 03:59 AM
If you want to send back an error message, you could wrap your sequence into an Extender rule; on failure, you throw the exception with a message and *I think* this will be returned by the API call. The job will appear as failed though.
If instead you want to return some extra info on success, I think you will need to implement a polling system. One way to do that would be to build a Data Adapter that launches a Dashboard DataSet rule, which will return the necessary info; and then execute that from the endpoint api/DataProvider/GetAdoDataSetForAdapter . This rule will have to be smart enough to figure out when the job is completed (by querying either Task Activity, or Error Log, or the data itself), and return some "in progress" data if it's not. The client will just keep polling GetAdoDataSetForAdapter as long as necessary.
09-02-2024 02:27 PM
Thank You very much. So the external system will make 2 calls to the OneStream API.
One using the Datamanagement Step as it is doing right now and the other will be api/DataProvider/GetAdoDataSetForAdapter to get the extended result from OneStream application.
Am I summarizing it correctly?
Thank You,
Indu
09-02-2024 04:40 PM
yeah