Borrower Central (BC)/Information storage
Secrets API
This API allows managing secrets in the system. It provides endpoints to create, read, update, and delete secrets, as well as special handling for the "workflows" secret.
The base path for all endpoints of this API is /v1/stores/secrets.
The Secret Object
The Secret object represents a secret stored in the system.
Attributes
| Attribute | Description | Type |
|---|---|---|
id | Unique identifier of the secret | String |
secret | Object containing the key-value pairs of the secret | Object |
Available Operations
Create a New Secret
Creates a new secret in the system.
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
id | Custom identifier for the secret | String | No |
secret | Object containing the key-value pairs of the secret | Object | Yes |
ttlMinutes | Lifetime of the secret in minutes | Integer | No |
toDeleteAt | Date and time to delete the secret | String | No |
Request Example
Successful Response
Update an Existing Secret
Updates an existing secret in the system. You can update one or more key-value pairs of the secret. Non-existent values will be added, existing values will be updated.
Path Parameters
| Parameter | Description |
|---|---|
secret_id | ID of the secret to update |
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
secret | Object containing the key-value pairs to update | Object | Yes |
Request Example
Successful Response
Status code 204 (No Content) if the update was successful.
Get a Secret
Retrieves the information of a specific secret.
Path Parameters
| Parameter | Description |
|---|---|
secret_id | ID of the secret to retrieve |
Successful Response
Delete a Secret
Deletes a secret from the system.
Path Parameters
| Parameter | Description |
|---|---|
secret_id | ID of the secret to delete |
Successful Response
Status code 204 (No Content) if the deletion was successful.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 500 | Internal Server Error |
Additional Notes
- There is a special secret called "workflows" used to store secrets that will be set as environment variables in the workflow execution environment. Only the "workflow" itself can read the full workflow secret, not even the user can do so.
- It is not possible to delete the "workflows" secret.
- There are reserved keys that cannot be used as secret keys:
ALTSCORE_CLIENT_IDandALTSCORE_CLIENT_SECRET.