Download OpenAPI specification:
The RELEX Monitoring API provides a way to access monitoring data for RELEX services. The API allows customers to retrieve information about events that have occurred in their environments, such as file processing events and job execution events.
See the Get File Events endpoint for example file event payload.
File events are grouped by the file name originally used when uploading the file to RELEX. The file events endpoint returns a list of file names along with the current status of the data contained in each file. The status of a file can be one of the following:
Status | Description |
---|---|
Received | The file has been received by RELEX, but no further processing has yet happened. |
Processing | The data contained in the file is being validated and transferred via intermediate storage to RELEX supply chain planning. |
Processed | The data is fully validated and ready to be used in supply chain planning calculations. |
Error | An error occurred during processing of the file. |
Note that currently, the events cover only file processing up until the data is ready for use in supply chain planning.
Along with the status, the file events endpoint returns a list of events that have occurred.
Event | Description |
---|---|
File received | The file has been received in an upload location by RELEX. |
File preparation started | The file is being read in and validated by the data integration application known as RELEX Connect. |
File preparation completed | The file has been fully validated by RELEX Connect and the data is now uploaded to intermediate storage for use in supply chain planning. |
File import started | The data is now being read from intermediate storage to RELEX Plan, the core RELEX supply chain planning application. |
File import completed | The data has been fully read and is ready for use in supply chain planning calculations. |
File is ready for processing | The data is ready for pricing and promotion strategy optimization. |
The API provides information about the direction of data integration. Two types of integration are supported: inbound and outbound.
The integration direction is indicated in the file event payload via the direction field. It can also be specified as an optional direction query parameter in the file event endpoint. Additionally:
Possible values for the 'direction' field are:
Direction | Description | File path field name |
---|---|---|
inbound | Data is being uploaded to RELEX. | input_url |
outbound | Data is being downloaded from RELEX. | output_url |
⚠️ Functionality is available from Plan 10.6 and higher.
Events with 'File import started' and 'File import completed' statuses also include information about the number of total and skipped rows in the file. This information is provided in 'file_rows' object. The 'file_rows' object contains the following fields:
Field | Description |
---|---|
total | Total number of data rows present in the uploaded file. |
skipped | Number of rows skipped while processing the uploaded file |
The API does not provide information on the reason for skipping. This functionality is for informational purposes only and does not indicate errors during file processing unless the event status is "Error."
⚠️ Functionality is available for SFTP file uploads
Shows the size of the file in bytes. The file size is included in the file_size
field of the file event object.
If an error occurs during file processing, the endpoint will return a list of errors and the overall status of the file is "Error". Each error consists of a title that describes at what stage the error occurred and a details field that provides more information about the error. Example:
{
"file": "Locations_2025-01-23.csv",
"status": "Error",
"timestamp": "2025-01-23T07:38:22Z",
"file_size": 15,
"events": [
{
"title": "File preparation started",
"timestamp": "2025-01-23T07:38:16Z"
}
],
"errors": [
{
"title": "File preparation started",
"details": "Validation failed: invalid value 'QTY' for column 'location_id'"
}
]
The most typical errors involve file validation issues, such as missing required fields or incorrect data types. The following table lists the most common error messages:
Error Details | Reason |
---|---|
Missing required non-null fields, fields=”comma-separated list of fields” | The input file specification contains fields marked as 'Not null', but the provided file is missing these fields. |
Could not parse value of type "type-name" | The input file specification defines a field of a specific type, but the provided file contains a value that does not match the specified type. |
Number of columns on row does not match the header or linebreaks are inconsistent | The number of fields in the provided file does not match the input file specification, or inconsistent linebreaking characters are used in the data. |
See the Get Job Events endpoint for example job event payload.
The RELEX Monitoring API provides access to events linked to RELEX Plan job executions. By querying the job events endpoint, RELEX users can find out about the current state of scheduled jobs in RELEX Plan and whether or not they have completed successfully.
Jobs can have the following statuses:
Status | Description |
---|---|
Running | The job is in progress. |
Cancelled | The job was canceled when the Cancel button was selected. The job is also marked as Canceled if the continue criteria set in WaitFor is not met and WaitFor is set to not continue the execution of the job. |
Completed | The job has completed successfully. |
Error | The job has failed or has been aborted by the system (for example, due to a system restart). |
Queued | The job is lined up and waiting to be processed. There are more jobs started than can be executed simultaneously. You can configure the number, and the default is 5 jobs. The job remains in the Queued status until earlier jobs have completed. |
Completed with errors | The job has completed, but some of the child runs executed within the job have failed with an error. |
Pending | The job is awaiting initiation. |
Delayed | The job start has been postponed. |
Jobs can be filtered by a number of fields, including job name (job_name
), the request will return jobs whose names contain the specified string.
RELEX customers can use the Monitoring API to:
To start using the Monitoring API, ensure you have received your Client ID and Client Secret.
A simple client code snippet in Python for reference is maintained in this repository:
https://github.com/relex/monitoring-api-demo
This section covers the data resources and technical details of the RELEX Monitoring API.
⚠️ All API requests must be made over HTTPS
Calls made over plain HTTP will fail and return an HTTP Status Code 400 Bad Request.
The RELEX Monitoring API uses JSON as the format for data serialization. The JSON payload of the API has a root-level object that contains a meta-object and data array element.
All resources have a defined schema, and the details of each resource can be examined in the resource specifications in this document.
Date and time can be represented with a single field type expected to follow the ISO 8601 standard.
2023-12-05T13:45:10Z
.The base URL for API requests depends on the region where the client is located. The following URLs should be used depending on the region:
Region | Base URL |
---|---|
EU | https://eu.monitor.relexsolutions.com |
US | https://us.monitor.relexsolutions.com |
Ensure that all API requests use the appropriate base URL for your region. For example, an API request for a customer in the EU would be:
GET https://eu.monitor.relexsolutions.com/api/v1/{customer_id}/events/file?env=test
For more examples, see the operations dropdown menu on the right side of the page.
Monitoring API resources respond to requests synchronously.
The RELEX Monitoring API uses standard HTTP response codes to indicate the various failures an API request can return. Codes in the 4xx range indicate an error on the client side, for example, the resource name was incorrect. Codes in the 5xx range indicate an error within RELEX services.
To convey details about errors to clients in JSON responses, the RELEX Monitoring API uses the RFC 7807 standard.
Error code | Description |
---|---|
400 Bad Request | The request was unacceptable, for example, due to a missing parameter |
401 Unauthorized | The client must log in. This often means "Unauthenticated" |
403 Forbidden | Authentication/authorization failed. The bearer token provided might be invalid, expired, or revoked, or the customer_id path parameter is incorrect |
404 Not Found | Resource was not found |
405 Method not allowed | The request method is not supported by the target resource |
429 Too Many Requests | Request limit has been reached |
500 Internal Server Error | Generic server error indicating an unexpected problem. A client may retry |
The RELEX Monitoring API imposes limits on incoming web requests to ensure performance, reliability, and efficiency. The API sets the following limits:
Overall limit is 100,000 requests per 5 minutes from a single customer IP address. Applies to all endpoints and requests to the API.
The limit for the /api/v1/{customer}/events/job endpoint is 60 requests per minute from a single customer IP address.
The limit for the /api/v1/{customer}/events/file endpoint is 60 requests per minute from a single customer IP address.
The limit for the /health endpoint is 12 requests per minute from a single customer IP address.
If the limits are exceeded, an HTTP status code 429 is returned.
ℹ️ API limits are subject to change and appropriate values are determined during the implementation project.
The RELEX Monitoring API imposes no limits on return payloads. The payload size can be arbitrarily large.
This section describes the authentication methods and security-related requirements for the Monitoring API.
The Monitoring API utilizes OAuth 2.0 and OpenID Connect (OIDC) for authentication and authorization. OIDC is an authentication layer on top of OAuth 2.0 and JSON Web Tokens (JWT).
The API is secured via a JWT access token, which must be present in each request. The JWT is fetched from a token endpoint of RELEX Identity (an Identity Provider) using a Client ID and a Client Secret.
The Monitoring API implements authorization using the Client Credentials Grant. It is an authorization flow defined in the OAuth 2.0 specification, which is typically used for allowing access to resources in an automated context; that is, in a context with no human input.
The general steps involved are as follows:
To authenticate with RELEX Identity, the client needs:
These are provided by RELEX during the implementation process. After this information has been provided, it needs to be configured into the client application according to the application's specific needs.
The token endpoint URL for obtaining the JWT access token depends on the region. The following URLs should be used depending on the region where the client operates:
Region | Token endpoint URL |
---|---|
EU | https://identity.prod-eu.prod.cc.relexsolutions.com/monitoring_api_prod/connect/token |
US | https://identity.prod-us.prod.cc.relexsolutions.com/monitoring_api_prod/connect/token |
application/x-www-form-urlencoded
client_credentials
grant type must be included in the POST body as URL-encoded key-value pairs.An example body:
client_id=my_client&client_secret=ZWFzdGVyZWdnCg&grant_type=client_credentials
"access_token"
: the JWT token that needs to be used for accessing the Monitoring API"expires_in"
: the access token's time to live in seconds"token_type"
: information on how the token needs to be used, in this case, always set to "Bearer"."scope"
: The scope that the token grants access to.Whenever the client accesses any Monitoring API endpoint, the client must provide the following:
Authorization
-header, preceded by Bearer
. An example header is Authorization: Bearer eyJ[...]jw
.When an Access Token expires, Monitoring API calls respond with 401 Unauthorized
The client application has two options to keep it authenticated:
Note: the Client Credentials grant type is not compatible with a construct such as refresh tokens, as mentioned in the protocol specification.
As an additional layer of security, the Monitoring API can be configured to allow requests from only certain IP addresses or ranges. The recommendation is to always have an IP allowlist in place. The API does not support an explicit blocklist.
Returns a list of environments available to the customer
version required | string Example: v1 API version, vMAJOR format |
customer_id required | string Example: some-big-shop ID of the customer who the environments belong to |
{- "environments": [
- "string"
]
}
Returns file events owned by the requesting customer, with optional filtering by name and/or timestamps. The API response includes information about a file if at least one event has occurred within the specified timeframe.
version required | string Example: v1 API version, vMAJOR format |
customer_id required | string Example: example-customer ID of the customer who the events belong to |
env required | string Example: env=dev1 Customer environment to fetch the events from |
file_name | string Example: file_name=somefile.json File name to fetch the events for. The API will return events for all files whose names contain a specific string. This string is provided through the 'file_name' query argument. |
start_timestamp | string <date-time> Example: start_timestamp=2021-01-01T05:10:06+00:00 Start timestamp (inclusive) |
end_timestamp | string <date-time> Example: end_timestamp=2022-09-30T20:10:06+00:00 End timestamp (exclusive) |
direction | string Enum: "inbound" "outbound" Example: direction=inbound Integration direction |
page | integer Default: 1 Example: page=1 Page number, 1-based |
per_page | integer [ 1 .. 1000 ] Default: 50 Example: per_page=50 Number of file event flows per page |
{- "meta": {
- "customer": "example-customer",
- "version": "v1"
}, - "data": [
- {
- "file": "E-10003.BSAPPRODUCTLDSRELEX_6700_20231130224506.csv",
- "input_url": "sftp://sftpexample-customerfim@hfs-ia-dev-1.relexsolutions.com/data/input",
- "direction": "inbound",
- "status": "Received",
- "timestamp": "2023-12-01T02:55:39Z",
- "file_size": 359,
- "events": [
- {
- "title": "File received",
- "timestamp": "2023-12-01T02:55:39Z"
}
]
}, - {
- "file": "E-10003.BSAPCAMPAIGNLRELEX20231130224800.csv",
- "input_url": "sftp://sftpexample-customerfim@hfs-ia-dev-1.relexsolutions.com/data/input",
- "direction": "inbound",
- "status": "Processing",
- "timestamp": "2023-12-01T04:00:10Z",
- "file_size": 359,
- "events": [
- {
- "title": "File received",
- "timestamp": "2023-12-01T02:55:39Z"
}, - {
- "title": "File preparation started",
- "timestamp": "2023-12-01T04:00:10Z"
}
]
}, - {
- "file": "E-10003.BSAPPRODUCTLDSRELEX_6400_20231130224503.csv",
- "input_url": "sftp://sftpexample-customerfim@hfs-ia-dev-1.relexsolutions.com/data/input",
- "direction": "inbound",
- "status": "Processed",
- "timestamp": "2023-12-04T05:07:33Z",
- "file_size": 359,
- "events": [
- {
- "title": "File received",
- "timestamp": "2023-12-01T02:55:39Z"
}, - {
- "title": "File preparation started",
- "timestamp": "2023-12-01T04:00:10Z"
}, - {
- "title": "File import started",
- "timestamp": "2023-12-01T04:01:46Z",
- "file_rows": {
- "total": 100,
- "skipped": 0
}
}, - {
- "title": "File import completed",
- "timestamp": "2023-12-04T05:07:33Z"
}
]
}, - {
- "file": "E-10003.BSAPINVTRANSRELEX_6500_20231201023001.csv",
- "input_url": "sftp://sftpexample-customerfim@hfs-ia-dev-1.relexsolutions.com/data/input",
- "direction": "inbound",
- "status": "Error",
- "timestamp": "2023-12-01T04:00:10Z",
- "file_size": 359,
- "events": [
- {
- "title": "File received",
- "timestamp": "2023-12-01T02:55:39Z"
}, - {
- "title": "File preparation started",
- "timestamp": "2023-12-01T04:00:10Z"
}
], - "errors": [
- {
- "title": "File validation failed",
- "details": "Validation failed: invalid value \"QTY\" for column \"batch_size\""
}
]
}, - {
- "file": "fake-file_aaTYk_2025-06-06_05:05:50.csv",
- "status": "Delivered",
- "direction": "outbound",
- "timestamp": "2025-06-06T05:06:50Z",
- "events": [
- {
- "title": "Export file created",
- "timestamp": "2025-06-06T05:05:50Z"
}, - {
- "title": "Export file uploaded to customer-facing storage",
- "timestamp": "2025-06-06T05:06:50Z"
}
]
}, - "..."
], - "_links": {
- "next": {
- "href": "/api/v1/example-customer/events/file?page=2"
}, - "self": {
- "href": "/api/v1/example-customer/events/file"
}
}
}
Returns job events executed on customer environment, with optional filtering by env and/or timestamps
version required | string Example: v1 API version, vMAJOR format |
customer_id required | string Example: some-big-shop ID of the customer who the events belong to |
env required | string Example: env=dev1 Customer environment to fetch the events from |
run_id | string <uuid> Example: run_id=00000000-0000-0000-0000-000000000000 The ID of the process which created the scheduled job, which doesn't change between job executions |
job_name | string Example: job_name=Scheduled job Name of the scheduled job. The API returns all jobs whose names include the specified string. |
start_timestamp | string <date-time> Example: start_timestamp=2021-01-01T05:10:06+00:00 Start timestamp (inclusive) |
end_timestamp | string <date-time> Example: end_timestamp=2022-09-30T20:10:06+00:00 End timestamp (exclusive) |
page | integer Default: 1 Example: page=1 Page number, 1-based |
per_page | integer [ 1 .. 1000 ] Default: 50 Example: per_page=50 Number of job execution results per page |
{- "meta": {
- "customer": "example-customer",
- "version": "v1"
}, - "data": [
- {
- "name": "Scheduled job - Example Workflow",
- "run_id": "b1249vjf-fko0-f82d-dkod-dwko25kofdd8",
- "job_id": 1123456789900,
- "application": "plan-example",
- "status": "Completed",
- "status_message": "Externally triggered workflow 01234567890",
- "progress": {
- "rows_total": 30,
- "rows_ignored": 0,
- "rows_completed": 30,
- "percentage_completed": 100
}, - "last_update": "2025-03-28T04:45:28Z",
- "start_time": "2025-03-28T04:45:25Z",
- "end_time": "2025-03-28T04:45:28Z",
- "events": [
- {
- "status": "Pending",
- "timestamp": "2025-03-28T04:45:25Z"
}, - {
- "status": "Running",
- "timestamp": "2025-03-28T04:45:25Z"
}, - {
- "status": "Completed",
- "timestamp": "2025-03-28T04:45:28Z"
}
]
}, - {
- "name": "Scheduled job - Example Workflow",
- "run_id": "b1249vjf-fko0-f82d-dkod-dwko25kofdd8",
- "job_id": 1123456789900,
- "application": "plan-example",
- "status": "Error",
- "status_message": "Externally triggered workflow 01234567890 - Error running scheduled job",
- "progress": {
- "rows_total": 4,
- "rows_ignored": 0,
- "rows_completed": 0,
- "percentage_completed": 100
}, - "last_update": "2025-03-28T04:45:28Z",
- "start_time": "2025-03-28T04:45:25Z",
- "end_time": "2025-03-28T04:45:28Z",
- "events": [
- {
- "status": "Pending",
- "timestamp": "2025-03-28T04:45:25Z"
}, - {
- "status": "Running",
- "timestamp": "2025-03-28T04:45:25Z"
}, - {
- "status": "Error",
- "timestamp": "2025-03-28T04:45:28Z"
}
]
}, - "..."
], - "_links": {
- "next": {
- "href": "/api/v1/example-customer/events/job?page=2"
}, - "self": {
- "href": "/api/v1/example-customer/events/job"
}
}
}
Endpoints that report on the system's operational status and readiness for health checks or monitoring.