Enabling or Disabling Event Subscriptions
Function
This API is used to enable or disable event subscriptions.
URI
POST /v1/{project_id}/subscriptions/operation
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Tenant resource space ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
ID of an enterprise project used for creating a subscription. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
subscription_ids |
No |
Array of strings |
List of subscription IDs. A maximum of 10 subscriptions are supported in batch. |
|
operation |
No |
String |
Operation type. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
X-Request-Id |
String |
This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. |
|
Parameter |
Type |
Description |
|---|---|---|
|
failed_count |
Integer |
Number of subscriptions that fail to be operated. |
|
events |
Array of events objects |
Event list. |
Example Requests
Enable or disable event subscriptions.
POST https://{endpoint}/v1/{project_id}/subscriptions/operation
{
"subscription_ids" : [ "23709d68-54d5-423b-a6be-03302e893152" ],
"operation" : "DISABLE"
}
Example Responses
Status code: 200
Demo Information
{
"failed_count" : 0,
"events" : [ {
"subscription_id" : "23709d68-54d5-423b-a6be-03302e893152"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Demo Information |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.