Skip to content

Create a tenant default secret stub

POST
/v1/default-secret-stubs
curl --request POST \
--url http://127.0.0.1:8080/v1/default-secret-stubs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "host": "example", "config": { "headerName": "example", "paramFormat": "example", "paramName": "example", "value": "example", "valueFormat": "example" }, "path": "example", "stub_value": "example" }'

Secret stub creation request.

Media type application/json

Secret stub creation request.

object
host
required

Host pattern.

string
config
required
Any of:

Stub config JSON value.

object
headerName
required

Request header name to set.

string
>= 1 characters
paramFormat

Query parameter value template. ${credential} and {value} are replaced with the secret value.

string
paramName

Query parameter name to set.

string
>= 1 characters
value

Shared value template used when valueFormat or paramFormat is absent.

string
valueFormat

Header value template. ${credential} and {value} are replaced with the secret value.

string
key
additional properties
any
path

Optional path pattern.

string
nullable
stub_value
required

Secret stub value ID or display name.

string
Example generated
{
"host": "example",
"config": {
"headerName": "example",
"paramFormat": "example",
"paramName": "example",
"value": "example",
"valueFormat": "example"
},
"path": "example",
"stub_value": "example"
}

Response envelope.

Media type application/json

Response envelope.

object
data
required

Tenant default secret stub copied to new runtimes.

object
host_pattern
required

Host pattern that must match before injection.

string
id
required

Stable default stub UUID.

string
path_pattern
required

Path pattern that must match before injection.

string
stub_config_json
required

Stub config JSON string.

string
stub_value_display_name
required

Stored stub value display name.

string
Example generated
{
"data": {
"host_pattern": "example",
"id": "example",
"path_pattern": "example",
"stub_config_json": "example",
"stub_value_display_name": "example"
}
}

Missing, malformed, or rejected bearer token

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

The bearer token is not allowed to perform this action

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

The requested resource was not found

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

The request conflicts with current resource state

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

Validation or application error

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

Rate limit exceeded

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

Upstream service is unavailable

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

Upstream request timed out

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}

Error response

Media type application/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied rate_limited unauthenticated unavailable unimplemented
message
required
string
Example
{
"error": {
"code": "already_exists"
}
}