IncidentIo. CatalogTypesSchemaV2
(IncidentIo v0.3.1)
View Source
Manage the schema for catalog types.
The schema defines the attributes that entries of a catalog type can have, including their types, whether they are required, and how they are displayed.
Summary
Functions
Updates an existing catalog types schema, adding or removing attributes.
Functions
@spec update(IncidentIo.Client.t(), binary(), request_body()) :: IncidentIo.response()
Updates an existing catalog types schema, adding or removing attributes.
Updating the schema is handled separately from creating and updating types, so that you don't have to worry about dependencies between types. For example, if type A has an attribute that relies on type B, you would have to create type B first.
By allowing the creation of types without a schema, they can be created in any order, but it means that you need to make a separate call to this endpoint to update the schema.
Catalog types schema body example:
%{
attributes: [
%{
array: false,
backlink_attribute: "abc123",
id: "01GW2G3V0S59R238FAHPDS1R66",
mode: "manual",
name: "tier",
type: "Custom["Service"]"
}
],
"version": 1
}Example
IncidentIo.CatalogTypesV2.update(client, "some-catalog-type-schema-id", body)More information at: https://api-docs.incident.io/tag/Catalog-V2#operation/Catalog%20V2_UpdateTypeSchema