Api get details
Calling a service to get the details of a record for an entity is done by an http GET request.
The query request on an entity is done by using a get on the following syntax:http://SERVER:SERVICE/api1/APPLICATION/CONTRACT/ENDPOINT/ENTITY('KEY')?representation=REPRESENTATION.$details
Where:
SERVER:SERVICE
is the server address followed by the service number.APPLICATION
is the application (Syracuse or $$PROD).CONTRACT
is the api1 contract (administration or X3).ENDPOINT
is the endpoint (collaboration or an endpoint associated with an X3 folder).ENTITY
is the class name.KEY
is the key value.REPRESENTATION
is the representation name.For example, the query to get the detail of a storage volume identified by its UUID (abbreviated) can be the following:http://my_server:8124/syracuse/collaboration/syracuse/storageVolumes(('32..8a')?representation=storageVolume.$details
If no error occurs, the http status 200 is returned.
If a key that does not exist is given, then the http status 404 (not found) is returned. For X3 endpoints, an error payload is also present in the body.
If the request is successful, the body will return a payload that includes:
* Some meta-data information. The information that may be present is:
* "$url"
: the URL called.
* "$uuid"
: a unique ID associated with the line.
* "$key"
: the unique key identifying the line.
* "$creDate"
, "$creUser"
, "$updDate"
, "$updUsr"
: creation and update date and user.
The record properties. If an entity is a reference to another entity, it appears as a sub-entity.
Additional elements can be present, such as:
"$links"
to describe navigation links that can be located at the global level on the structure or on every line element."$properties"
to describe meta-data related to the properties.If you use the previous example to get the definition of a storage volume identified by its unique ID ('32..8a' abbreviated as shown):
The result payload will be:
{"$uuid": "32..8a","$key": "32..8a","$url": "/api1/syracuse/collaboration/syracuse/storageVolumes('32..8a')?representation=storageVolume.$details","$etag": 1,"$creUser": "anonymous","$creDate": "2013-12-07T08:52:49.194Z","$updUser": "anonymous","$updDate": "2014-01-07T14:36:58.391Z","$properties": {"storageType": {"$isDisabled": true},"path": {"$isHidden": true},"dynamic": {"$isHidden": true}},"code": "WORD_TEMPLATE_REPORT","description": "Word templates for reporting","storageType": "db_file","dynamic": false,"$links": {"$browse": {"$title": "List of files","$url": "{$baseUrl}/documents?representation=document.$query&where=(volume eq \"{$uuid}\")","$target": "blank"}},"$value": "Word templates for reporting"}
"$properties"
describes meta data associated with the properties of the volume."$links"
describes a unique link that gives access to the page listing the documents in the volume.A call to get the detail of the YORDER resource on a SEED endpoint on the server will be:
http://my_server:8124/api1/x3/$$prod/SEED/YORDER('14020002')?representation=YORDER.$details
The result payload will be:
{"$uuid":"2ca7a135-c487-1c45-bd59-6a52be8b0767","$etag":"2014-02-07T08:40:56Z","COMMENT":"First grade quality expected","CURRENCY":"USD","CURRENCY_REF":{"$title":"US Dollar","$description":"US Dollar","$symbol":"$"},"CUSTOMER":"PT152","CUSTOMER_REF":{"$title":"LouroSoft","$description":"J.Louro & Associados"},"YOHLINES":[{"$uuid":"6bafc0a1-abc6-444b-90ab-4330a7ab0098","ITEM":"BMS028","ITEM_REF":{"$description":"Tire - Mountain"},"PRICE":18040.25,"QTY":25,"UNITPRICE":721.61},{"$uuid":"514ebd8a-a444-9a4a-b9e0-dfc4a8edca4e","ITEM":"FIN010","ITEM_REF":{"$description":"CU Dual Office workstation"},"PRICE":1608.6,"QTY":15,"UNITPRICE":107.24}],"ORDDAT":"2010-11-24","ORDNUM":"14020002","ORDSTA":3,"TOTAL":19648.85}
"CURRENCY"
is a reference, "CURRENCY_REF" giving the associated properties."YOHLINES"
is a collection of lines.