# Managing Subscriptions You can manage your subscriptions using the following API endpoints. ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for more information on how to authenticate your requests to the Equinix API. ## Get Your Subscriptions[​](#get-your-subscriptions "Direct link to Get Your Subscriptions") To return a list of all your streaming subscriptions, send a `GET` request to the [`/smartview/v2/streaming/subscriptions`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/getallsubscriptions.md) endpoint. Sample cURL Request: ``` curl -X GET 'https://api.equinix.com/smartview/v2/streaming/subscriptions' -H 'authorization: Bearer ' ``` Sample Response: ``` [ { "id": "606349eca6171829c70d8777", "status": "PENDING", "messageType": { "asset": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "assetClassification": [ "MECHANICAL" ], "assetId": [ "string" ] } ], "environmental": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "level": [ "ZONE" ] } ], "power": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "meteredPower": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "systemAlert": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "customAlert": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "user": "abc" } ] }, "channel": { "channelType": "AWS_IOT_CORE", "awsIotCoreChannelConfiguration": { "url": "https://b4c3mzxe8syvhd-ats.iot.us-west-2.amazonaws.com" } }, "orgId": "123", "createdBy": "abc", "createdDateTime": "2019-08-24T14:15:22Z", "updatedBy": "abc", "updatedDateTime": "2019-08-24T14:15:22Z" } ] ``` ## Get a Subscriptions Details[​](#get-a-subscriptions-details "Direct link to Get a Subscriptions Details") To get the details of a specified subscription, send a `GET` request to the [`/smartview/v2/streaming/subscriptions/{id}`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/getsubscriptionbyid.md) endpoint. Sample cURL Request: ``` curl -X GET 'https://api.equinix.com/smartview/v2/streaming/subscriptions/606349eca6171829c70d8777' -H 'authorization: Bearer ' ``` Sample Response: ``` { "id": "606349eca6171829c70d8777", "status": "ACTIVE", "messageType": { "asset": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "assetClassification": [ "MECHANICAL" ], "assetId": [ "string" ] } ], "environmental": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "level": [ "ZONE" ] } ], "power": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "meteredPower": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "systemAlert": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "customAlert": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "user": "abc" } ] }, "channel": { "channelType": "AWS_IOT_CORE", "awsIotCoreChannelConfiguration": { "url": "https://b4c3mzxe8syvhd-ats.iot.us-west-2.amazonaws.com" } }, "orgId": "123", "createdBy": "abc", "createdDateTime": "2019-08-24T14:15:22Z", "updatedBy": "abc", "updatedDateTime": "2019-08-24T14:15:22Z" } ``` ## Update a Subscription[​](#update-a-subscription "Direct link to Update a Subscription") To modify a subscription, send a `PUT` request to the [`/smartview/v2/streaming/subscriptions/{id}`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/updatesubscription.md) endpoint. The new request body replaces current subscription configuration. Sample cURL Request: ``` curl -X PUT 'https://api.equinix.com/smartview/v2/streaming/subscriptions/{id}' -H 'authorization: Bearer ' -d '{ "messageType": { "asset": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "assetClassification": [ "MECHANICAL" ], "assetId": [ "string" ] } ], "environmental": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "level": [ "ZONE" ] } ], "power": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "meteredPower": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "systemAlert": [ { "accountNumber": "135888", "ibx": [ "DE2" ] } ], "customAlert": [ { "accountNumber": "135888", "ibx": [ "DE2" ], "user": "abc" } ] }, "channel": { "channelType": "AWS_IOT_CORE", "awsIotCoreChannelConfiguration": { "url": "https://b4c3mzxe8syvhd-ats.iot.us-west-2.amazonaws.com" } } }' ``` ## Delete a Subscription[​](#delete-a-subscription "Direct link to Delete a Subscription") To delete a subscription, send a `DELETE` request to the [`/smartview/v2/streaming/subscriptions/{id}`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/deletesubscriptionbyid.md) endpoint. Events will no longer be available for the subscription once a delete request is received. Sample cURL Request: ``` curl -X DELETE 'https://api.equinix.com/smartview/v2/streaming/subscriptions/606349eca6171829c70d8777' -H 'authorization: Bearer ' ```