Retrieves information about a namespace or code group by ID or path.
Service endpoints and authorization
- Get a service endpoint to replace {domain} in the API request syntax.
- Get a personal access token.
|
Product |
Resource |
Required permissions |
|
Codeup |
code group |
read-only |
Request syntax
Region edition
GET https://{domain}/oapi/v1/codeup/namespaces/{namespaceId}
Request headers
|
Parameter |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example |
|
namespaceId |
string |
path |
Yes |
The ID or full path of the namespace, which can be a code group. |
1 |
Request examples
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/namespaces/1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
object |
|
|
| avatarUrl |
string |
The URL of the avatar. |
https://example/example/w/100/h/100 |
| fullPath |
string |
The full path of the namespace. |
60de7a6852743a5162b5f957/DemoGroup |
| id |
integer |
The ID of the namespace. |
1 |
| kind |
string |
The resource type. Default value: group. |
group |
| name |
string |
The name of the namespace. |
DemoGroup |
| nameWithNamespace |
string |
The full name, including the parent namespace. |
60de7a6852743a5162b5f957 / DemoGroup |
| parentId |
integer |
The ID of the parent namespace. |
2 |
| path |
string |
The path of the namespace. |
DemoGroup |
| pathWithNamespace |
string |
The path of the namespace, including its parent namespaces. |
60de7a6852743a5162b5f957/DemoGroup |
| visibility |
string |
The visibility level. Valid values: private and internal. |
private |
| webUrl |
string |
The web URL of the namespace. |
http://example.com/60de7a6852743a5162b5f957/DemoGroup |
Response example
{
"avatarUrl": "https://example/example/w/100/h/100",
"fullPath": "60de7a6852743a5162b5f957/DemoGroup",
"id": 1,
"kind": "group",
"name": "DemoGroup",
"nameWithNamespace": "60de7a6852743a5162b5f957 / DemoGroup",
"parentId": 2,
"path": "DemoGroup",
"pathWithNamespace": "60de7a6852743a5162b5f957/DemoGroup",
"visibility": "private",
"webUrl": "http://example.com/60de7a6852743a5162b5f957/DemoGroup"
}
Error codes
See the Error Center for a list of API error codes.