Chilkat Online Tools

unicodeCpp / Salesforce Platform APIs / Relevant Items

Back to Collection Items

#include <CkHttpW.h>
#include <CkStringBuilderW.h>

void ChilkatSample(void)
    {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;
    bool success;

    // Adds the "Authorization: Bearer <access_token>" header.
    http.put_AuthToken(L"<access_token>");
    http.SetRequestHeader(L"Content-Type",L"application/json");

    CkStringBuilderW sbResponseBody;
    success = http.QuickGetSb(L"https://domain.com/services/data/v{{version}}/sobjects/relevantItems",sbResponseBody);
    if (success == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"Response status code = %d\n",http.get_LastStatus());
    wprintf(L"%s\n",sbResponseBody.getAsString());
    }

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": [
  ]
}