Skip to main content
OpenAPI

Conventions

Common conventions for the Teams OpenAPI: endpoints, naming, time, pagination, errors, and authentication. These conventions apply to all Teams OpenAPI endpoints. Endpoint-specific rules take precedence where documented.

Service endpoint

Production Base URL:
https://api.qoder.com.cn
Full request example:
https://api.qoder.com.cn/v1/organizations/{organization_id}/members
Enterprise VPC customers must use the Base URL of their dedicated instance:
https://{instance-id}-api.vpc.qoder.com.cn
{instance-id} is the unique identifier of the dedicated enterprise instance. For example, an instance identified as acme uses https://acme-api.vpc.qoder.com.cn.
Find this domain on the domain configuration page in the Enterprise VPC instance console. Only the Base URL differs from the public edition; paths, request parameters, and authentication remain the same.

Field naming

JSON request and response fields use lowerCamelCase, for example: organizationId, repositoryUrl, createdAt, maxResults, and nextToken.

Time format

Timestamps use ISO 8601 (RFC 3339), for example:
2025-01-01T00:00:00Z
Some endpoints also accept Unix timestamps in milliseconds. Refer to the endpoint's parameter documentation.

Cursor pagination

List endpoints generally use cursor pagination controlled by query parameters.

Request query parameters

ParameterTypeRequiredDefaultDescription
maxResultsintegerNo20Maximum items per page; upper limit 100
nextTokenstringNoCursor from the previous response; omit on the first request
Usage endpoints use nextToken for cursor pagination unless otherwise documented.

Response fields

FieldTypeDescription
maxResultsintegerRequested page size for the current page
nextTokenstringCursor for the next page; omitted or empty when no more data remains
List responses do not guarantee a total count (totalCount). Continue until the cursor is empty.

Error response

Errors use a non-2xx HTTP status and a JSON response body without a top-level field named status:
{
  "requestId": "req_abc123",
  "code": "NotFound",
  "message": "resource not found",
  "details": ["the requested resource does not exist"]
}

Error fields

FieldTypeRequiredDescription
requestIdstringYesRequest trace ID; provide it to support when troubleshooting
codestringYesStable error code for programmatic branching
messagestringYesHuman-readable explanation
detailsarrayNoAdditional information; omitted when empty

Common HTTP and code mappings

HTTP statusExample codeDescription
400BadRequestInvalid parameters
401UnauthorizedAPI Key missing or invalid
403ForbiddenAccess to the organization or resource is denied
404NotFoundResource does not exist
409AlreadyExistsResource conflict
500InternalErrorServer error
Gateways or service layers may transform errors. Use the actual combination of HTTP status and code; do not branch on the status alone.

Authentication

Every request must include this HTTP header:
Authorization: Bearer <api_key>
Replace api_key with a key created in the console. Never embed a real key in a publicly decompilable client package or public repository. For instructions, see Obtain API Key.

Organization base path

Most endpoints extend this path:
/v1/organizations/{organization_id}
organization_id is the path parameter identifying the target organization. See the member, usage, and AI code metrics documentation for endpoint-specific subpaths.