Back to Collection Items
var
http: HCkHttp;
success: Boolean;
sbResponseBody: HCkStringBuilder;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := CkHttp_Create();
// Adds the "Authorization: Bearer <access_token>" header.
CkHttp_putAuthToken(http,'<access_token>');
CkHttp_SetRequestHeader(http,'Content-Type','application/json');
sbResponseBody := CkStringBuilder_Create();
success := CkHttp_QuickGetSb(http,'https://domain.com/services/data/v{{version}}/sobjects/relevantItems',sbResponseBody);
if (success = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
Memo1.Lines.Add('Response status code = ' + IntToStr(CkHttp_getLastStatus(http)));
Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
CkHttp_Dispose(http);
CkStringBuilder_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": [
]
}