Cancel data subscription

Cancel an accepted data subscription. After success, the subscription database in the target workspace will be deleted and the subscription record will be restored to an invitation that can be accepted again.

HTTP
POST $CLOUDSIGMA_API_BASE/data-share/subscriptions/{id}/unsubscribe

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the data subscription list and confirm the subscription to be canceled. Prepare the personal access token, target workspace ID, and subscription ID that can access the target workspace.

Request parameters

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/data-share/subscriptions/$SUBSCRIPTION_ID/unsubscribe" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Field

Type

Required

Description

id

integer

Yes

Subscription ID greater than 0.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

When the cancellation is successful, it is fixed to null.

Error response

JSON
{
  "code": "ErrSubscriptionNotFound",
  "msg": "数据订阅不存在",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

Empty on error.

Last updated on