Secrets

Send an HTTPS request with a stored API key, without seeing the key

Changed on

Calls a service with an API key stored in the organization's secrets. Name the secret in the path (see the list of secrets shared with you), and give the method, the https address on that key's service, and optional headers and body. OpenWork Cloud adds the key, sends the request without following redirects, and returns the status, a few headers and the body, with the key replaced wherever it appears. The key is never returned. The address must be on the key's exact host. An agent cannot approve the use itself: when the answer is approval_required, tell the person that the secret needs their rule set to always (openwork secrets my-rule <name> --rule always) or an admin to allow it, and do not retry until they have. Every refusal and every use is recorded for the organization.

post/v1/org/secrets/{secretId}/http-request

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Path parameters

secretId, string required

Request body

BrokerHttpWithOrganizationSecretRequest required
url, string required
method, 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' required
headers, object
body, string
agentId, string typeid

Den TypeID with 'pga_' prefix and a 26-character base32 suffix.

client, 'cli' | 'desktop'
approval, 'once' | 'always'

Response

The response, with the key replaced.

BrokerHttpWithOrganizationSecretResponse required
status, integer required
headers, object required
body, string required
truncated, boolean required

Changes

    • info

      api operation id brokerHttpRequestWithOrganizationSecret removed and replaced with sendRequestWithOrganizationSecret

    • warning

      removed the request property surface

    • info

      added the new optional request property client

    2 more changes in this revision