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
create_schedule( Tesla.Env.client(), OpsGenieRESTAPI.Model.CreateSchedulePayload.t(), keyword() ) :: {:ok, OpsGenieRESTAPI.Model.CreateScheduleResponse.t()} | {:error, Tesla.Env.t()}
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
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
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
get_schedule(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.GetScheduleResponse.t()} | {:error, Tesla.Env.t()}
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
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
list_schedules(Tesla.Env.client(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.ListSchedulesResponse.t()} | {:error, Tesla.Env.t()}
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
update_schedule(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpsGenieRESTAPI.Model.UpdateScheduleResponse.t()} | {:error, Tesla.Env.t()}
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