Hello happy switchers just a simple question :
i use the API to create and track a job.
How to attach metadatas with the API and retrieve it (always with the API) further in the process when the job is arrived in a checkpoint ?
The best solution would be to retrieve the metadata infos directly with the "Jobs - List" API operation.
Thank you for your help.
API question
Re: API question
With the Client Module you can access those functions over the Switch Rest API.
You can also do some magic with the HTTP Request tool and the WebHook tool
And if you have the Scripting module there is no limits on integration
You can also do some magic with the HTTP Request tool and the WebHook tool
And if you have the Scripting module there is no limits on integration
Re: API question
From the documentation you can see it does not work like that. The Jobs - List call returns an object and in the data field there is an array of objects for all the jobs you have access to. Each job object has a metadata field which is either true or false. So you have to loop over that array, check if the job has a checkpointId value (which means the job is in a checkpoint) and if the metadata field is true, then do another call to Jobs - Metadata to get the metadata fields.The best solution would be to retrieve the metadata infos directly with the "Jobs - List" API operation
Re: API question
Thank you for the feedback.
more than metadata I wanted to talk about private data, submit via the API on a submitPoint.
Data that I would like to retrieve later in my process with another API call on the job
more than metadata I wanted to talk about private data, submit via the API on a submitPoint.
Data that I would like to retrieve later in my process with another API call on the job
Re: API question
If you want to take over the checkpoint functionality and send the job to an outgoing connection of your choice and at the same time add private data, you can consider an alternative approach. Instead of using a checkpoint you use the "Remote process" element and you communicate with it using the Remote Processing API:
https://www.enfocus.com/manuals/Develop ... index.html
In the remote process that Switch calls you can do what you want and send a result back.
Note, however, that a remote process element blocks a processing channel until the remote process sends a result back. In other words, if your remote process does not immediately do something but it holds the job until a user does something you are quickly going to run out of processing channels and your Switch Server will virtually stop processing.
https://www.enfocus.com/manuals/Develop ... index.html
In the remote process that Switch calls you can do what you want and send a result back.
Note, however, that a remote process element blocks a processing channel until the remote process sends a result back. In other words, if your remote process does not immediately do something but it holds the job until a user does something you are quickly going to run out of processing channels and your Switch Server will virtually stop processing.
Re: API question
Thank you for the feedback.