(StatusPages)
- DeleteIncident - Remove a status page from an incident
- CreateSubscription - Create a status page subscription
- DeleteSubscription - Unsubscribe from status page notifications
- List - List status pages
- Create - Create a status page
- Get - Get a status page
- Update - Update a status page
- Delete - Delete a status page
- CreateComponentGroup - Create a component group for a status page
- DeleteComponentGroup - Delete a status page component group
- UpdateComponentGroup - Update a status page component group
- UpdateImage - Upload an image for a status page
- DeleteImage - Delete an image from a status page
- CreateLink - Create a link for a status page
- DeleteLink - Delete a status page link
- UpdateLink - Update a status page link
- ListSubscribers - List status page subscribers
- CreateSubscribers - Add subscribers to a status page
- DeleteSubscribers - Remove subscribers from a status page
Remove a status page incident attached to an incident
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.DeleteIncident(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
statusPageID |
string | ✔️ | N/A |
incidentID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteIncidentStatusPageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Subscribe to status page updates
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.CreateSubscription(ctx, components.PostV1NuncSubscriptions{
Email: "Kareem.Shields@hotmail.com",
})
if err != nil {
log.Fatal(err)
}
if res.NuncNuncSubscription != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PostV1NuncSubscriptions | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateStatusPageSubscriptionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Unsubscribe from status page updates
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.DeleteSubscription(ctx, "<value>")
if err != nil {
log.Fatal(err)
}
if res.NuncNuncSubscription != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
unsubscribeToken |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteNuncSubscriptionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Lists the information displayed as part of your FireHydrant hosted status pages.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.List(ctx)
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListStatusPagesResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Create a new FireHydrant hosted status page for customer facing statuses.
package main
import(
"firehydrant"
"context"
"firehydrant/models/operations"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.Create(ctx, operations.CreateStatusPageRequestBody{
Domain: "baggy-pharmacopoeia.info",
ConditionsNuncCondition: []string{
"<value>",
"<value>",
"<value>",
},
ConditionsConditionID: []string{
"<value>",
},
ComponentsInfrastructureType: []string{
"<value>",
"<value>",
"<value>",
},
ComponentsInfrastructureID: []string{
"<value>",
},
})
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateStatusPageRequestBody | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateStatusPageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Retrieve the information displayed as part of your FireHydrant hosted status page.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.Get(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetStatusPageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Update your company's information and other components in the specified FireHydrant hosted status page.
package main
import(
"firehydrant"
"context"
"firehydrant/models/operations"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.Update(ctx, "<id>", operations.UpdateStatusPageRequestBody{
ConditionsNuncCondition: []string{
"<value>",
"<value>",
"<value>",
},
ConditionsConditionID: []string{
"<value>",
},
ComponentsInfrastructureType: []string{
"<value>",
},
ComponentsInfrastructureID: []string{
"<value>",
},
})
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
requestBody |
operations.UpdateStatusPageRequestBody | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateStatusPageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Delete a FireHydrant hosted status page, stopping updates of your incidents to it.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.Delete(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteStatusPageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Add a component group to be displayed on a FireHydrant status page
package main
import(
"firehydrant"
"context"
"firehydrant/models/operations"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.CreateComponentGroup(ctx, "<id>", operations.CreateStatusPageComponentGroupRequestBody{
Name: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
requestBody |
operations.CreateStatusPageComponentGroupRequestBody | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateStatusPageComponentGroupResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Delete a component group displayed on a FireHydrant status page
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.DeleteComponentGroup(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
groupID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteStatusPageComponentGroupResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Update a component group to be displayed on a FireHydrant status page
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.UpdateComponentGroup(ctx, "<id>", "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
groupID |
string | ✔️ | N/A |
requestBody |
*operations.UpdateStatusPageComponentGroupRequestBody | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateStatusPageComponentGroupResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Add or replace an image attached to a FireHydrant status page
package main
import(
"firehydrant"
"os"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
content, fileErr := os.Open("example.file")
if fileErr != nil {
panic(fileErr)
}
ctx := context.Background()
res, err := s.StatusPages.UpdateImage(ctx, "<id>", "<value>", nil)
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
type_ |
string | ✔️ | N/A |
requestBody |
*operations.UpdateStatusPageImageRequestBody | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateStatusPageImageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Delete an image attached to a FireHydrant status page
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.DeleteImage(ctx, "<id>", "<value>")
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
type_ |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteStatusPageImageResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Add a link to be displayed on a FireHydrant status page
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.CreateLink(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.NuncConnectionEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateStatusPageLinkResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Delete a link displayed on a FireHydrant status page
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.DeleteLink(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
linkID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteStatusPageLinkResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Update a link to be displayed on a FireHydrant status page
package main
import(
"firehydrant"
"context"
"firehydrant/models/components"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.UpdateLink(ctx, "<id>", "<id>", components.PatchV1NuncConnectionsNuncConnectionIDLinksLinkID{})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
linkID |
string | ✔️ | N/A |
patchV1NuncConnectionsNuncConnectionIDLinksLinkID |
components.PatchV1NuncConnectionsNuncConnectionIDLinksLinkID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateStatusPageLinkResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Retrieves the list of subscribers for a status page.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.ListSubscribers(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.NuncEmailSubscribersEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListStatusPageSubscribersResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Subscribes a comma-separated string of emails to status page updates
package main
import(
"firehydrant"
"context"
"firehydrant/models/operations"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.CreateSubscribers(ctx, "<id>", operations.CreateStatusPageSubscribersRequestBody{
Emails: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.NuncEmailSubscribersEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
requestBody |
operations.CreateStatusPageSubscribersRequestBody | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateStatusPageSubscribersResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Unsubscribes one or more status page subscribers.
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.StatusPages.DeleteSubscribers(ctx, "<id>", "<value>")
if err != nil {
log.Fatal(err)
}
if res.NuncEmailSubscribersEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
nuncConnectionID |
string | ✔️ | N/A |
subscriberIds |
string | ✔️ | A list of subscriber IDs to unsubscribe. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteStatusPageSubscribersResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |