Salesforce Named Credentials APIs
Named Credentials are required for Salesforce cache-only keys.
Listing Named Credentials from Salesforce
Use /v1/cckm/sfdc/get-named-credentials
to list all the named credentials associated with a Salesforce organization. The list is fetched from Salesforce.
Syntax
curl -k 'https://<IP>/api/v1/cckm/sfdc/get-named-credentials' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "organization_id": "<organization-id>"\n}' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
organization_id | string | Resource ID of the organization |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/sfdc/get-named-credentials' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJkN2EzMTllMS1kODQ3LTRhYTEtOGMyZS1mMjFjM2UxOTI1ZTQiLCJzdWIiOiJsb2NhbHw2MTVmM2E3Ny01MzM1LTQwMTItODcyYy05MWE5NTgwMTNlOTYiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiZjM0ZTEwOTgtOGM5MC00NWQ4LWFkNmEtMmYzOWFhMWJmNzk3Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImU2ZTVhYWVmLTg0ZjMtNDZjYy05ZDI3LTllZTBkMTgyNWViNiIsImlhdCI6MTYzMzQ1MDEyOSwiZXhwIjoxNjMzNDUwNDI5fQ.VXVV-0Jyxp_c2Heg04sg-rLYWTliNQgX3ImPow9er8s' -H 'Content-Type: application/json' --data-binary $'{\n "organization_id": "04f63144-940c-4c4f-8426-111111111111"\n}' --compressed
Example Response
{
"totalSize": 2,
"done": true,
"records": [
{
"attributes": {
"type": "NamedCredential",
"url": "/services/data/v52.0/sobjects/NamedCredential/0XA6h000000L0D7GAK"
},
"Endpoint": "https://test.com/kmaas/byok/00D7X000000EM3TEA8/",
"id": "0XA3h000000L0D5GAK",
"IsDeleted": false,
"MasterLabel": "test-namedcredential-1",
"DeveloperName": "test-namedcredential-1"
},
{
"attributes": {
"type": "NamedCredential",
"url": "/services/data/v52.0/sobjects/NamedCredential/0XA5F0000030wCiWAI"
},
"Endpoint": "https://test.com/kmaas/byok/00D7X000000EA7TEA3",
"id": "0XA5G0000010wCiWAI",
"IsDeleted": false,
"MasterLabel": "test-namedcredential-2",
"DeveloperName": "test-namedcredential-2"
}
],
"organizationId": "a916ba75-242b-4f29-b886-52bf51d70e16"
}
Response Codes
Response Code | Description |
---|---|
2xx | success |
4xx | resource not found on Salesforce |