Skip to content

Create Secret

POST
/secrets
curl --request POST \
--url https://api.mengi.cloud/secrets \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "value": "example", "generate": false, "deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Create a new secret.

The secret is stored in OpenBao - nothing is stored in our database.

Media typeapplication/json
SecretCreate
object
name
required
Name
string
value
Value
Any of:
string
generate
Generate
boolean
deployment_id
Deployment Id
Any of:
string format: uuid
organization_id
Organization Id
Any of:
string format: uuid

Successful Response

Media typeapplication/json
SecretResponse
object
name
required
Name
string
key
required
Key
string
deployment_id
Deployment Id
Any of:
string
database_id
Database Id
Any of:
string
organization_id
Organization Id
Any of:
string

Example generated

{
"name": "example",
"key": "example",
"deployment_id": "example",
"database_id": "example",
"organization_id": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}