Store or replace a runtime-scoped secret stub
const url = 'http://127.0.0.1:8080/v1/runtimes/example/secret-stubs';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"host":"example","config":{"headerName":"example","paramFormat":"example","paramName":"example","value":"example","valueFormat":"example"},"path":"example","stub_value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:8080/v1/runtimes/example/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" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Runtime UUID or display name.
Runtime UUID or display name.
Request Body required
Section titled “Request Body required ”Secret stub set request.
Secret stub creation request.
object
Host pattern.
Stub config JSON value.
object
Request header name to set.
Query parameter value template. ${credential} and {value} are replaced with the secret value.
Query parameter name to set.
Shared value template used when valueFormat or paramFormat is absent.
Header value template. ${credential} and {value} are replaced with the secret value.
Stub config JSON value.
object
Request header name to set.
Query parameter value template. ${credential} and {value} are replaced with the secret value.
Query parameter name to set.
Shared value template used when valueFormat or paramFormat is absent.
Header value template. ${credential} and {value} are replaced with the secret value.
Optional path pattern.
Secret stub value ID or display name.
Example generated
{ "host": "example", "config": { "headerName": "example", "paramFormat": "example", "paramName": "example", "value": "example", "valueFormat": "example" }, "path": "example", "stub_value": "example"}Responses
Section titled “ Responses ”Response envelope.
Response envelope.
object
Secret stub response object.
object
Host pattern that must match before injection.
Stable stub UUID.
Path pattern that must match before injection.
Runtime display name that owns the stub.
Stub config JSON string.
Stored stub value display name.
Example generated
{ "data": { "host_pattern": "example", "id": "example", "path_pattern": "example", "runtime_display_name": "example", "stub_config_json": "example", "stub_value_display_name": "example" }}Missing, malformed, or rejected bearer token
object
object
Example
{ "error": { "code": "already_exists" }}The bearer token is not allowed to perform this action
object
object
Example
{ "error": { "code": "already_exists" }}The requested resource was not found
object
object
Example
{ "error": { "code": "already_exists" }}The request conflicts with current resource state
object
object
Example
{ "error": { "code": "already_exists" }}Validation or application error
object
object
Example
{ "error": { "code": "already_exists" }}Rate limit exceeded
object
object
Example
{ "error": { "code": "already_exists" }}Upstream service is unavailable
object
object
Example
{ "error": { "code": "already_exists" }}Upstream request timed out
object
object
Example
{ "error": { "code": "already_exists" }}default
Section titled “default ”Error response
object
object
Example
{ "error": { "code": "already_exists" }}