Resource Metadata
The supported JSON structure of all resources is described by the Open API schema standard: (https://www.openapis.org/).
In addition to accessing these definitions via the "Tasks" section of this documentation,
the individual schema file for each resource can be accessed at runtime by accessing the
"metadata-catalog" URL:
curl -u username:password "http://<server>:<port>/logisticsRestApi/resources/v2/metadata-catalog/{resource name}"
For example:
curl -u username:password "http://<server>:<port>/logisticsRestApi/resources/v2/metadata-catalog/shipments"
Will return the Open API JSON schema:
{
"openapi": "3.0.0",
"info": {
"title": "OTM REST API Documentation",
"version": "v2"
},
"paths": {...
},
"components": {
"schemas": {
"/shipments": {
"properties": {
"shipmentGid": {
"description": "The GID for the shipment.",
"type": "string"
},
...etc...
}
}
}
}
...etc...
}
The "paths" information describes the HTTP URLs and methods that are allowed for each resource and sub-resource in the structure.
The "components.schemas" information describes the valid attributes for each structure which can be used in the resource structure.
See the Open API Specification for a complete description.