Skip to content

Secrets

6 calls. Every request needs the Authorization header: see the overview.

GET /secrets

Every secret (names only, never values).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Response: Secret[] (200)

curl -X GET "https://api.maitento.com/secrets" \
-H "Authorization: $MAITENTO_AUTH"
POST /secrets

Creates a secret.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Request body: SecretCreateRequest

FieldTypeRequiredDescription
namestringyesThe secret’s name, which definitions use to refer to it.
valuestringyesThe secret value, kept exactly as sent (whitespace included). It is never returned.

Response: Secret (200)

curl -X POST "https://api.maitento.com/secrets" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"...","value":"..."}'
DELETE /secrets/by-id/{id}

Deletes a secret.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (200)

curl -X DELETE "https://api.maitento.com/secrets/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /secrets/by-id/{id}

The secret with this id. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: Secret (200)

curl -X GET "https://api.maitento.com/secrets/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
PUT /secrets/by-id/{id}

Renames a secret and, when value is given, replaces its value.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: SecretUpdateRequest

FieldTypeRequiredDescription
namestringyesThe secret’s name.
valuestring | nullA new value, kept exactly as sent. Null or omitted: the stored value is kept.

Response: Secret (200)

curl -X PUT "https://api.maitento.com/secrets/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"..."}'
GET /secrets/by-name/{name}

The secret with this name. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namestringyes

Response: Secret (200)

curl -X GET "https://api.maitento.com/secrets/by-name/<name>" \
-H "Authorization: $MAITENTO_AUTH"