DeleteHostGroup - Delete a host group

Updated at:

Deletes a specified host group.

Applicable editions

Central edition, Region edition

Service endpoint and authorization information

  • Get the service endpoint: Replace {domain} in the API request syntax with the endpoint.
  • Get a personal access token.
  • Obtain the organization ID: Required only for the Central edition. Go to the Organization Management console and open the Basic Information page to obtain the organization ID.

Product

Resource

Required permission

Pipeline

Host group

Read and write

Request syntax

Central edition

DELETE https://{domain}/oapi/v1/flow/organizations/{organizationId}/hostGroups/{id}

Region edition

DELETE https://{domain}/oapi/v1/flow/hostGroups/{id}

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Your personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The organization ID.

5ebbc0228123212b59xxxxx

id

integer

path

Yes

The host group ID.

11222

Request examples

Central edition

curl -X 'DELETE' \
  'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/hostGroups/11222' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'DELETE' \
  'https://{domain}/oapi/v1/flow/hostGroups/11222' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

boolean

Indicates whether the deletion succeeded.

true

Response example

true

Error codes

For more information, see Error code center.