Skip to main content

Secret Service

The secret resource contains all your companys secrets

Secret REST API

The Secret REST API is a full CRUD API allowing you to search and filter secrets as well as create, update and delete them. It is accessed through the following URL:

https://api.opendatadsl.com/api/secret

The API consists of the following calls:

MethodPathExampleDescription
GETGet the build information for this service
GET{release}v1List all secrets (without listing the secret values)
GET{release}/{key}v1/TESTRetrieve a single secret using its unique id
POST{release}v1Create or update a secret, the secret is the body of the POST request
DELETE{release}/{key}v1/TESTDelete a secret

Entities

Secret Entity

The secret entity contains the following information:

NameTypeDescription
_idStringThe unique identifier for this secret
_typeStringThe type of the secret - always VarSecret
valueStringThe actual secret
enabledBooleanA boolean to enable or disable this secret, defaults to true
notBeforeStringAn optional date string indicating when this secret is valid from
expiresStringAn optional date string indicating when this secret is valid to

Examples

Below are some examples of secrets:

List my companies secrets

GET https://api.opendatadsl.com/api/secret/v1

Create a new secret

POST https://api.opendatadsl.com/api/secret/v1

{
"_type": "VarSecret",
"_id": "example1",
"value": "mysecret",
"enabled": true,
"notBefore": "2024-06-05",
"expires": "2024-12-31"
}

Retrieve a secret

GET https://api.opendatadsl.com/api/secret/v1/example1

Delete a secret

DELETE https://api.opendatadsl.com/api/secret/v1/example1