CreateService
Creates an application observability service.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:CreateService |
create |
*Service
|
None | None |
Request syntax
POST /workspace/{workspace}/service HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspace |
string |
Yes |
The workspace name. |
default-cms-1793369865235921-cn-shenzhen |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| serviceName |
string |
Yes |
The service name. |
mag_test |
| serviceType |
string |
Yes |
The service type. Valid values:
|
TRACE |
| displayName |
string |
No |
The display name. This parameter is valid only when serviceType is set to RUM. |
mag test application |
| description |
string |
No |
The service description. This parameter is valid only when serviceType is set to RUM. |
mag test application |
| attributes |
string |
No |
The extended attributes. |
{"language":"java"} |
| serviceStatus |
string |
No |
The service status. You do not need to specify this parameter when creating a service. |
Created |
| pid |
string |
No |
The application ID. Generally, you do not need to specify this parameter. |
bx3udsi5ie@ed2ba6beebdb6de |
| resourceGroupId |
string |
No |
The resource group ID. |
rg-xxxxxxx |
| tags |
array<object> |
No |
The tag array. |
|
|
object |
No |
The tag. |
||
| key |
string |
No |
The tag key. |
env |
| value |
string |
No |
The tag value. |
prod |
Extended attributes: When serviceType is set to TRACE, the optional attribute language is supported. Valid values: java, python, and golang. When serviceType is set to XTRACE, the optional attribute language is supported. For valid values, refer to the open source values of the OpenTelemetry telemetry.sdk.language attribute.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
3A2FA9E9-9CF1-5CB1-A808-52828F14310D |
| serviceId |
string |
The service ID. |
cwzxvuc6uo@4bc6b15ad81f166174ffb |
| pid |
string |
The legacy ARMS application ID for backward compatibility. |
cwzxvuc6uo@d60088ad4797d26 |
Examples
Success response
JSON format
{
"requestId": "3A2FA9E9-9CF1-5CB1-A808-52828F14310D",
"serviceId": "cwzxvuc6uo@4bc6b15ad81f166174ffb",
"pid": "cwzxvuc6uo@d60088ad4797d26"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.