Skip to content

Credential stacks

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

GET /credential-stacks

Every credential stack of the tenant.

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

Response: CredentialStack[] (200)

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

Creates a stack and returns it, with its id. Refused with ValidationError when the name is taken, an entry names a credential the tenant hasn’t got, or the plan’s stack limit is reached.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Request body: CredentialStackRequest

FieldTypeRequiredDescription
namestring
descriptionstring | null
entriesCredentialStackEntryInput[]In the order they’re tried. Each names a credential in the same tenant.

Response: CredentialStack (200)

curl -X POST "https://api.maitento.com/credential-stacks" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"...","description":"...","entries":[]}'
DELETE /credential-stacks/by-id/{id}

Deletes a stack. Refused with ValidationError while it’s the tenant’s or a namespace’s default.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

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

The stack 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: CredentialStack (200)

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

Replaces a stack’s name, description and entries. Runs already going keep the version they started with.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: CredentialStackRequest

FieldTypeRequiredDescription
namestring
descriptionstring | null
entriesCredentialStackEntryInput[]In the order they’re tried. Each names a credential in the same tenant.

Response: CredentialStack (200)

curl -X PUT "https://api.maitento.com/credential-stacks/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"...","description":"...","entries":[]}'
GET /credential-stacks/by-id/{id}/usage

Where the stack is used: whether it’s the tenant’s default, the namespaces whose default it is, and the knowledge bases that embed with it. While any of these use it, it can’t be deleted.

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: CredentialStackUsage (200)

curl -X GET "https://api.maitento.com/credential-stacks/by-id/<id>/usage" \
-H "Authorization: $MAITENTO_AUTH"
GET /credential-stacks/by-name/{name}

The stack with this name (unique in the tenant), or null.

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: CredentialStack (200)

curl -X GET "https://api.maitento.com/credential-stacks/by-name/<name>" \
-H "Authorization: $MAITENTO_AUTH"
GET /namespaces/by-id/{id}/default-credential-stack

A namespace’s default stack: the one runs of its definitions use when neither their start nor definition names one.

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: DefaultCredentialStack (200)

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

Sets a namespace’s default stack, by id; null clears it, so the tenant’s default applies.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: DefaultCredentialStackInput

FieldTypeRequiredDescription
credentialStackIduuid | null

Response: DefaultCredentialStack (200)

curl -X PUT "https://api.maitento.com/namespaces/by-id/<id>/default-credential-stack" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"credentialStackId":"..."}'
GET /tenants/self/default-credential-stack

The tenant’s default stack: the one runs use when neither their start, definition nor namespace names one.

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

Response: DefaultCredentialStack (200)

curl -X GET "https://api.maitento.com/tenants/self/default-credential-stack" \
-H "Authorization: $MAITENTO_AUTH"
PUT /tenants/self/default-credential-stack

Sets the tenant’s default stack, by id; null clears it.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Request body: DefaultCredentialStackInput

FieldTypeRequiredDescription
credentialStackIduuid | null

Response: DefaultCredentialStack (200)

curl -X PUT "https://api.maitento.com/tenants/self/default-credential-stack" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"credentialStackId":"..."}'