(Tasks)
Operations related to Tasks
- ListChecklistTemplates - List checklist templates
- CreateChecklistTemplate - Create a checklist template
- DeleteChecklistTemplate - Archive a checklist template
- UpdateChecklistTemplate - Update a checklist template
- ListForIncident - List tasks for an incident
- Create - Create a task for an incident
- GetForIncident - Get a task for an incident
- Delete - Delete a task from an incident
- UpdateTask - Update a task for an incident
- ConvertToFollowup - Convert a task to a follow-up
- ListTasks - List task lists
- CreateList - Create a task list
- Get - Get a task list
- Update - Update a task list
List all of the checklist templates that have been added to the organization
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Tasks.ListChecklistTemplates(ctx, nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.ChecklistTemplateEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
query |
*string | ➖ | A query to search checklist templates by their name |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListChecklistTemplatesResponse, 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 | */* |
Creates a checklist template for the organization
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.Tasks.CreateChecklistTemplate(ctx, components.PostV1ChecklistTemplates{
Name: "<value>",
Checks: []components.Checks{
components.Checks{
Name: "<value>",
},
},
})
if err != nil {
log.Fatal(err)
}
if res.ChecklistTemplateEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PostV1ChecklistTemplates | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateChecklistTemplateResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.ErrorEntity | 400 | application/json |
sdkerrors.Unauthorized | 401, 403, 407, 511 | application/json |
sdkerrors.NotFound | 404, 501, 505 | application/json |
sdkerrors.Timeout | 408, 504 | application/json |
sdkerrors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json |
sdkerrors.RateLimited | 429 | application/json |
sdkerrors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
sdkerrors.SDKError | 4XX, 5XX | */* |
Archive a checklist template
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Tasks.DeleteChecklistTemplate(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.ChecklistTemplateEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
string | ✔️ | Checklist Template UUID |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteChecklistTemplateResponse, 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 checklist templates attributes
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.Tasks.UpdateChecklistTemplate(ctx, "<id>", components.PatchV1ChecklistTemplatesID{})
if err != nil {
log.Fatal(err)
}
if res.ChecklistTemplateEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
id |
string | ✔️ | N/A |
patchV1ChecklistTemplatesID |
components.PatchV1ChecklistTemplatesID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateChecklistTemplateResponse, 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 a list of all tasks for a specific incident
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Tasks.ListForIncident(ctx, "<id>", nil, nil)
if err != nil {
log.Fatal(err)
}
if res.TaskEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
incidentID |
string | ✔️ | N/A |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListIncidentTasksResponse, 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 task
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.Tasks.Create(ctx, "<id>", components.PostV1IncidentsIncidentIDTasks{
Title: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.TaskEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
incidentID |
string | ✔️ | N/A |
postV1IncidentsIncidentIDTasks |
components.PostV1IncidentsIncidentIDTasks | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateIncidentTaskResponse, 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 a single task for 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.Tasks.GetForIncident(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. |
taskID |
string | ✔️ | N/A |
incidentID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetIncidentTaskResponse, 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 task
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Tasks.Delete(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. |
taskID |
string | ✔️ | N/A |
incidentID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.DeleteIncidentTaskResponse, 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 task's attributes
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.Tasks.UpdateTask(ctx, "<id>", "<id>", components.PatchV1IncidentsIncidentIDTasksTaskID{})
if err != nil {
log.Fatal(err)
}
if res.TaskEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
taskID |
string | ✔️ | N/A |
incidentID |
string | ✔️ | N/A |
patchV1IncidentsIncidentIDTasksTaskID |
components.PatchV1IncidentsIncidentIDTasksTaskID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateIncidentTaskResponse, 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 | */* |
Convert a task to a follow-up
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.Tasks.ConvertToFollowup(ctx, "<id>", "<id>", components.PostV1IncidentsIncidentIDTasksTaskIDConvert{})
if err != nil {
log.Fatal(err)
}
if res.TaskEntityPaginated != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
taskID |
string | ✔️ | N/A |
incidentID |
string | ✔️ | N/A |
postV1IncidentsIncidentIDTasksTaskIDConvert |
components.PostV1IncidentsIncidentIDTasksTaskIDConvert | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ConvertIncidentTaskToFollowupResponse, 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 all task lists for your organization
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Tasks.ListTasks(ctx, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.TaskListEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
page |
*int | ➖ | N/A |
perPage |
*int | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListTaskListsResponse, 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 | */* |
Creates a new task list
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.Tasks.CreateList(ctx, components.PostV1TaskLists{
Name: "<value>",
TaskListItems: []components.TaskListItems{
components.TaskListItems{
Summary: "<value>",
},
components.TaskListItems{
Summary: "<value>",
},
},
})
if err != nil {
log.Fatal(err)
}
if res.TaskListEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PostV1TaskLists | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTaskListResponse, 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 a single task list by ID
package main
import(
"firehydrant"
"context"
"log"
)
func main() {
s := firehydrant.New(
firehydrant.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Tasks.Get(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.TaskListEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
taskListID |
string | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetTaskListResponse, 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 | */* |
Updates a task list's attributes and task list items
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.Tasks.Update(ctx, "<id>", components.PatchV1TaskListsTaskListID{})
if err != nil {
log.Fatal(err)
}
if res.TaskListEntity != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
taskListID |
string | ✔️ | N/A |
patchV1TaskListsTaskListID |
components.PatchV1TaskListsTaskListID | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateTaskListResponse, 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 | */* |