Subscription Rest API¶
Overview
Resource |
Operation |
Description |
---|---|---|
Rules |
Get subscription rules. |
|
States |
Get subscription rule states. |
|
Subscription |
Update a subscription. |
|
Create a subscription. |
||
Get subscriptions. |
||
SubscriptionId |
Get a subscription by ID. |
|
SubscriptionName |
Get subscriptions by name. |
Details
-
PUT
/subscriptions/
(account)/
(name)¶ Update an existing subscription.
- Parameters
account – The account name.
name – The subscription name.
- Status Codes
201 Created – Created.
400 Bad Request – Cannot decode json parameter list.
401 Unauthorized – Invalid Auth Token.
404 Not Found – Subscription Not Found.
500 Internal Server Error – Internal Error.
-
POST
/subscriptions/
(account)/
(name)¶ Create a new subscription.
- Parameters
account – The account name.
name – The subscription name.
- Status Codes
201 Created – Created.
400 Bad Request – Cannot decode json parameter list.
401 Unauthorized – Invalid Auth Token.
404 Not Found – Subscription Not Found.
500 Internal Server Error – Internal Error.
- Returns
ID if newly created subscription.
-
GET
/subscriptions/
(account)/
(name)¶
-
GET
/subscriptions/
(account)¶
-
GET
/subscriptions/
¶ Retrieve a subscription.
- Parameters
account – The account name.
name – The subscription name.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – OK.
401 Unauthorized – Invalid Auth Token.
404 Not Found – Subscription Not Found.
406 Not Acceptable – Not Acceptable.
500 Internal Server Error – Internal Error.
- Returns
Line separated list of dictionaries with subscription information.
-
GET
/subscriptions/
(account)/
(name)/Rules/States
¶
-
GET
/subscriptions/
(account)/Rules/States
¶ Return a summary of the states of all rules of a given subscription id.
- Parameters
account – The account name.
name – The subscription name.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – OK.
401 Unauthorized – Invalid Auth Token.
406 Not Acceptable – Not Acceptable.
500 Internal Server Error – Internal Error.
- Returns
Line separated list of dictionaries with rule information.
-
GET
/subscriptions/Name/
(name)¶ Retrieve a subscription by name.
- Parameters
name – The subscription name.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – OK.
401 Unauthorized – Invalid Auth Token.
404 Not Found – Subscription Not Found.
406 Not Acceptable – Not Acceptable.
500 Internal Server Error – Internal Error.
- Returns
Line separated list of dictionaries with subscription information.
-
GET
/subscriptions/Id/
(subscription_id)¶ Retrieve a subscription matching the given subscription id
- Parameters
subscription_id – The subscription id.
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – OK.
401 Unauthorized – Invalid Auth Token.
404 Not Found – Subscription Not Found.
406 Not Acceptable – Not Acceptable.
500 Internal Server Error – Internal Error.
- Returns
dictionary with subscription information.
-
GET
/subscriptions/
(account)/
(name)/Rules
¶ Return all rules of a given subscription id.
- Parameters
account – The account name.
name – The subscription name.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – OK.
401 Unauthorized – Invalid Auth Token.
404 Not Found – Rule Not Found.
404 Not Found – Subscription Not Found.
406 Not Acceptable – Not Acceptable.
500 Internal Server Error – Internal Error.
- Returns
Line separated list of dictionaries with rule information.