OpsGenie REST API v0.1.0 OpsGenieRESTAPI.Api.Schedule

API calls for all endpoints tagged Schedule.

Link to this section Summary

Functions

Create Schedule Creates a new schedule

Delete Schedule Delete schedule with given identifier

Export Schedule Returns an .ics file as byte array

Get Schedule Returns schedule with given id or name

Get Schedule Timeline Returns schedule timeline with given id or name

List Schedules Returns list of schedule

Update Schedule (Partial) Update schedule with given id or name

Link to this section Functions

Link to this function create_schedule(connection, body, opts \\ [])

Create Schedule Creates a new schedule

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • body (CreateSchedulePayload): Request payload of created schedule
  • opts (KeywordList): [optional] Optional parameters

Returns

{:ok, %OpsGenieRESTAPI.Model.CreateScheduleResponse{}} on success {:error, info} on failure

Link to this function delete_schedule(connection, identifier, opts \\ [])
delete_schedule(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.SuccessResponse.t()} | {:error, Tesla.Env.t()}

Delete Schedule Delete schedule with given identifier

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of schedule which could be id or name
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name'

Returns

{:ok, %OpsGenieRESTAPI.Model.SuccessResponse{}} on success {:error, info} on failure

Link to this function export_schedule(connection, identifier, opts \\ [])
export_schedule(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, Tesla.Env.t()}

Export Schedule Returns an .ics file as byte array

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of schedule which could be id or name
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name'

Returns

{:ok, %OpsGenieRESTAPI.Model.binary(){}} on success {:error, info} on failure

Link to this function get_schedule(connection, identifier, opts \\ [])

Get Schedule Returns schedule with given id or name

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of schedule which could be id or name
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name'

Returns

{:ok, %OpsGenieRESTAPI.Model.GetScheduleResponse{}} on success {:error, info} on failure

Link to this function get_schedule_timeline(connection, identifier, opts \\ [])
get_schedule_timeline(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, OpsGenieRESTAPI.Model.GetScheduleTimelineResponse.t()}
  | {:error, Tesla.Env.t()}

Get Schedule Timeline Returns schedule timeline with given id or name

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of schedule which could be id or name
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name'
    • :expand ([String.t]): Returns more detailed response with expanding it. Possible values are 'base', 'forwarding', and 'override' which is also returned with expandable field of response
    • :interval (integer()): Length of time as integer in intervalUnits to retrieve the timeline. Default value is 1
    • :interval_unit (String.t): Unit of the time to retrieve the timeline. Available values are 'days', 'weeks' and 'months'. Default value is 'weeks'
    • :date (DateTime.t): Time to return future date on-call participants. Default date is the moment of the time that request is received

Returns

{:ok, %OpsGenieRESTAPI.Model.GetScheduleTimelineResponse{}} on success {:error, info} on failure

Link to this function list_schedules(connection, opts \\ [])

List Schedules Returns list of schedule

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :expand ([String.t]): Returns more detailed response with expanding it. Possible value is 'rotation' which is also returned with expandable field of response

Returns

{:ok, %OpsGenieRESTAPI.Model.ListSchedulesResponse{}} on success {:error, info} on failure

Link to this function update_schedule(connection, identifier, opts \\ [])

Update Schedule (Partial) Update schedule with given id or name

Parameters

  • connection (OpsGenieRESTAPI.Connection): Connection to server
  • identifier (String.t): Identifier of schedule which could be id or name
  • opts (KeywordList): [optional] Optional parameters

    • :identifier_type (String.t): Type of the identifier that is provided as an in-line parameter. Possible values are 'id' or 'name'
    • :body (UpdateSchedulePayload): Request payload of update schedule action

Returns

{:ok, %OpsGenieRESTAPI.Model.UpdateScheduleResponse{}} on success {:error, info} on failure