IncidentIo.ApiKeysV1 (IncidentIo v0.3.1)

View Source

Manage API keys for your organisation.

API keys are used to authenticate requests to the incident.io API. This module supports listing, creating, updating, and rotating API keys.

Summary

Functions

Create a new API key.

List all API keys for an organisation.

Rotate an API key, generating a new token.

Get a single API key.

Update an existing API key.

Functions

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

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

Create a new API key.

Example

IncidentIo.ApiKeysV1.create(client, %{name: "My API Key"})

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

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

Delete an API key.

Example

IncidentIo.ApiKeysV1.destroy(client, "some-api-key-id")

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

list(client \\ %Client{})

List all API keys for an organisation.

Example

IncidentIo.ApiKeysV1.list(client)

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

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

Rotate an API key, generating a new token.

Example

IncidentIo.ApiKeysV1.rotate(client, "some-api-key-id")

More information at: https://api-docs.incident.io/tag/API-Keys-V1#operation/API%20Keys%20V1_Rotate

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

Get a single API key.

Example

IncidentIo.ApiKeysV1.show(client, "some-api-key-id")

More information at: https://api-docs.incident.io/tag/API-Keys-V1#operation/API%20Keys%20V1_Show

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

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

Update an existing API key.

Example

IncidentIo.ApiKeysV1.update(client, "some-api-key-id", %{name: "Updated Key Name"})

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