Unicode C++ / Creatio API / $select parameter
Back to Collection Items
void ChilkatSample(void)
{
queryParams.UpdateString(L"$select",L"Field1,Field2"); resp->GetBodySb(sbResponseBody); xmlResponse.LoadSb(sbResponseBody,true); xmlResponse.put_I(i); id = xmlResponse.getChildContent(L"entry[i]|id"); category_term = xmlResponse.chilkatPath(L"entry[i]|category|(term)"); category_scheme = xmlResponse.chilkatPath(L"entry[i]|category|(scheme)"); link_rel = xmlResponse.chilkatPath(L"entry[i]|link|(rel)"); link_title = xmlResponse.chilkatPath(L"entry[i]|link|(title)"); link_href = xmlResponse.chilkatPath(L"entry[i]|link|(href)"); updated = xmlResponse.getChildContent(L"entry[i]|updated"); content_type = xmlResponse.chilkatPath(L"entry[i]|content|(type)"); d_Name = xmlResponse.getChildContent(L"entry[i]|content|m:properties|d:Name"); d_FullJobTitle = xmlResponse.getChildContent(L"entry[i]|content|m:properties|d:FullJobTitle"); i = i + 1;
}
Curl Command
curl -G -d "$select=Field1,Field2"
-H "ForceUseSession: true"
-H "BPMCSRF: {{BPMCSRF}}"
https://myserver.com/0/ServiceModel/EntityDataService.svc/Collection1Collection
Postman Collection Item JSON
{
"name": "$select parameter",
"request": {
"method": "GET",
"header": [
{
"key": "ForceUseSession",
"type": "text",
"value": "true"
},
{
"key": "BPMCSRF",
"type": "text",
"value": "{{BPMCSRF}}"
}
],
"url": {
"raw": "{{BaseURI}}/0/ServiceModel/EntityDataService.svc/{{CollectionName1}}Collection?$select={{FieldName1}},{{FieldName2}}",
"host": [
"{{BaseURI}}"
],
"path": [
"0",
"ServiceModel",
"EntityDataService.svc",
"{{CollectionName1}}Collection"
],
"query": [
{
"key": "$select",
"value": "{{FieldName1}},{{FieldName2}}"
}
]
},
"description": "Request for getting specific fields from an object collection instances via the [$select](https://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/#theselectsystemqueryoption) parameter."
},
"response": [
{
"name": "[200] Gets object collection instances with selected fields",
"originalRequest": {
"method": "GET",
"header": [
{
"key": "ForceUseSession",
"type": "text",
"value": "true"
},
{
"key": "BPMCSRF",
"type": "text",
"value": "{{BPMCSRF}}"
}
],
"url": {
"raw": "https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection?$select=Name,FullJobTitle",
"protocol": "https",
"host": [
"myserver",
"com"
],
"path": [
"0",
"ServiceModel",
"EntityDataService.svc",
"EmployeeCollection"
],
"query": [
{
"key": "$select",
"value": "Name,FullJobTitle"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "xml",
"header": [
{
"key": "Cache-Control",
"value": "no-cache"
},
{
"key": "Content-Type",
"value": "application/atom+xml;type=feed;charset=utf-8"
},
{
"key": "Server",
"value": "Microsoft-IIS/10.0"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "DataServiceVersion",
"value": "2.0;"
},
{
"key": "X-AspNet-Version",
"value": "4.0.30319"
},
{
"key": "X-Powered-By",
"value": "ASP.NET"
},
{
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Date",
"value": "Thu, 09 Apr 2020 11:21:02 GMT"
},
{
"key": "Content-Length",
"value": "8276"
}
],
"cookie": [
],
"body": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<feed xml:base=\"https://myserver.com/0/ServiceModel/EntityDataService.svc/\" xmlns=\"http://www.w3.org/2005/Atom\" xmlns:d=\"http://schemas.microsoft.com/ado/2007/08/dataservices\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection</id>\n <title type=\"text\">EmployeeCollection</title>\n <updated>2020-04-09T11:21:02Z</updated>\n <link rel=\"self\" title=\"EmployeeCollection\" href=\"EmployeeCollection\" />\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'c31c7862-fe33-4a13-9bbc-0943fa08fd02')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'c31c7862-fe33-4a13-9bbc-0943fa08fd02')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>William Walker</d:Name>\n <d:FullJobTitle>Developer</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'ddb34ecb-f009-484a-ad2b-0a49a475bdb2')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'ddb34ecb-f009-484a-ad2b-0a49a475bdb2')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Timothy Sawyer</d:Name>\n <d:FullJobTitle>Developer</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'0f5feb72-bcc8-4b0c-bace-1cf7d3ee7755')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'0f5feb72-bcc8-4b0c-bace-1cf7d3ee7755')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Symon Clarke</d:Name>\n <d:FullJobTitle>Marketing manager</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'9842387d-069f-466c-9551-32cedbc16d90')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Mary King</d:Name>\n <d:FullJobTitle>Customer manager</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'f11df686-a557-4790-99e5-36ec8dcd2f00')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'f11df686-a557-4790-99e5-36ec8dcd2f00')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Sarah M. Richards</d:Name>\n <d:FullJobTitle>Head of accounting department</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'82c5f81c-4018-44f1-8dcb-738704fd21c4')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'82c5f81c-4018-44f1-8dcb-738704fd21c4')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Valerie E. Murphy</d:Name>\n <d:FullJobTitle>Head of marketing department</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'a98e1131-2852-4191-b7be-77e267aa075a')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'a98e1131-2852-4191-b7be-77e267aa075a')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Jason Robinson</d:Name>\n <d:FullJobTitle>Specialist</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'3b952b60-2502-4ab2-a967-7f898f8b8b55')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Megan Lewis</d:Name>\n <d:FullJobTitle>Customer manager</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'3e5bd47e-1ebd-41db-a9a6-a3560dcee3cb')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'3e5bd47e-1ebd-41db-a9a6-a3560dcee3cb')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Peter Moore</d:Name>\n <d:FullJobTitle>Head of development department</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'26fffdc9-a184-47a7-a6b6-cafc9fe58327')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'26fffdc9-a184-47a7-a6b6-cafc9fe58327')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Caleb Jones</d:Name>\n <d:FullJobTitle>CEO</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'e17c9cd6-262d-481d-86a9-f09a82984e0e')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'e17c9cd6-262d-481d-86a9-f09a82984e0e')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>John Best</d:Name>\n <d:FullJobTitle>Head of sales department</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'3eff8e22-8690-4bd7-b4c4-f3e1c8174410')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'3eff8e22-8690-4bd7-b4c4-f3e1c8174410')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Tiffany J. Martin</d:Name>\n <d:FullJobTitle>IT Support Engineer</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n <entry>\n <id>https://myserver.com/0/ServiceModel/EntityDataService.svc/EmployeeCollection(guid'cff2b81f-6f47-429a-acf8-fb751bd4575e')</id>\n <category term=\"Terrasoft.Configuration.Employee\" scheme=\"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme\" />\n <link rel=\"edit\" title=\"Employee\" href=\"EmployeeCollection(guid'cff2b81f-6f47-429a-acf8-fb751bd4575e')\" />\n <title />\n <updated>2020-04-09T11:21:02Z</updated>\n <author>\n <name />\n </author>\n <content type=\"application/xml\">\n <m:properties>\n <d:Name>Tracy Wilkinson</d:Name>\n <d:FullJobTitle>Marketing manager</d:FullJobTitle>\n </m:properties>\n </content>\n </entry>\n</feed>"
}
]
}