sentry api
Make raw authenticated API requests to the Sentry API. Similar togh api for GitHub.
Usage
/api/0/ (do not include the prefix). Authentication is handled automatically using your stored credentials.
Arguments
- endpoint (required) - API endpoint relative to
/api/0/(e.g.,organizations/,issues/123/)
Flags
Request Method
-X, --method <method>- HTTP method for the request (default:GET)- Valid methods:
GET,POST,PUT,DELETE,PATCH
- Valid methods:
Request Body Options
Choose one of the following:-d, --data <json>- Inline JSON body (like curl -d)-i, --input <file>- Read body from file (or ”-” for stdin)-F, --field <key=value>- Add a typed parameter (can be used multiple times)-f, --raw-field <key=value>- Add a string parameter without JSON parsing (can be used multiple times)
--field/-F):
key=value- Simple field (values parsed as JSON if valid)key[sub]=value- Nested object:{key: {sub: value}}key[]=value- Array append:{key: [value]}key[]- Empty array:{key: []}
--raw-field/-f to send values as strings without JSON parsing.
Request Headers
-H, --header <Key: Value>- Add HTTP request header (can be used multiple times)
Output Options
--include- Include HTTP response status line and headers in the output--silent- Do not print the response body--verbose- Include full HTTP request and response in the output
Examples
List Organizations
Get Issue Details
Update Issue Status (Inline JSON)
Update Issue Status (Using Fields)
Create Project with Nested Fields
Add Team Member
Read Body from File
Read Body from stdin
Custom Headers
Include Response Headers
Verbose Output (curl-style)
Notes
- The Sentry API requires trailing slashes on endpoints. The command automatically adds them if missing.
- Field flags (
-F/-f) are mutually exclusive with--dataand--input. - For
GETrequests, fields are sent as query parameters. For other methods, they’re sent as JSON body. - Arrays in field syntax:
key[]=value1 -F key[]=value2creates{key: [value1, value2]} - The command exits with code 1 for HTTP 4xx/5xx responses.
- Response bodies are automatically pretty-printed as JSON when applicable.
Related Commands
sentry auth login- Authenticate with Sentrysentry auth status- Check authentication status