IncidentIo.CatalogEntryV2 (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.

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.CatalogEntryV2.create(client, "some-catalog-type-id", body)

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

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

Archives a catalog entry.

Example

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

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

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

List entries for a catalog type.

Example

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

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

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

Show a single catalog entry.

Example

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

More information at: https://api-docs.incident.io/tag/Catalog-V2#operation/Catalog%20V2_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.CatalogEntryV2.update(client, "some-catalog-entry-id", body)

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