This section explain how to use automation REST calls using raw HTTP requests and response - this page is more theory than concrete examples. You can check concrete examples using different HTTP clients to here:
Raw HTTP examples
Here is a complete example on using automation service. This example will do the following:
- get the automation registry
- set a blob on an existing document (let say "/default-domain/workspaces/myws/file") by forcing the server to avoid returning back the blob.
- get the same document with all the data inside (all the schemas)
- download the content of the blob we set at step 2. (and using the information available in the document retrieved at step 3.)
1. Get the automation registry
2. Upload a blob into a File document: "/default-domain/workspaces/myws/file"
See the X-NXVoidOperation header to avoid the blob being returned by the server.
3. Get the document data where we uploaded the blob
(see X-NXDocumentProperties header used to specify that all the document data (schemas) should be returned)
4. Download the content of the blob we set at step 2.
You notice in the last result that the documents contains our blob and the "data" property points to a relative URL that can be used to download the blob content.
Let's download it: