Introduction
Magentrix REST API v3.0
Magentrix provides comprehensive APIs for creating, reading, editing, or deleting data entity records, uploading or downloading files from/to a content library, and more.
REST API is based on using data resources in Magentrix, such as records, query results, metadata, and files. Each resource is exposed by a uniform (URI) and is accessed by sending HTTP requests to the corresponding URI.
Depending on which resource you want to access, you need to construct an HTTP request, such as retrieving entity metadata, creating, reading, editing or deleting records and more.
URIs
The URI is the path to a resource in Magentrix. The URI constructed for the resource may contain your custom domain assigned to your Magentrix instance.
'https://{my-domain.com}/api/3.0/{resource}'Replace {resource} with the rest of the path to the actual REST resource. Depending on the resource, the path may contain parameters, such as IDs, to identify a record or other settings.
HTTP Methods
Certain resources may require a specific HTTP method for calling them (GET, POST, PATCH, PUT, DELETE), depending on the type of operation the resource is performing.
In this documentation, to make it clear, the HTTP method required to call a REST resource is going to be shown before the path:
curl POST 'https://{my-domain.com}/api/3.0/{resource}'
Content Negotiation
Use headers to pass parameters and customize options for your HTTP requests. HTTP Accept, indicates the format that your client accepts the REST response. Possible values are application/json (default) and application/xml.
HTTP Content-type, indicates the format of the data within the request body; Magentrix only accepts application/json format.
Authentication
Use the Authorization header to pass your API Key (refresh token) to obtain a session ID (access token). Using this access token, you can call different REST resources. The access token is usually valid for a certain period of time, after which it will expire, and you need to re-authenticate using your API Key to obtain a new one.
Authorization: Bearer {access_token}
What's Next?