Reading data with a GET
All tasks, all properties
Note:
- multi-level queries are not supported in MyEbms e.g. ...MyEbms/ABC/OData/ARCUST?$filter=ARCONTACTSs/any(s:s/B_PHONE eq '(800) 421-0771')
- the API enforces a 60 second time out. Query, $Select and page accordingly.
- when reading large amounts of data (e.g. customer or inventory lists) using the SQL Mirror (an add-on EBMS module) is highly recommended.
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK
Using a query
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=CUST_ID eq 'DOEJOH'
By natural key (note the single quotes, without the single quotes it is assumed to be an autoid)
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/ARCUST('DOEJOH')
By autoid
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/ARCUST(38D80NN66P729HA1)
Query by date property
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=START_DATE eq 2016-04-23T00:00:00Z
Query by date property
Note that the time must always beging with PT (inidcation 'period:time') and then the hours and minutes should be suffixed with an H or M, respectively
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=START_TIME eq duration'PT16H12M'
Maximum 5 results
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=CUST_ID eq 'DOEJOH'&$top=5
Results 6-10
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=CUST_ID eq 'DOEJOH'&$skip=5&$top=5
Select specific properties
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=EMP_ID eq 'HARBOB'&$top=2&$select=CUST_ID,DESCR
Sample output
{
"@odata.context": "https://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/$metadata#TASK(CUST_ID,DESCR)",
"value": [
{
"CUST_ID": "ESHCOM",
"DESCR": "OData API documentation"
},
{
"CUST_ID": "DOEJOH",
"DESCR": "New EBMS Sale"
}
]
}
Select and expand specific properties
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=EMP_ID eq 'HARBOB'&$top=2&$select=CUST_ID,DESCR&$expand=CUST_ID_Reference($select=L_NAME)
Sample output
{
"@odata.context": "https://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/$metadata#TASK(CUST_ID,DESCR)",
"value": [
{
"CUST_ID": "ESHCOM",
"DESCR": "OData API documentation",
"CUST_ID_Reference":
{
"L_NAME", "Esh Computer Center"
},
},
{
"CUST_ID": "DOEJOH",
"DESCR": "New EBMS Sale",
"CUST_ID_Reference":
{
"L_NAME", "Doe"
},
}
]
}
Binaries and images
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/INVENTRYIMAGES?$filter=PAR_AID eq '7ABCIVTA17CR8TM0' and PRIMARY&$select=DETAIL&$expand=DETAIL
Sample output
{
"@odata.context": "https://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/$metadata#INVENTRYIMAGES(DETAIL)",
"value": [
{
"DETAIL":
{
"UniqueId": "637243842745886264",
"Value": "..... your BASE64 binary data....."
}
]
}