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.
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¶
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 |
|---|---|---|---|
|
integer |
Yes |
Subscription ID greater than |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
When the cancellation is successful, it is fixed to |
Error response¶
{
"code": "ErrSubscriptionNotFound",
"msg": "数据订阅不存在",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
Empty on error. |