Reading data with a GET
All tasks, all properties
Note that multi-level queries are not supported in MyEbms
e.g. https://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/ARCUST?$filter=ARCONTACTSs/any(s:s/B_PHONE eq '(800) 421-0771')
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK
Using a query ($select is required
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=CUST_ID eq 'DOEJOH'&$select=F_NAME,L_NAME
By natural key (note the single quotes)
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/ARCUST('DOEJOH')?$select=F_NAME,L_NAME
By AUTOID
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/ARCUST('38D80NN66P729HA1')?$select=F_NAME,L_NAME
Query by date property
GEThttps://ecc123456789012345.servicebus.windows.net/MyEbms/ABC/OData/TASK?$filter=START_DATE eq 2016-04-23T00:00:00Z&$select=TICKET,DESCR,NAME
Query by date property
Note that the time must always begin with PT (indcation '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 (required with all queries)
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"
},
}
]
}