Custom API Calls

Execute arbitrary HTTP requests to any APS endpoint. Useful for accessing APIs not yet wrapped by RAPS commands, testing endpoints, or automating custom workflows.

New in v4.5.0

Commands Overview

CommandDescription
raps api getSend a GET request
raps api postSend a POST request
raps api putSend a PUT request
raps api patchSend a PATCH request
raps api deleteSend a DELETE request

raps api get

Send a GET request to an APS endpoint.

raps api get <ENDPOINT> [OPTIONS]

Arguments:

  • ENDPOINT - API endpoint path (e.g., /oss/v2/buckets) or full URL

Options:

  • --query KEY=VALUE - Add query parameters (repeatable)
  • -H, --header KEY:VALUE - Add custom headers (repeatable)
  • -o, --output FILE - Save response body to a file
  • -v, --verbose - Show response headers and status

Examples:

# Get current user profile
raps api get /userprofile/v1/users/@me

# List hubs with verbose output
raps api get /project/v1/hubs --verbose

# Save response to file
raps api get /oss/v2/buckets --output buckets.json

raps api post

Send a POST request with an optional JSON body.

raps api post <ENDPOINT> [OPTIONS]

Arguments:

  • ENDPOINT - API endpoint path or full URL

Options:

  • -d, --data JSON - Inline JSON request body
  • -f, --data-file FILE - Read request body from a file
  • --query KEY=VALUE - Add query parameters (repeatable)
  • -H, --header KEY:VALUE - Add custom headers (repeatable)
  • -o, --output FILE - Save response body to a file
  • -v, --verbose - Show response headers and status

Note: --data and --data-file are mutually exclusive.

Examples:

# Create a bucket with inline JSON
raps api post /oss/v2/buckets \
  -d '{"bucketKey":"my-bucket","policyKey":"transient"}'

# Send body from file
raps api post /issues/v1/containers/PROJECT_ID/quality-issues \
  --data-file issue.json

raps api put

Send a PUT request to replace a resource.

raps api put <ENDPOINT> [OPTIONS]

Same options as raps api post.


raps api patch

Send a PATCH request to partially update a resource.

raps api patch <ENDPOINT> [OPTIONS]

Same options as raps api post.

Example:

# Update a webhook status
raps api patch /webhooks/v1/systems/data/events/dm.version.added/hooks/HOOK_ID \
  -d '{"status":"inactive"}'

raps api delete

Send a DELETE request to remove a resource.

raps api delete <ENDPOINT> [OPTIONS]

Options:

  • --query KEY=VALUE - Add query parameters (repeatable)
  • -H, --header KEY:VALUE - Add custom headers (repeatable)
  • -v, --verbose - Show response headers and status

Note: DELETE requests do not support a request body.

Example:

raps api delete /oss/v2/buckets/my-bucket

MCP Tool

The api_request MCP tool enables AI assistants to make arbitrary API calls:

You: "Call the APS user profile API to get my account details"
AI: Uses api_request tool with GET /userprofile/v1/users/@me