Skip to main content

REST API (AWS Secrets Manager)

Call a REST API from AWS Glue. The auth mode is data-driven; credentials come from one AWS Secrets Manager secret.

To use this connection type within the API, use a ConnectionTypeCode of REST-SECRET.

Variable Reference​

The following variables are supported:

  • RestAuthType - (Required) How the API is authenticated. Anonymous needs no secret. Secret keys, ? if optional: api-key-query 'param_name', 'api_key'; oauth2-refresh-token 'token_url', 'client_id', 'refresh_token', 'client_secret'? (see Secret Name); oauth2-jwt-bearer 'token_url', 'private_key' (RSA PEM), 'claims' (iss, sub, aud), 'client_id'?, 'client_secret'?. OAuth secrets may add 'scope', 'token_params'; any may add 'headers'.

  • RestBaseUrl - (Required) The service root the relative URL is appended to. Example: https://api.example.com/v2

  • RestDefaultHeaders - (Optional) JSON object of non-secret headers sent on every request, e.g. {"Accept": "application/json"}. Overrides the auth headers and the secret's 'headers'; the task's Request Headers override it. Keep secret values in the secret's 'headers'.

  • RestOAuthClientAuth - (Optional) How oauth2, oauth2-refresh-token and oauth2-jwt-bearer send the client ID and secret to the token endpoint: body (form fields) or basic (an Authorization: Basic header). Defaults to body. For oauth2-jwt-bearer it applies only when the secret holds 'client_id'.

  • RestSecretName - (Optional) Name or ARN of the AWS Secrets Manager secret holding the credentials. Required unless the authentication type is anonymous. For oauth2-refresh-token it must live under <prefix>/<environment>/oauth-refresh/, the only path the job can write. The job writes the rotated 'refresh_token' and its own 'access_token' and 'access_token_refresh_at' back to it.