@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api VictorOps API
@base https://api.victorops.com/
@version 0.0.3
@auth ApiKey X-VO-Api-Key in header
@common_fields {X-VO-Api-Id: any, X-VO-Api-Key: any}
@endpoints 96
@hint download_for_search
@toc api-public(94), api-reporting(2)

@group api-public
@endpoint POST /api-public/v1/user
@required {body: any}
@returns(200)
@errors {400, 401, 403, 404, 409, 422, 500}

@endpoint GET /api-public/v1/user
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v2/user
@optional {email: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/user/batch
@optional {users: [any]}
@returns(200)
@errors {400, 401, 403, 409, 422, 500}

@endpoint GET /api-public/v1/user/{user}
@required {user: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint PUT /api-public/v1/user/{user}
@required {user: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 409, 422, 500}

@endpoint DELETE /api-public/v1/user/{user}
@required {user: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/user/{user}/teams
@required {user: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint GET /api-public/v1/policies/types/notifications
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v1/policies/types/contacts
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v1/policies/types/timeouts
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v1/profile/{username}/policies
@required {username: any}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint POST /api-public/v1/profile/{username}/policies
@required {username: any, body: map}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v1/profile/{username}/policies/{step}
@required {username: any, step: any}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint PUT /api-public/v1/profile/{username}/policies/{step}
@required {username: any, step: any, body: map}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint POST /api-public/v1/profile/{username}/policies/{step}
@required {username: any, step: any, body: map}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v1/profile/{username}/policies/{step}/{rule}
@required {username: any, step: any, rule: any}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint PUT /api-public/v1/profile/{username}/policies/{step}/{rule}
@required {username: any, step: any, rule: any, body: map}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint DELETE /api-public/v1/profile/{username}/policies/{step}/{rule}
@required {username: any, step: any, rule: any}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v2/profile/{username}/policies
@required {username: any}
@returns(200)
@errors {400, 401, 403, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods
@required {user: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods/devices
@required {user: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods/devices/{contactId}
@required {user: any, contactId: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint PUT /api-public/v1/user/{user}/contact-methods/devices/{contactId}
@required {user: any, contactId: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint DELETE /api-public/v1/user/{user}/contact-methods/devices/{contactId}
@required {user: any, contactId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods/emails
@required {user: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint POST /api-public/v1/user/{user}/contact-methods/emails
@required {user: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods/emails/{contactId}
@required {user: any, contactId: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint DELETE /api-public/v1/user/{user}/contact-methods/emails/{contactId}
@required {user: any, contactId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods/phones
@required {user: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint POST /api-public/v1/user/{user}/contact-methods/phones
@required {user: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/contact-methods/phones/{contactId}
@required {user: any, contactId: any}
@returns(200)
@errors {401, 403, 404, 500}

@endpoint DELETE /api-public/v1/user/{user}/contact-methods/phones/{contactId}
@required {user: any, contactId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/policies
@required {user: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/user/{user}/oncall/schedule
@required {user: any}
@optional {daysForward: any, daysSkip: any, step: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v2/user/{user}/oncall/schedule
@required {user: any}
@optional {daysForward: any, daysSkip: any, step: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/team/{team}/oncall/schedule
@required {team: any}
@optional {daysForward: any, daysSkip: any, step: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v2/team/{team}/oncall/schedule
@required {team: any}
@optional {daysForward: any, daysSkip: any, step: any}
@returns(200)
@errors {400, 401, 403, 404, 429, 500}

@endpoint GET /api-public/v1/oncall/current
@returns(200)
@errors {400, 401, 403, 500}

@endgroup

@group api-reporting
@endpoint GET /api-reporting/v1/team/{team}/oncall/log
@required {team: any}
@optional {start: any, end: any, userName: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endgroup

@group api-public
@endpoint PATCH /api-public/v1/team/{team}/oncall/user
@required {body: map, team: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PATCH /api-public/v1/policies/{policy}/oncall/user
@required {body: map, policy: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/incidents/{incidentNumber}
@required {incidentNumber: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/incidents
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/incidents
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PATCH /api-public/v1/incidents/ack
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/incidents/reroute
@required {body: map}
@returns(200)

@endpoint PATCH /api-public/v1/incidents/resolve
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PATCH /api-public/v1/incidents/byUser/ack
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PATCH /api-public/v1/incidents/byUser/resolve
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/incidents/{incidentNumber}/notes
@required {incidentNumber: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/incidents/{incidentNumber}/notes
@required {body: map, incidentNumber: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PUT /api-public/v1/incidents/{incidentNumber}/notes/{noteName}
@required {body: map, incidentNumber: any, noteName: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint DELETE /api-public/v1/incidents/{incidentNumber}/notes/{noteName}
@required {incidentNumber: any, noteName: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/alerts/{uuid}
@required {uuid: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/org/routing-keys
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/org/routing-keys
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/overrides
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint POST /api-public/v1/overrides
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/overrides/{publicId}
@required {publicId: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint DELETE /api-public/v1/overrides/{publicId}
@required {publicId: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/overrides/{publicId}/assignments
@required {publicId: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/overrides/{publicId}/assignments/{policySlug}
@required {publicId: any, policySlug: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint PUT /api-public/v1/overrides/{publicId}/assignments/{policySlug}
@required {publicId: any, policySlug: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint DELETE /api-public/v1/overrides/{publicId}/assignments/{policySlug}
@required {publicId: any, policySlug: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/teams/{team}/rotations
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/teams/{team}/rotations
@required {team: any, body: map}
@optional {skip: any, count: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint DELETE /api-public/v1/teams/{team}/rotations/{groupId}
@required {team: any, groupId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/teams/{team}/rotations/{groupId}/{shiftId}/scheduled
@required {team: any, groupId: any, shiftId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PUT /api-public/v1/teams/{team}/rotations/{groupId}/{shiftId}/scheduled
@required {team: any, groupId: any, shiftId: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v2/team/{team}/rotations
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/webhooks
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/policies
@optional {filter: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/policies
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/policies/{policy}
@required {policy: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint DELETE /api-public/v1/policies/{policy}
@required {policy: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endgroup

@group api-reporting
@endpoint GET /api-reporting/v2/incidents
@optional {offset: any, limit: any, entityId: any, incidentNumber: any, startedAfter: any, startedBefore: any, host: any, service: any, currentPhase: any, routingKey: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endgroup

@group api-public
@endpoint POST /api-public/v1/team
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/team
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/team/{team}
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint PUT /api-public/v1/team/{team}
@required {team: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint DELETE /api-public/v1/team/{team}
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/team/{team}/policies
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/team/{team}/admins
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /api-public/v1/team/{team}/members
@required {team: any}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint POST /api-public/v1/team/{team}/members
@required {team: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint DELETE /api-public/v1/team/{team}/members/{user}
@required {team: any, user: any, body: map}
@returns(200)
@errors {400, 401, 403, 404, 422, 500}

@endpoint GET /api-public/v1/maintenancemode
@returns(200)
@errors {403, 500}

@endpoint POST /api-public/v1/maintenancemode/start
@required {body: map}
@returns(200)
@errors {403, 409, 420, 500}

@endpoint PUT /api-public/v1/maintenancemode/{maintenancemodeid}/end
@required {maintenancemodeid: any}
@returns(200)
@errors {403, 500}

@endpoint POST /api-public/v1/chat
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint POST /api-public/v1/stakeholders/sendMessage
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 429, 500}

@endpoint GET /api-public/v1/alertRules
@returns(200)
@errors {400, 401, 403, 500}

@endpoint POST /api-public/v1/alertRules
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PUT /api-public/v1/alertRules/{ruleId}
@required {body: map, ruleId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint DELETE /api-public/v1/alertRules/{ruleId}
@required {ruleId: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endgroup

@end
