Creating a Salesforce Tenant Secret
Use the post /v1/cckm/sfdc/keys
API to create a new Salesforce tenant secret. When a new tenant secret is created, its status becomes ACTIVE
, and the status of the previous tenant secret becomes ARCHIVED
.
Syntax
curl -k '<IP>/api/v1/cckm/sfdc/keys' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "organization_id": "<organization-resource>",\n "Type": "Data"\n}' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
organization_id | string | Resource ID of the Salesforce organization where the tenant secret will be created. To get the resource ID of an organization, run the get /v1/cckm/sfdc/organizations API. Refer to Listing Salesforce Organizations for details. |
type | string | Type of the Salesforce tenant secret. The type can be: • Data • EventBus • SearchIndex • DeterministicData • Analytics |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/sfdc/keys' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI0MmFmZDExNy02YzllLTRhNGUtOTAwYS1lYjlhNDNjYWE5ZDIiLCJzdWIiOiJsb2NhbHwzMTI5ODdkMS0wOWNiLTQxZTEtOThmNy1jZjRhNzgwNTZiMTMiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNDVmOWE3NWUtMzI1NC00NWJkLWE0NzYtOWU2NWUyNjdmNGVkIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjdiYzNkOWM4LWRiYTQtNDVmMy05YWNiLWI3NGM2MzQyYzYyMCIsImlhdCI6MTYxNDc1MTg1MSwiZXhwIjoxNjE0NzUyMTUxfQ.ahdxfM7-WA4u7sotHy6qelc9MkoZytst7oZWsvE7Cr0' -H 'Content-Type: application/json' --data-binary $'{\n "organization_id": "b80b18b1-b5e2-4b4f-b5bc-35398d8dae10",\n "Type": "Data"\n}' --compressed
Example Response
{
"id": "eca1ff8e-8609-48a2-becd-40e9d13300dc",
"uri": "kylo:kylo:cckm:Tenant_Secret:eca1ff8e-8609-48a2-becd-40e9d13300dc",
"account": "kylo:kylo:admin:accounts:kylo",
"createdAt": "2021-07-23T05:29:26.988553739Z",
"updatedAt": "2021-07-23T05:29:26.98710412Z",
"cloud_name": "sfdc",
"organization_id": "00DB000000040bIMAQ",
"error_msg": "",
"sfdc_params": {
"salesforce_id": "02GB0000000HYswMAG",
"created_by_id": "005B00000021BO4IAM",
"last_modified_date": "2021-07-23T05:29:26.000+0000",
"last_modified_by_id": "005B00000021BO4IAM",
"system_modstamp": "2021-07-23T05:29:26.000+0000",
"secret_value_hash": "UNKNOWM=",
"secret_value": "CgMyMzISEKnfsHQqWBk/IND/PXoSoFkaMHdChRNCLK42IWmHXUeDWrA30jI5mWqKoamniRMTtlsIERPUIAWybZG+cNRU6E+Weg==",
"version": 2191,
"status": "ACTIVE",
"source": "HSM",
"type": "Data"
},
"backup_key_id": "f7a4397b885c4cb5a0ace78aa676952b31df08a10eb543f985f6982db56b4502",
"backup_key_name": "00DB000000040bIMAQ:Data:2191:02GB0000000HYswMAG",
"backup_key_tier": "local"
}
The sample output shows that a new Salesforce tenant secret with the resource ID eca1ff8e-8609-48a2-becd-40e9d13300dc
is created and its "status"
is "ACTIVE"
. The resource ID is used to view, update, and delete a Salesforce tenant secret and add and view its versions.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.