Querying Service Group Details¶
Function¶
This API is used to query details about a service group.
URI¶
GET /v1/{project_id}/service-sets/{set_id}
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
set_id | Yes | String | Service group ID, which can be obtained by calling the API for querying the service group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects). |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to Obtaining an Enterprise Project ID. If the enterprise project function is not enabled, the value is 0. |
fw_instance_id | No | String | Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
query_service_set_type | No | Integer | Type of the service group to be queried: 0 (user-defined service group), 1 (predefined service group). |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type | Yes | String | Content type. It can only be set to application/json. |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
data | ServiceSetDetailResponseDto object | Service group details. |
Parameter | Type | Description |
---|---|---|
id | String | Service group ID. |
name | String | Service group name. |
description | String | Service group description. |
service_set_type | Integer | Service group type: 0 (user-defined service group), 1 (common web service), 2 (common remote login and ping), or 3 (common database). |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_code | String | Error code. |
error_msg | String | Error description. |
Example Requests¶
Query details about service group 221cfdca-3abf-4c30-ab0d-516a03c70866 in project 9d80d070b6d44942af73c9c3d38e0429.
https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/service-sets/221cfdca-3abf-4c30-ab0d-516a03c70866
Example Responses¶
Status code: 200
Return value for querying service group details.
{
"data" : {
"service_set_type" : 0,
"id" : "221cfdca-3abf-4c30-ab0d-516a03c70866",
"name" : "ceshi2"
}
}
Status code: 400
Bad Request
{
"error_code" : "CFW.00200005",
"error_msg" : "Object not found."
}
Status Codes¶
Status Code | Description |
---|---|
200 | Return value for querying service group details. |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Error Codes¶
See Error Codes.