General API requests¶
In this section, general requests are listed:
Auth Token¶
Description: Provides the access bearer token.
POST /auth/token
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
body |
auth_type |
The authentication type used for obtaining the token. It can be ‘client-secret’ or ‘client-jwt’. |
str |
body |
clientId |
The client ID of the REST API user to perform authentication. |
str |
body |
clientSecret |
The REST API user’s client secret. It is mandatory if the auth_type is ‘client-secret’. |
str |
body |
signedJWT |
The REST API user’s signed JWT. It is mandatory if the auth_type is client-jwt’. |
str |
Response
The response schema for this specific request is:
{
"access_token": "<access_token>",
"expires_in": 600,
"refresh_expires_in": 1800,
"refresh_token": "<refresh_token>",
"token_type": "Bearer",
"id_token": "<id_token>",
"not-before-policy": 0,
"session_state": "14a918b4-0ad6-4329-afcc-077e119905ff",
"scope": "openid email profile"
}
Get Resource ID¶
Description: Returns the ID of the resource identified with the path {resourcePath}
and the type {resourceType}
.
GET /resource/get/ResourceId
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
querystring |
resourcePath |
The path of the resource. |
str |
querystring |
resourceType |
The type of the source whose ID will be retrieved. |
str |
Response
The response schema for this specific request follows standard exposed in api response section. An example response is:
{
"status": "completed",
"code": 0,
"data": "c4ff0035-4a1b-4270-9821-66cc8b8cbf9e",
"desc": "",
"status_code": 200,
"topic": "resource/Get/ResourceId"
}
Get Resource Path¶
Description: Returns the path of the resource identified with the ID {resourceID}
.
GET /resource/get/resourcepath
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
querystring |
resourceId |
The ID of the considered resource. See Get Resource ID for more details on how to retrieve IDs. |
str |
querystring |
onlyEnv |
if |
bool |
Response
The response schema for this specific request follows standard exposed in api response section. An example response is:
{
"status": "completed",
"code": 0,
"data": [
"/",
"rulex",
"Env_cm",
"API_Flow"
],
"desc": "",
"status_code": 200,
"topic": "resource/Get/ResourcePath"
}
Set Working Area Settings¶
Description: Changes the working area settings for the recipient {recipient} of Rulex Platform.
POST /{recipient}/set/workingareasettings
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
body |
settings |
The settings for the working area of the selected recipient. Settings should be expressed as a dictionary with this format: .. code-block:: JSON
|
dict |
Response
The response schema for this specific request follows standard exposed in api response section. An example response is:
{
}
Upload File¶
Description: Uploads a file on the filesystem where the Cloud/Server versions are installed in the folder identified by the {folder}.
POST /api/upload/file
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
querystring |
folder |
The location where the file will be saved (‘local’, ‘cache’). |
str |
body |
params |
Automatically deduced information about the location where the file is uploaded. |
dict |
querystring |
relpath |
Relative path to the folder parameter. |
str |
Response
{
}
Get File¶
Description: Downloads a file after an export operation performed on a local filesystem. The path parameter {fileId}
can be a single ID or the concatenation of multiple IDs, separated by a ‘/’.
The ID is returned by the previous export operation. See Export Flow for details.
GET /get/file/{fileId}
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
path |
fileId |
The id of the filesystem where the file will be saved. See Get Resource ID for more details on how to retrieve IDs. |
str |
Response
The response is the downloaded file returned as a body in a Content-Disposition:attachments
.
Get Result¶
Description: Gets the result of the request identified with the ID {reqId}
.
Warning
The results of the request will be kept for two days, after which they will be deleted.
GET /get/result/{reqId}
Parameters
Parameters in bold are mandatory.
Location |
Name |
Description |
Type |
---|---|---|---|
path |
reqId |
The id of the request. See API Structure for more details on how to set or retrieve API unique request ID. |
str |
Response
The responses are the same responses listed in all the other calls, according to the async call executed.