Create a runtime-scoped secret injection rule
const url = 'http://127.0.0.1:8080/v1/runtimes/example/secret-injection-rules';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"host":"example","injection":{"headerName":"example","paramFormat":"example","paramName":"example","value":"example","valueFormat":"example"},"path":"example","secret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/v1/runtimes/example/secret-injection-rules \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "host": "example", "injection": { "headerName": "example", "paramFormat": "example", "paramName": "example", "value": "example", "valueFormat": "example" }, "path": "example", "secret": "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 injection rule creation request.
Secret injection rule creation request.
object
Host pattern.
Injection 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.
Injection 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 ID or display name.
Example generated
{ "host": "example", "injection": { "headerName": "example", "paramFormat": "example", "paramName": "example", "value": "example", "valueFormat": "example" }, "path": "example", "secret": "example"}Responses
Section titled “ Responses ”Response envelope.
Response envelope.
object
Secret injection rule response object.
object
Stored credential display name.
Host pattern that must match before injection.
Stable rule UUID.
Injection config JSON string.
Path pattern that must match before injection.
Runtime display name that owns the rule.
Example generated
{ "data": { "credential_display_name": "example", "host_pattern": "example", "id": "example", "injection_config_json": "example", "path_pattern": "example", "runtime_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" }}