Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkStringBuilderW sbResponseBody;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
// Adds the "Authorization: Bearer <access_token>" header.
CkHttpW_putAuthToken(http,L"<access_token>");
CkHttpW_SetRequestHeader(http,L"Content-Type",L"application/json");
sbResponseBody = CkStringBuilderW_Create();
success = CkHttpW_QuickGetSb(http,L"https://domain.com/services/data/v{{version}}/sobjects/relevantItems",sbResponseBody);
if (success == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkStringBuilderW_Dispose(sbResponseBody);
return;
}
wprintf(L"Response status code = %d\n",CkHttpW_getLastStatus(http));
wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponseBody));
CkHttpW_Dispose(http);
CkStringBuilderW_Dispose(sbResponseBody);
}
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
-H "Content-Type: application/json"
https://domain.com/services/data/v{{version}}/sobjects/relevantItems
Postman Collection Item JSON
{
"name": "Relevant Items",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/sobjects/relevantItems",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"sobjects",
"relevantItems"
],
"query": [
{
"key": "lastUpdatedId",
"value": "",
"description": "Optional. Compares the entire current list of relevant items to a previous version, if available. Specify the lastUpdatedId value returned in a previous response.",
"disabled": true
},
{
"key": "sobjects",
"value": "",
"description": "Optional. To scope the results to a particular object or set of objects, specify the name for one or more sObjects.",
"disabled": true
},
{
"key": "sobject.lastUpdatedId",
"value": "",
"description": "Optional. Compares the current list of relevant items for this particular object to a previous version, if available. Specify the lastUpdatedId value returned in a previous response.\nNote\nYou can only specify this parameter for the sObjects specified in the sobjects parameter.",
"disabled": true
}
]
},
"description": "Gets the current user’s most relevant items. Relevant items include records for objects in the user’s global search scope and also most recently used (MRU) objects.\nRelevant items include up to 50 of the most recently viewed or updated records for each object in the user’s global search scope.\nNote\nThe user’s global search scope includes the objects the user interacted with most in the last 30 days, including objects the user pinned from the search results page in the Salesforce Classic.\n\nThen, the resource finds more recent records for each most recently used (MRU) object until the maximum number of records, which is 2,000, is returned.\nThis resource only accesses the relevant item information. Modifying the list of relevant items is not currently supported\nhttps://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_relevant_items.htm"
},
"response": [
]
}