API Responses
API responses are made up of the following:
Headers
The standard headers for responses are as follows:
Header Name | Description |
---|---|
X-Rulex-Request-Id | A 16-character alphanumerical GUID code. This is always present in responses, and can be used by the Get Result call to retrieve the status of an asynchronous call (within 2 days). |
X-Rulex-Response-Timestamp | The response’s timestamp. It is provided in YYYY-MM-DD format, followed by the time (GMT time). |
Content-Type | The type of contents included in the body. Possible values are:
|
Response Status Codes
The main response status codes used in all Rulex APIS are:
200 – success
202 - accepted
230 - warning
500 – error
For other codes not listed here see Microsoft documentation.
Response Body
Not all API responses contain a body:
Responses to GET APIs normally include a body with the requested information
Responses to POST APIs generally do not contain a body.
Sample Response
The following is a sample of a response in cURL to a synchronous API to export a Rulex Flow:
Response ``` 200 X-Rulex-Request-Id: "50325524-80f7-47ef-8fce-a1fcfcda443e" X-Rulex-Response-Timestamp: "2022-07-08T16:36:11.602332Z+02:00" Content-Type: "application/json" { "status": "completed", "progress": "100%", "code": 0, "data": { "file_url": [ "f440f9ce-d5bd-4b23-a82d-e10c03b1062b" ] }, "desc": "" } ```