IncidentIo.CatalogEntriesV3 (IncidentIo v0.3.1)

View Source

Manage entries within catalog types.

Catalog entries are the individual items that belong to a catalog type. Each entry can have attribute values, aliases, and an external ID for syncing with external systems. This module covers the v3 Catalog API.

Summary

Functions

Create an entry within the catalog.

Archives a catalog entry.

Show a single catalog entry.

Updates an existing catalog entry.

Functions

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

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

Create an entry within the catalog.

Catalog entry body example:

%{
  aliases: [
    "lawrence@incident.io",
    "lawrence"
  ],
  attribute_values: %{
    abc123: %{
      array_value: [
        %{
          literal: "SEV123",
          reference: "incident.severity"
        }
      ],
      value: %{
        literal: "SEV123",
        reference: "incident.severity"
      }
    }
  },
  catalog_type_id: "01FCNDV6P870EA6S7TK1DSYDG0",
  external_id: "761722cd-d1d7-477b-ac7e-90f9e079dc33",
  name: "Primary On-call",
  rank: 3
}

Example

IncidentIo.CatalogEntriesV3.create(client, body)

More information at: https://api-docs.incident.io/tag/Catalog-V3#operation/Catalog%20V3_CreateEntry

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

Archives a catalog entry.

Example

IncidentIo.CatalogEntriesV3.destroy(client, "some-catalog-entry-id")

More information at: https://api-docs.incident.io/tag/Catalog-V3#operation/Catalog%20V3_DestroyEntry

list(client \\ %Client{}, catalog_type_id, page_size \\ 25)

List entries for a catalog type.

Example

IncidentIo.CatalogEntriesV3.list(client, "some-catalog-type-id")

More information at: https://api-docs.incident.io/tag/Catalog-V3#operation/Catalog%20V3_ListEntries

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

Show a single catalog entry.

Example

IncidentIo.CatalogEntriesV3.show(client, "some-catalog-entry-id")

More information at: https://api-docs.incident.io/tag/Catalog-V3#operation/Catalog%20V3_ShowEntry

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

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

Updates an existing catalog entry.

Catalog entry body example:

%{
  aliases: [
    "not lawrence"
  ],
  attribute_values: %{
    abc123: %{
      array_value: [
        %{
          literal: "SEV123",
          reference: "incident.severity"
        }
      ],
      value: %{
        literal: "SEV123",
        reference: "incident.severity"
      }
    }
  },
  name: "Was Primary On-call",
  rank: 5
}

Example

IncidentIo.CatalogEntriesV3.update(client, "some-catalog-entry-id", body)

More information at: https://api-docs.incident.io/tag/Catalog-V3#operation/Catalog%20V3_UpdateEntry