Commands
api
Make direct API calls to Sentry’s REST API.
Commands
sentry api
Execute an API request.
sentry api <endpoint> [options]Arguments:
| Argument | Description |
|---|---|
<endpoint> | API endpoint path (e.g., /organizations/) |
Options:
| Option | Description |
|---|---|
--method <method> | HTTP method (GET, POST, PUT, DELETE). Default: GET |
--field <key=value> | Add a field to the request body (can be used multiple times) |
--header <key:value> | Add a custom header (can be used multiple times) |
--include | Include response headers in output |
--paginate | Automatically paginate through all results |
Examples
GET Request
# List organizationssentry api /organizations/
# Get a specific organizationsentry api /organizations/my-org/
# Get project detailssentry api /projects/my-org/my-project/POST Request
# Create a new projectsentry api /teams/my-org/my-team/projects/ \ --method POST \ --field name="New Project" \ --field platform=javascriptPUT Request
# Update an issue statussentry api /issues/123456789/ \ --method PUT \ --field status=resolved
# Assign an issuesentry api /issues/123456789/ \ --method PUT \ --field assignedTo="user@example.com"DELETE Request
# Delete a projectsentry api /projects/my-org/my-project/ \ --method DELETEWith Headers
sentry api /organizations/ \ --header "X-Custom-Header:value"Show Response Headers
sentry api /organizations/ --includeHTTP/2 200content-type: application/jsonx-sentry-rate-limit-remaining: 95
[{"slug": "my-org", ...}]Pagination
# Get all issues (automatically follows pagination)sentry api /projects/my-org/my-project/issues/ --paginateAPI Documentation
For full API documentation, see the Sentry API Reference.