Subscriptions: Status

Subscriptions: Status

#340740

Description

The /subscriptions/<platformType>/<subscriptionId>/status resource is used to return the status of the results posted to a webhook for a specific subscription in Densify.

Refer to Subscriptions for details on subscription results and defining a webhook.

Resource

/subscriptions/cloud/<subscriptionId>/status

/subscriptions/containers/<subscriptionId>/status

/subscriptions/<subscriptionId>/status

Note: If you use this resource without the <platformType> specified (i.e. without cloud or containers specified), the behavior is exactly the same as specifying the cloud-specific resource. This behavior enables backward compatibility with scripts using the Densify API prior to release 12.1.6, where the platform-specific indicator was not available.

Supported Operations

Table: Subscription Status Supported Operations

HTTP Method

Input

Output

Description

GET /subscriptions/<platformType>/<subscriptionRef>/status

Path Parameter:

Returns the last subscription results request and webhook status of the platform-specific subscription identified by <subscriptionRef>.

See Example: Getting the Status of a Subscription.

Parameters

Path Parameters

Table: Subscription Status Path Parameters

Parameter Name

Type

Required (Y/N)

Description

platformType

string

Y

[cloud|containers]

Specify the technology platform for the subscription resource.

subscriptionRef

string

Y

Specify the unique subscription identifier.

Response

The following is a list of possible response elements returned for the /subscriptions/<platformType>/<subscriptionRef>/status resource.

Table: Subscription Status Response Schema

Element

Type

Filter/Sort

Description

lastTriggered

string

 

The status, date, and time of the last request for subscription results:

  • On-Demand Success—the last request was on-demand and it was successful;
  • On-Demand Failure—the last request was on-demand and it failed to produce results;
  • Scheduled Success—the last request was a successful scheduled subscription event posted to a webhook;
  • Scheduled-Failure—the last request was a failed webhook post of the scheduled subscription event.

webHookStatus

string

 

The status, date, and time of the last subscription results pushed to the webhook location:

  • Success—subscription results were sent to the webhook successfully;
  • Failure—transmission of subscription results to the webhook failed.

Returned Status

message

string

 

The message for the status response is returned.

status

number

 

The HTTP response code of the request. Possible status values include:

  • 200—success with request (usually with content in response body);
  • 204—success with request, no content returned;
  • 400—bad request (invalid parameters, logical errors);
  • 401—authentication failed;
  • 404—resource not found (or no privileges);
  • 415—unsupported media type;
  • 500—internal server error.

Examples

Example: Getting the Status of a Subscription

The following example shows you how to retrieve the status of a specific cloud subscription. The status message for the subscription will be returned if the subscription is global or owned by you.