Export¶
GET /api/v1/service_manage/export
Overview¶
Export the service list configuration of the current workspace as JSON.
Prerequisites and Usage Steps¶
Use originStr to select between configuration text and an object. The server always fetches the first page with 10,000 entries per page. On success, the response root is a service object array directly; save the complete response and read it on the client side. To traverse more than 10,000 entries, use the list API for pagination. When the workspace has no service list, the root returns an empty collection object containing data and pageInfo.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or fill in: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace. |
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| originStr | string | Configuration return format. Defaults to 1, where serviceCatelog is a TOML string; 0 returns the parsed object. The server reads it as an integer, so use 0 or 1. Null allowed: False Example: 0How to obtain or fill in: Pass the string 0 when the configuration needs to be read by a program, or the string 1 to keep the original TOML text. |
Additional Parameter Notes¶
Content-Type is application/json. The originStr=0 example returns a structured configuration. The exported service fields are the same as those in the list, and the current export limit is 10,000 entries.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/service_manage/export' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode originStr=0
Response¶
HTTP 200, Content-Type is application/json. The example below shows the response root, which is read as an array or an empty collection object.
| Field | Type | Description |
|---|---|---|
| $ | object array or object | A service object array when data exists; the pagination object described below when the collection is empty. |
| [].uuid | string | Service list UUID, used later for details, modification, and deletion. |
| [].service | string | Service name, bound to the service in tracing data. |
| [].type | string | Service category. |
| [].colour | string | Service display color. |
| [].language | string | Service language identifier, may be an empty string. |
| [].createAt | number | Creation time, in Unix seconds. |
| [].updateAt | number | Update time, in Unix seconds; may be -1 when not yet updated. |
| [].creatorInfo | object | Creator identity profile; an empty object when not found. |
| [].updatorInfo | object | Last updater identity profile; an empty object when not found. |
| [].creatorInfo.uuid | string | May be provided when the identity is found. Identity identifier. |
| [].creatorInfo.status | integer | May be provided when the identity is found. Account status. |
| [].creatorInfo.wsAccountStatus | integer | May be provided when the identity is found. Workspace member status. |
| [].creatorInfo.username | string | May be provided when the identity is found. Login name. |
| [].creatorInfo.name | string | May be provided when the identity is found. Display name. |
| [].creatorInfo.iconUrl | string | May be provided when the identity is found. Avatar URL. |
| [].creatorInfo.email | string | May be provided when the identity is found. Account email. API Key identities may return their identifier. |
| [].creatorInfo.mobile | string | May be provided when the identity is found. Contact number. |
| [].creatorInfo.countryCode | string | May be provided when the identity is found. Phone country or region code. |
| [].creatorInfo.acntWsNickname | string | May be provided when the identity is found. Nickname in the workspace. |
| [].updatorInfo.uuid | string | May be provided when the identity is found. Identity identifier. |
| [].updatorInfo.status | integer | May be provided when the identity is found. Account status. |
| [].updatorInfo.wsAccountStatus | integer | May be provided when the identity is found. Workspace member status. |
| [].updatorInfo.username | string | May be provided when the identity is found. Login name. |
| [].updatorInfo.name | string | May be provided when the identity is found. Display name. |
| [].updatorInfo.iconUrl | string | May be provided when the identity is found. Avatar URL. |
| [].updatorInfo.email | string | May be provided when the identity is found. Account email. API Key identities may return their identifier. |
| [].updatorInfo.mobile | string | May be provided when the identity is found. Contact number. |
| [].updatorInfo.countryCode | string | May be provided when the identity is found. Phone country or region code. |
| [].updatorInfo.acntWsNickname | string | May be provided when the identity is found. Nickname in the workspace. |
| [].serviceCatelog | string or object | Returns a TOML string when originStr=1, and the configuration object below when originStr=0. |
| [].serviceCatelog.Team | object | Service and team configuration. |
| [].serviceCatelog.Team.service | string | Service name. |
| [].serviceCatelog.Team.type | string | Service category; invalid categories are handled according to the API rules on write. |
| [].serviceCatelog.Team.colour | string | Service display color. |
| [].serviceCatelog.Team.team | string | Name of the team it belongs to. |
| [].serviceCatelog.Team.oncall | array<object> |
Contact methods. |
| [].serviceCatelog.Team.oncall[].name | string | Display name of the contact method. |
| [].serviceCatelog.Team.oncall[].type | string | email, mobile, or slack. |
| [].serviceCatelog.Team.oncall[].emails | array<string> |
Email addresses of the email contact method. |
| [].serviceCatelog.Team.oncall[].mobiles | array<string> |
Phone numbers of the mobile contact method. |
| [].serviceCatelog.Team.oncall[].slack | string | Slack channel address. |
| [].serviceCatelog.Repos | array<object> |
List of code repositories. |
| [].serviceCatelog.Repos[].name | string | Repository display name. |
| [].serviceCatelog.Repos[].link | string | Repository URL. |
| [].serviceCatelog.Repos[].provider | string | Provider display name. |
| [].serviceCatelog.Docs | array<object> |
List of operation documents. |
| [].serviceCatelog.Docs[].name | string | Document display name. |
| [].serviceCatelog.Docs[].link | string | Document URL. |
| [].serviceCatelog.Docs[].provider | string | Document provider display name. |
| [].serviceCatelog.Related | object | Associated applications, built-in views, and scene tags. |
| [].serviceCatelog.Related.AppId | string | Real User Monitoring (RUM) application ID, may be empty. |
| [].serviceCatelog.Related.DashboardUUIDs | array<string> |
Associated built-in view UUIDs. |
| [].serviceCatelog.Related.Tags | array<string> |
Scene tag names. |
| [].dfStatus | string | Associated event status; defaults to ok when not loaded or no value is present. |
| [].isFavorite | boolean | Favorite status of the current identity. |
| [].createType | string | Creation source, which can be manual, openapi, or automatic; may be omitted for other identities. |
| automaticFoundTime | string or null | Time of the most recent automatic discovery job in the empty collection object. |
| data | array<object> |
Empty array in the empty collection branch. |
| pageInfo | object | Pagination information in the empty collection branch, with pageIndex=1 and pageSize=10000. |
| pageInfo.pageIndex | integer | Current page number. |
| pageInfo.pageSize | integer | Page size. |
| pageInfo.count | integer | Number of entries returned on the current page. |
| pageInfo.totalCount | integer | Total number of entries matching the filter conditions. |
| Response Header | Type | Description |
|---|---|---|
| Content-Type | string | application/json on success. |
[
{
"uuid": "sman_example",
"createAt": 1785427200,
"updateAt": -1,
"creatorInfo": {},
"colour": "#40C9C9",
"updatorInfo": {},
"dfStatus": "ok",
"language": "",
"isFavorite": false,
"createType": "openapi",
"service": "checkout",
"type": "web",
"serviceCatelog": {
"Team": {
"service": "checkout",
"type": "web",
"team": "team-commerce",
"colour": "#40C9C9",
"oncall": [
{
"name": "On-call email",
"type": "email",
"emails": [
"xxx@guance.com"
]
}
]
},
"Repos": [
{
"name": "Business repository",
"link": "https://example.invalid/repos/checkout",
"provider": "Git"
}
],
"Docs": [
{
"name": "Runbook",
"link": "https://example.invalid/help/checkout",
"provider": "Wiki"
}
],
"Related": {
"AppId": "",
"Tags": [
"team:commerce"
],
"DashboardUUIDs": []
}
}
}
]
HTTP 200 response when there is no service configuration
{
"automaticFoundTime": null,
"data": [],
"pageInfo": {
"pageIndex": 1,
"pageSize": 10000,
"count": 0,
"totalCount": 0
}
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | An undeclared Query parameter is used, or a parameter violates the rules | Parameter parsing failed | Check the Query parameter table and the examples. |
| 500 | ft.InternalServerError | originStr cannot be converted to an integer | Internal error | Use the string 0 or 1; record the traceId for troubleshooting. |