Download OpenAPI specification:Download
Welcome to TheCrossProduct's Web API documentation. Our API is based on REST principles and all requests are made to endpoints beginning with https://api.thecrossproduct.xyz/v1 and JSON objects are returned. All API requests must be made over a secure https connection.
Our API provides access to account and license information, as well as the ability to request runs from TheCrossProduct's solutions.
Some useful links:
Use this endpoint with Basic authentication to acquire a JWT token
There is a limited number of tokens that can simultaneously be active. The default limit is 50. If you need more, please contact us at contact@thecrossproduct.com.
{- "token": "string"
}Use this endpoint to list your personal data and your groups' data.
Use a POST request to filter result.
By default, this endpoints will list you at most 100 files or directories in alphanumerical order. Keep in minds that if 'dirs' has lesser than 100 elements, it does not mean that there is no more directory in the current search.
You can use 'prefix' or 'suffix' to narrow your results. They either take a string or a list of uris. Remember that uris for folders end with '/' unlike files. Thus, if you want to list the content of a folder, you should use the following (notice the '/' at the end):
client.query().data.post({"prefix":"path/to/folder/"})
The following will list you all the files that starts with 'some_prefix_' in folder 'path/to/':
client.query().data.post({"prefix":"path/to/some_prefix_"})
You can also generate a topdown search of your data hierarchy by using the option 'hierarchy'. It has to be used in conjonction with prefix.
client.query().data.post({"hierarchy": True})
{"paging":..., "files":[], "dirs":["dirA/", "dirB/"]} client.query().data.post({"hierarchy": True, "prefix":"dirA/"}) {"paging":..., "files":[], "dirs":["dirA/some_sub_dir"]}
By default, this requests show only personal file. To reach group files, you will have to use 'group'. This option take an array of group names or ids. You will want to exclude personal file by setting 'personal' to False. You can list the groups that you are subscribed to by using the following request:
client;query().auth.get()
{- "files": [
- "string"
], - "paging": {
- "count": 0,
- "items_per_page": 0,
}
}Use this endpoint to list your personal data and your groups' data.
Use a POST request to filter result.
By default, this endpoints will list you at most 100 files or directories in alphanumerical order. Keep in minds that if 'dirs' has lesser than 100 elements, it does not mean that there is no more directory in the current search.
You can use 'prefix' or 'suffix' to narrow your results. They either take a string or a list of uris. Remember that uris for folders end with '/' unlike files. Thus, if you want to list the content of a folder, you should use the following (notice the '/' at the end):
client.query().data.post({"prefix":"path/to/folder/"})
The following will list you all the files that starts with 'some_prefix_' in folder 'path/to/':
client.query().data.post({"prefix":"path/to/some_prefix_"})
You can also generate a topdown search of your data hierarchy by using the option 'hierarchy'. It has to be used in conjonction with prefix.
client.query().data.post({"hierarchy": True})
{"paging":..., "files":[], "dirs":["dirA/", "dirB/"]} client.query().data.post({"hierarchy": True, "prefix":"dirA/"}) {"paging":..., "files":[], "dirs":["dirA/some_sub_dir"]}
By default, this requests show only personal file. To reach group files, you will have to use 'group'. This option take an array of group names or ids. You will want to exclude personal file by setting 'personal' to False. You can list the groups that you are subscribed to by using the following request:
client;query().auth.get()
| expands_info | boolean or null display more information for each file (verbose). |
| group | string or null show file of specified group |
| groups | Array of strings or null show file from specified groups |
| hierarchy | boolean or null display one level of the file hierarchy (by defaut false) |
| ignores | Array of strings or null list of fields to ignore in the response. Only if expands_info is set. |
| items_per_page | integer or null by default 100 |
| personal | boolean or null show personal file (by default true) |
| prefix | Array of strings or null |
| since | string or null <date-time> |
| suffix | Array of strings or null |
{- "expands_info": true,
- "group": "string",
- "groups": [
- "string"
], - "hierarchy": true,
- "ignores": [
- "string"
], - "items_per_page": 0,
- "personal": true,
- "prefix": [
- "string"
], - "since": "2019-08-24T14:15:22Z",
- "suffix": [
- "string"
]
}{- "files": [
- "string"
], - "paging": {
- "count": 0,
- "items_per_page": 0,
}
}Use this endpoint to copy a file.
| dest required | string path to TCP storage |
| merge | boolean or null by default True |
| overwrite | boolean or null by default False |
| src required | string path to TCP storage |
{- "dest": "string",
- "merge": true,
- "overwrite": true,
- "src": "string"
}Use this endpoint to move a file.
| dest required | string path to TCP storage |
| keep_original | boolean or null by default False |
| merge | boolean or null by default True. If dest is a dir, merge. If dest is a file, NOP |
| overwrite | boolean or null by default False |
| src required | string path to TCP storage |
{- "dest": "string",
- "keep_original": true,
- "merge": true,
- "overwrite": true,
- "src": "string"
}You can upload files using this endpoint. This is a three-steps process:
This endpoint performs the first step. You have to provide the target path in our storage and its size. The size is to be provided as an integer (number of bytes). You can also provide a desired number of parts. If you do not, it will be automatically computed.
This endpoint can be used to process multiple files at once by passing arrays in the JSON body.
(integer or null) or (string or null) bytes or human format | |
required | integer or string bytes or human format (eg. "10Gb") |
| uri required | string path to S3 |
{- "part_size": [
- 0
], - "size": [
- 0
], - "uri": [
- "string"
]
}{- "uploads": [
- {
- "part_size": 0,
- "parts": [
- "string"
], - "upload_id": "string"
}
]
}You will have to this endpoint to abort an on-going upload.
A multipart upload is composed of the following 3 steps:
If any individual part upload of step 2 fails, this request should be used to abort the upload.
You have to provide the upload id that you obtained from the first step. You have to provide the target path (field 'uri' in the JSON body).
| upload_id required | string |
| uri required | string path to S3 |
{- "upload_id": [
- "string"
], - "uri": [
- "string"
]
}"Missing API token"You will have to this endpoint to terminate an on-going upload. This is the last step of the following three-steps process:
You have to provide the upload id that you obtained from the first step. You have to provide the target path (field 'uri' in the JSON body). The field 'parts' is an array. For each element, you will have to provide 'ETag' (given by step 2) and 'PartNumber'.
This endpoint can be used to process multiple files at once by passing arrays in the JSON body.
| md5sum | string or null if present, it will be used to assess the integrity of the file during download phase. |
required | Array of objects |
| upload_id required | string |
| uri required | string path to S3 |
{- "md5sum": [
- "string"
], - "parts": [
- [
- {
- "ETag": "string",
- "PartNumber": 0
}
]
], - "upload_id": [
- "string"
], - "uri": [
- "string"
]
}"Missing API token"You can upload files up to 5Gb in size using this endpoint. This is a three-steps process:
This endpoint provide a temporary link to upload data to TCP storage. You have to provide the target path in our storage and its size. The size is to be provided as an integer (number of bytes).
It is recommanded to use the https://api.thecrossproduct.xyz/v1/data/upload/multipart as it works for any size of file.
| uri required | string path to S3 |
{- "uri": "string"
}{
}You will have to use this endpoint to terminate an on-going upload. This is the last step of the following tree-steps process:
You have to provide the target path (field 'uri' in the JSON body).
This endpoint can be used to process multiple files at once by passing arrays in the JSON body.
| md5sum | string or null if present, it will be used to assess the integrity of the file during download phase. |
| uri required | string path to S3 |
{- "md5sum": [
- "string"
], - "uri": [
- "string"
]
}"Missing API token"{- "created_on": "2019-08-24T14:15:22Z",
- "group": [
- {
- "descr": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string"
}
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "last_activation": "2019-08-24T14:15:22Z",
- "mail": "string",
- "nbr_activations": 0
}This endpoint verifies the validity of your JWT token and provide its informations
{- "expires_at": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "limit": 0,
- "scope": "string",
- "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
- "uses": 0
}Get a paginated list of outputs of a given process.
If you uses a POST request, you can set the number of entries per page and apply filters.
| process_id required | string <uuid> |
{- "outputs": [
- {
- "expiration": "2019-08-24T14:15:22Z",
- "key": "string",
- "process_id": "c0de2232-b221-4f6a-96f2-8c4ca1fda3aa",
- "url": "string"
}
], - "paging": {
- "count": 0,
- "items_per_page": 0,
}
}Get a paginated list of outputs of a given process.
If you uses a POST request, you can set the number of entries per page and apply filters.
| process_id required | string <uuid> |
| expired | boolean or null |
| ignores | Array of strings or null list of fields to ignore in the response |
| items_per_page | integer or null |
| key | string or null |
| key_contains | string or null |
| key_endswith | string or null |
| key_startswith | string or null |
| refresh | boolean or null By defaults, True |
{- "expired": true,
- "ignores": [
- "string"
], - "items_per_page": 0,
- "key": "string",
- "key_contains": "string",
- "key_endswith": "string",
- "key_startswith": "string",
- "refresh": true
}{- "outputs": [
- {
- "expiration": "2019-08-24T14:15:22Z",
- "key": "string",
- "process_id": "c0de2232-b221-4f6a-96f2-8c4ca1fda3aa",
- "url": "string"
}
], - "paging": {
- "count": 0,
- "items_per_page": 0,
}
}This endpoint forces the termination of your process and remove from the database if specified.
| process_id required | string uuid4, or multiple uuid4 separated by commas. |
| keep | boolean set to (false|true). by default, false |
This endpoint provides the status of a process.
| process_id required | string <uuid> |
{- "app": "string",
- "domain": "string",
- "endpoint": "string",
- "errors": "string",
- "expires": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "launched": "2019-08-24T14:15:22Z",
- "quote": 0,
- "state": "string",
- "terminated": "2019-08-24T14:15:22Z"
}Get a paginated list of processes.
A process is the model for all on-going computation. A process orchestrates multiple instances.
If you uses a POST request, you can set the number of entries per page and apply filters.
{- "paging": {
- "count": 0,
- "items_per_page": 0,
}, - "processes": [
- {
- "agent": "string",
- "app": "string",
- "body": "string",
- "domain": "string",
- "endpoint": "string",
- "errors": "string",
- "expires": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "launched": "2019-08-24T14:15:22Z",
- "quote": 0,
- "state": "string",
- "tags": [
- "string"
], - "terminated": "2019-08-24T14:15:22Z"
}
]
}Get a paginated list of processes.
A process is the model for all on-going computation. A process orchestrates multiple instances.
If you uses a POST request, you can set the number of entries per page and apply filters.
| agent | string or null |
| app | string or null |
| domain | string or null |
| endpoint | string or null |
| ignores | Array of strings or null list of fields to ignore in the response |
| items_per_page | integer or null |
| since | string or null <date-time> |
| state | string or null |
| state_contains | string or null |
| tags_intersects | Array of strings or null |
| until | string or null <date-time> |
{- "agent": "string",
- "app": "string",
- "domain": "string",
- "endpoint": "string",
- "ignores": [
- "string"
], - "items_per_page": 0,
- "since": "2019-08-24T14:15:22Z",
- "state": "string",
- "state_contains": "string",
- "tags_intersects": [
- "string"
], - "until": "2019-08-24T14:15:22Z"
}{- "paging": {
- "count": 0,
- "items_per_page": 0,
}, - "processes": [
- {
- "agent": "string",
- "app": "string",
- "body": "string",
- "domain": "string",
- "endpoint": "string",
- "errors": "string",
- "expires": "2019-08-24T14:15:22Z",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "launched": "2019-08-24T14:15:22Z",
- "quote": 0,
- "state": "string",
- "tags": [
- "string"
], - "terminated": "2019-08-24T14:15:22Z"
}
]
}Get the info of a license
| token required | string <uuid> |
{- "active": true,
- "created": "2019-08-24T14:15:22Z",
- "failed_attempts": 0,
- "last_failed": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "limit": 0,
- "name": "string",
- "scope": [
- "string"
], - "token": "b5507016-7da2-4777-a161-1e8042a6a377",
- "until": "2019-08-24T14:15:22Z",
- "uses": 0
}{- "licenses": [
- {
- "active": true,
- "created": "2019-08-24T14:15:22Z",
- "failed_attempts": 0,
- "last_failed": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "limit": 0,
- "name": "string",
- "scope": [
- "string"
], - "token": "b5507016-7da2-4777-a161-1e8042a6a377",
- "until": "2019-08-24T14:15:22Z",
- "uses": 0
}
], - "paging": {
- "count": 0,
- "items_per_page": 0,
}
}Get a paginated list of licenses
| active | boolean or null |
| failed_attempts | integer or null |
| failed_attempts_grt | integer or null |
| failed_attempts_lt | integer or null |
| ignores | Array of strings or null list of fields to ignore in the response |
| items_per_page | integer or null |
| last_used_after | string or null <date-time> |
| last_used_before | string or null <date-time> |
| limit | number or null |
| limit_grt | number or null |
| limit_lt | number or null |
| name | string or null |
| name_contains | string or null |
| nb_activations | integer or null |
| nb_activations_grt | integer or null |
| nb_activations_lt | integer or null |
| scope | Array of strings or null |
| since | string or null <date-time> |
| until | string or null <date-time> |
| uses | number or null |
| uses_grt | number or null |
| uses_lt | number or null |
{- "active": true,
- "failed_attempts": 0,
- "failed_attempts_grt": 0,
- "failed_attempts_lt": 0,
- "ignores": [
- "string"
], - "items_per_page": 0,
- "last_used_after": "2019-08-24T14:15:22Z",
- "last_used_before": "2019-08-24T14:15:22Z",
- "limit": 0,
- "limit_grt": 0,
- "limit_lt": 0,
- "name": "string",
- "name_contains": "string",
- "nb_activations": 0,
- "nb_activations_grt": 0,
- "nb_activations_lt": 0,
- "scope": [
- "string"
], - "since": "2019-08-24T14:15:22Z",
- "until": "2019-08-24T14:15:22Z",
- "uses": 0,
- "uses_grt": 0,
- "uses_lt": 0
}{- "licenses": [
- {
- "active": true,
- "created": "2019-08-24T14:15:22Z",
- "failed_attempts": 0,
- "last_failed": "2019-08-24T14:15:22Z",
- "last_used": "2019-08-24T14:15:22Z",
- "limit": 0,
- "name": "string",
- "scope": [
- "string"
], - "token": "b5507016-7da2-4777-a161-1e8042a6a377",
- "until": "2019-08-24T14:15:22Z",
- "uses": 0
}
], - "paging": {
- "count": 0,
- "items_per_page": 0,
}
}Specs to compute a regression on a pair of rails generating an Alignment Geometry
This endpoint is used to initiate a process for sncf_reseau@railway_track_regression.
Upon successful initiation, an uuid4 is returned to you. This id will be used in subsequent requests to check the status of the process and retrieve the results. required | object |
| output-prefix | string or null |
| tags | Array of strings or null |
{- "inputs": {
- "epsg_code": 0,
- "pk_offset": 0,
- "project_name": "string",
- "track_name": "string",
- "vertical_curve": "circle"
}, - "output-prefix": "string",
- "tags": [
- "string"
]
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}