Create a secret Run in API Explorer
Body
-
User-defined name of the secret.
-
User-defined key/value metadata.
-
Base64-url-safe-encoded (RFC 4648) data to store as secret.
This field is only used to create a secret, and is not returned by other endpoints.
-
Name of the secrets driver used to fetch the secret's value from an external secret store.
-
Name of the secrets driver used to fetch the secret's value from an external secret store.
POST
/secrets/create
curl \
--request POST 'http://api.example.com/v1.44/secrets/create' \
--header "Content-Type: application/json" \
--data '{"Name":"string","Labels":{"com.example.some-label":"some-value","com.example.some-other-label":"some-other-value"},"Data":"string","Driver":{"Name":"some-driver","Options":{"OptionA":"value for driver-specific option A","OptionB":"value for driver-specific option B"}},"Templating":{"Name":"some-driver","Options":{"OptionA":"value for driver-specific option A","OptionB":"value for driver-specific option B"}}}'
Request examples
{
"Name": "string",
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Data": "string",
"Driver": {
"Name": "some-driver",
"Options": {
"OptionA": "value for driver-specific option A",
"OptionB": "value for driver-specific option B"
}
},
"Templating": {
"Name": "some-driver",
"Options": {
"OptionA": "value for driver-specific option A",
"OptionB": "value for driver-specific option B"
}
}
}
Response examples (201)
{
"Id": "string"
}
Response examples (409)
{
"message": "Something went wrong."
}
Response examples (409)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (503)
{
"message": "Something went wrong."
}
Response examples (503)
{
"message": "Something went wrong."
}