Help Center/ Direct Connect/ API Reference/ API/ Virtual Interface Peer Connectivity Detection Task/ Creating a Connectivity Detection Task for a Virtual Interface Peer
Updated on 2025-12-15 GMT+08:00

Creating a Connectivity Detection Task for a Virtual Interface Peer

Function

This API is used to create a connectivity detection task for a virtual interface peer to test the connectivity of the remote gateway.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v3/{project_id}/dcaas/vif-peer-detections

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Minimum: 0

Maximum: 36

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. To obtain the token, see section "Obtaining the User Token" in the Identity and Access Management API Reference. The token is the value of X-Subject-Token in the response header.

Minimum: 0

Maximum: 10240

Response Parameters

Status code: 200

OK

None

Example Requests

Creating a connectivity detection task for a virtual interface peer

POST https://{dc_endpoint}/v3/b197c48159d44a66b32c538c3f8da89a/dcaas/vif-peer-detections

{
  "vif_peer_detection" : {
    "vif_peer_id" : "1158951c-a6f1-40a0-af88-632817fd24ac"
  }
}

Example Responses

Status code: 200

OK

Specifies the response body for creating a connectivity detection task for a virtual interface peer.

{
  "request_id" : "ecf6442668da7d4adf0dfaf4bded8840",
  "vif_peer_detection" : {
    "id" : "3284c6e2-a803-4108-8496-ed3f150697d6",
    "vif_peer_id" : "1158951c-a6f1-40a0-af88-632817fd24ac",
    "project_id" : "b197c48159d44a66b32c538c3f8da89a",
    "domain_id" : "221d3417d0a74b2dbac5611818e23456",
    "start_time" : "2025-07-05 15:11:14",
    "status" : "processing",
    "loss_ratio" : 0
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.