bee api
Overview
Section titled “Overview”Make an authenticated API request
The endpoint is a Backlog API path (e.g. users/myself). A leading /api/v2/ prefix is stripped automatically.
-f infers types (number, boolean, string); -F always sends strings. A value is only inferred as a number when the number prints back identically, so 1.0, 0042 and 0x10 stay strings. Repeated keys become arrays. Append [] for a single-element array (e.g. -f projectId[]=12345).
If a -f value starts with @, the rest of the value is interpreted as a filename to read the value from. Pass - to read from standard input (e.g. -f 'key=@-'). File and stdin content is always sent as a string, without type inference.
For GET, fields are query parameters. For POST/PUT/PATCH/DELETE, fields are the request body.
bee api [flags] <ENDPOINT>Arguments
Section titled “Arguments”ENDPOINT- API endpoint path
-X,--method <method>- HTTP method (default:
GET) -f,--field <key=value>- Add a typed parameter (use "@<path>" or "@-" to read value from file or stdin)
-F,--raw-field <key=value>- Add a string parameter (key=value, repeatable)
--json <fields>- Output as JSON (optionally filter by field names, comma-separated)
--silent- Do not print the response body
-s,--space <hostname>- Space hostname (e.g. xxx.backlog.com, or your own domain)
-y,--yes- Skip confirmation prompt
Examples
Section titled “Examples”Get your user profile
bee api users/myselfList issues in a project
bee api issues -f 'projectId[]=12345' -f count=5Filter by multiple statuses
bee api issues -f 'projectId[]=12345' -f statusId=1 -f statusId=2Create an issue
bee api issues -X POST -f projectId=12345 -f summary="Test issue" -f issueTypeId=1 -f priorityId=3Set a field value from a file
bee api issues/PROJECT-1 -X PATCH -f 'description=@desc.md'Pipe content from stdin
echo 'Hello' | bee api issues/PROJECT-1/comments -X POST -f 'content=@-'Select specific fields
bee api users/myself --json id,name,mailAddressEnvironment variables
Section titled “Environment variables”BACKLOG_SPACE- Space hostname (e.g. xxx.backlog.com, or your own domain)
BACKLOG_API_KEY- Authenticate with an API key
BACKLOG_SPACE- Space hostname