---
url: /en/develops/openapi.md
description: >
  Introduces CNB OpenAPI — service endpoint, API documentation, authentication
  format, and a curl request example.
---
## API Service Address

The API service and documentation address is `https://api.cnbprod.alpha.qq.com`.

## API Documentation Addresses

* OpenAPI documentation page: [`https://api.cnbprod.alpha.qq.com`](https://api.cnbprod.alpha.qq.com)
* Swagger JSON: [`https://api.cnbprod.alpha.qq.com/swagger.json`](https://api.cnbprod.alpha.qq.com/swagger.json)

## Calling Methods

### Header Information

* `Authorization`: Used for authentication, format: `Bearer ${token}`,
  where `${token}` is the [access token](../guide/access-token.md).
* `Accept`: Fill in the corresponding value based on the optional types
  listed under **Response content type** in the API documentation, e.g. `application/json`.

### Request Example

curl request example:

```shell
curl -X "GET" \
  -H "accept: application/json" \
  -H "Authorization: Bearer 1Z00000000000000000000000vA" \
  "https://api.cnbprod.alpha.qq.com/user/groups?page=1&page_size=10"
```

Response example:

```json
[
  {
    "id": 1816756487609032700,
    "name": "test",
    "remark": "Test organization",
    "description": "",
    "site": "",
    "email": "",
    "freeze": false,
    "wechat_mp": "hello-world",
    "created_at": "2024-07-26T08:44:35Z",
    "updated_at": "2024-08-13T07:32:13Z",
    "follow_count": 0,
    "member_count": 4,
    "all_member_count": 4,
    "sub_group_count": 5,
    "sub_repo_count": 7,
    "sub_mission_count": 1,
    "all_sub_group_count": 13,
    "all_sub_repo_count": 12,
    "all_sub_mission_count": 1,
    "has_sub_group": true,
    "path": "test",
    "access_role": "Owner"
  }
]
```

For repository events related APIs, see [Repository Events](./openapi-event.md).
