IncidentIo.CustomFieldsV2 (IncidentIo v0.3.1)

View Source

Manage custom fields for incidents.

Custom fields allow you to capture structured information on incidents beyond the built-in fields. This module covers the v2 Custom Fields API.

Summary

Functions

Create a new custom field.

Delete a custom field.

List all custom fields for an organisation.

Get a single custom field.

Update the details of a custom field.

Functions

create(client \\ %Client{}, body)

@spec create(IncidentIo.Client.t(), create_request_body()) :: IncidentIo.response()

Create a new custom field.

Custom field body example:

%{
  description: "Which team is impacted by this issue",
  field_type: "single_select",
  name: "Affected Team"
}

Example

IncidentIo.CustomFieldsV2.create(client, body)

More information at: https://api-docs.incident.io/tag/Custom-Fields-V2#operation/Custom%20Fields%20V2_Create

destroy(client \\ %Client{}, id)

Delete a custom field.

Example

IncidentIo.CustomFieldsV2.destroy(client, "some-custom-field-option-id")

More information at: https://api-docs.incident.io/tag/Custom-Fields-V2#operation/Custom%20Fields%20V2_Delete

list(client \\ %Client{})

List all custom fields for an organisation.

Example

IncidentIo.CustomFieldsV2.list(client)

More information at: https://api-docs.incident.io/tag/Custom-Fields-V2#operation/Custom%20Fields%20V2_List

show(client \\ %Client{}, id)

Get a single custom field.

Example

IncidentIo.CustomFieldsV2.show(client, "some-custom-field-option-id")

More information at: https://api-docs.incident.io/tag/Custom-Fields-V2#operation/Custom%20Fields%20V2_Show

update(client \\ %Client{}, id, body)

@spec update(IncidentIo.Client.t(), binary(), update_request_body()) ::
  IncidentIo.response()

Update the details of a custom field.

Custom field body example:

%{
  description: "Which team is impacted by this issue",
  name: "Affected Team"
}

Example

IncidentIo.CustomFieldsV2.update(client, "some-custom-field-option-id", body)

More information at: https://api-docs.incident.io/tag/Custom-Fields-V2#operation/Custom%20Fields%20V2_Update