IncidentIo.CustomFieldsV1 (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 v1 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",
  required: "never",
  required_v2: "never",
  show_before_closure: true,
  show_before_creation: true,
  show_before_update: true,
  show_in_announcement_post: true
}

Example

IncidentIo.CustomFieldsV1.create(client, body)

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

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

Delete a custom field.

Example

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

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

list(client \\ %Client{})

List all custom fields for an organisation.

Example

IncidentIo.CustomFieldsV1.list(client)

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

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

Get a single custom field.

Example

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

More information at: https://api-docs.incident.io/tag/Custom-Fields-V1#operation/Custom%20Fields%20V1_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",
  field_type: "single_select",
  name: "Affected Team",
  required: "never",
  required_v2: "never",
  show_before_closure: true,
  show_before_creation: true,
  show_before_update: true,
  show_in_announcement_post: true
}

Example

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

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