Create Secret
POST
/secrets
const url = 'https://api.mengi.cloud/secrets';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","value":"example","deployment_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","organization_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mengi.cloud/secrets \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "value": "example", "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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
SecretCreate
object
Examplegenerated
{ "name": "example", "value": "example", "deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
SecretResponse
object
Examplegenerated
{ "name": "example", "key": "example", "deployment_id": "example", "database_id": "example", "organization_id": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}