Get Current Workspace Information¶
GET /api/v1/workspace/get
Overview¶
Retrieves basic information about the workspace that the current API Key belongs to.
Prerequisites and Usage Steps¶
The request requires no workspace UUID or query parameter. Use the uuid in the response to obtain the workspace corresponding to the calling identity. Workspace configuration may be served from cache for a short period, and serverTime in the response is the server time. The fields below and the example show a selection of commonly used fields; treat workspace credentials and service configuration in the response as sensitive information.
Select the OpenAPI address of your site from the site domain table.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI Key credential of the workspace. Use the full key value, not the UUID of the API Key record. Example: <DF-API-KEY>How to obtain or enter: Create or obtain a Key with permission for this API in API Key Management of the target workspace. |
Additional Parameter Notes¶
The workspace is determined by the DF-API-KEY in the request.
Request Example¶
Response¶
HTTP 200, application/json.
| Field | Type | Description |
|---|---|---|
| content.uuid | string | Workspace UUID. Use it later in the workspace_uuid path or the workspaceUUID request field of an API. |
| content.name | string | Display name of the workspace. |
| content.desc | string | Description of the workspace. |
| content.status | integer | Workspace status. |
| content.timezone | string | Workspace time zone, for example Asia/Shanghai. |
| content.language | string | Workspace language setting. |
| content.versionType | string | Workspace version type. |
| content.regionCode | string | Site identifier. |
| content.memberCount | integer | Total count of the workspace and its associated team members. |
| content.note | string | Note about the calling identity in the workspace. |
| content.logoUrl | string | Workspace Logo URL, which may be empty. |
| content.faviconUrl | string | Workspace icon URL, which may be empty. |
| content.serverTime | integer | Server Unix time when the response was generated, in milliseconds. When the cache is hit, the previous value is reused. |
| content.datastore | object | Data storage configuration of the workspace. |
| content.durationSet | object | Retention settings for different data types in the workspace. |
| content.leftWildcard | boolean | Whether left wildcard queries are enabled. |
| content.logMultipleIndexCount | integer | Log multi-index count configuration of the workspace. |
| content.durationUpdatedToday | boolean | true if the retention settings have been modified today; present only when this condition is met. |
| content.declaration | object or null | Public declaration information of the workspace. |
| content.token | string | Data write credential of the workspace. Masked according to permissions when workspace.tokenRead is missing; keep the value in the response confidential. |
{
"code": 200,
"content": {
"uuid": "wksp_example",
"name": "Production Monitoring",
"desc": "Production service observability",
"status": 0,
"timezone": "Asia/Shanghai",
"language": "zh",
"versionType": "pay",
"regionCode": "console",
"memberCount": 3,
"note": "",
"logoUrl": "",
"faviconUrl": "",
"serverTime": 1785456000000
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.NotFoundWorkspace | The workspace corresponding to the API Key does not exist or is unavailable | Workspace does not exist. | Check the API Key and the status of the workspace it belongs to. |