Foxpro / Creatio API / Get a field of object collection instance by Id
Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loSbResponseBody
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder')
loSbResponseBody = CreateObject('Chilkat.StringBuilder')
lnSuccess = loHttp.QuickGetSb("https://myserver.com/0/odata/Collection4(Id)/Field4",loSbResponseBody)
IF (lnSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loSbResponseBody
CANCEL
ENDIF
? "Response status code = " + STR(loHttp.LastStatus)
? loSbResponseBody.GetAsString()
RELEASE loHttp
RELEASE loSbResponseBody
Curl Command
curl -X GET
https://myserver.com/0/odata/Collection4(Id)/Field4
Postman Collection Item JSON
{
"name": "Get a field of object collection instance by Id",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{BaseURI}}/0/odata/{{CollectionName4}}({{ObjectId2}})/{{FieldName4}}",
"host": [
"{{BaseURI}}"
],
"path": [
"0",
"odata",
"{{CollectionName4}}({{ObjectId2}})",
"{{FieldName4}}"
]
},
"description": "Request for getting a specific field value by the Id of an object collection instance."
},
"response": [
{
"name": "[200] Gets a field of an object collection instance by Id",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://myserver.com/0/odata/SysImage(29ff7edf-4db9-4e09-92b0-018047ba1f71)/Data",
"protocol": "https",
"host": [
"myserver",
"com"
],
"path": [
"0",
"odata",
"SysImage(29ff7edf-4db9-4e09-92b0-018047ba1f71)",
"Data"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "Text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}