Cancel a Monitoring Subscription
POSThttps://api.goodstack.io/v1/monitoring-subscriptions/:id/cancel
Cancel a Monitoring Subscription
Request​
Path Parameters
id stringrequired
Id of the Monitoring Subscription.
Responses​
- 200
- 400
- 401
- 403
- 404
Successfully cancelled a Monitoring Subscription
- application/json
- Schema
- Example (from schema)
Schema
data
object
objectstring
Example:
monitoring_subscription
{
"data": {
"id": "monitoringsubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"validationRequestId": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"status": "cancelled",
"createdAt": "2020-10-13T17:46:54.000Z"
},
"object": "monitoring_subscription"
}
Bad request
- application/json
- Schema
- Example (from schema)
- MonitoringSubscriptionAlreadyCancelled
Schema
error
object
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
Monitoring Subscription already cancelled
{
"error": {
"code": "monitoring_subscription/monitoring_subscription_already_cancelled",
"title": "Bad request",
"message": "Monitoring subscription is already cancelled"
}
}
Unauthorized
Forbidden (scope)
- application/json
- Schema
- Example (from schema)
Schema
error
object
{
"error": {
"code": "forbidden",
"title": "Forbidden",
"message": "Access is denied due to missing scope permissions"
}
}
The specified resource was not found
- application/json
- Schema
- Example (from schema)
Schema
error
object
{
"error": {
"code": "not_found",
"title": "Resource not found",
"message": "This endpoint is unavailable or can not be found"
}
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key starting with 'sk_' that must be kept secure
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.goodstack.io/v1/monitoring-subscriptions/:id/cancel");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "<Authorization>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear