openapi: 3.2.0 info: version: 1.0.0 title: On-Call notification policies API description: This API allows you to save and retrieve on-call schedules, escalation policies termsOfService: https://www.moogsoft.com/legal-information/express-terms-conditions/ contact: name: API Support url: https://docs.moogsoft.com/en/moogsoft-apis.html email: support@moogsoft.com license: url: https://www.moogsoft.com/legal-information name: Apex AIOps Incident Management Proprietary servers: - url: https://api.moogsoft.ai - url: https://api.dev.moogsoft.cloud security: - ApiKeyAuth: [] tags: - name: Notification Policies description: notification policies for on-call paths: /v1/on-call/notification-policy: get: tags: - Notification Policies summary: Retrieves all, existing on-call notification policies operationId: getNotificationPolicies parameters: - name: limit in: query schema: type: integer description: Specifies limit when retrieving the on-call notification policies format: int32 exclusiveMinimum: 0 default: 100 - name: offset in: query schema: type: integer description: Specifies offset record when retrieving the on-call notification policies format: int32 minimum: 0 default: 0 - name: sortBy in: query schema: type: string enum: - created - lastUpdated - name - createdBy - lastUpdatedBy description: Specifies the column to sort by when retrieving the on-call notification policies default: created - name: sortOrder in: query schema: type: string enum: - asc - desc description: Specifies the sorting order when retrieving the on-call notification policies default: desc responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseNotificationPolicyListDto' '400': description: Invalid parameters or data validation violation content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' '404': description: Requested object(s) not found content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 4XX: description: Authorization or other error content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/MoogErrorResponse' security: - ApiKeyAuth: [] servers: - url: https://api.moogsoft.ai - url: https://api.dev.moogsoft.cloud x-permissions: value: - oncall:view description: Required user permissions for this endpoint post: tags: - Notification Policies summary: creates a new on-call notification policy operationId: createNotificationPolicy requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BaseNotificationPolicyDto' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseNotificationPolicyDto' '400': description: Bad Request '404': description: Requested object(s) not found content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 4XX: description: Authorization or other error content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/MoogErrorResponse' security: - ApiKeyAuth: [] servers: - url: https://api.moogsoft.ai - url: https://api.dev.moogsoft.cloud x-permissions: value: - oncall:edit description: Required user permissions for this endpoint /v1/on-call/notification-policy/{id}: patch: tags: - Notification Policies summary: Updates an existing on-call notification policy operationId: updateNotificationPolicy parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BaseNotificationPolicyDto' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseNotificationPolicyDto' '400': description: Invalid parameters or data validation violation content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' '404': description: Requested object(s) not found content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 4XX: description: Authorization or other error content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/MoogErrorResponse' security: - ApiKeyAuth: [] servers: - url: https://api.moogsoft.ai - url: https://api.dev.moogsoft.cloud x-permissions: value: - oncall:edit description: Required user permissions for this endpoint get: tags: - Notification Policies summary: Retrieves an existing on-call notification policy operationId: getNotificationPolicy parameters: - name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseNotificationPolicyDto' '400': description: Invalid parameters or data validation violation content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' '404': description: Requested object(s) not found content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 4XX: description: Authorization or other error content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/MoogErrorResponse' security: - ApiKeyAuth: [] servers: - url: https://api.moogsoft.ai - url: https://api.dev.moogsoft.cloud x-permissions: value: - oncall:view description: Required user permissions for this endpoint delete: tags: - Notification Policies summary: Deletes an existing on-call notification policy operationId: deleteNotificationPolicy parameters: - name: id in: path required: true schema: type: string responses: '204': description: No Content '400': description: Invalid parameters or data validation violation content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' '404': description: Requested object(s) not found content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 4XX: description: Authorization or other error content: application/json: schema: $ref: '#/components/schemas/MoogFailureResponse' 5XX: description: Error content: application/json: schema: $ref: '#/components/schemas/MoogErrorResponse' security: - ApiKeyAuth: [] servers: - url: https://api.moogsoft.ai - url: https://api.dev.moogsoft.cloud x-permissions: value: - oncall:edit description: Required user permissions for this endpoint components: schemas: NotificationPolicyListDto: type: object title: Notification Policy List Dto properties: result: type: array description: List of on-call notification policies, as per sortOrder/sortBy/offset/limit items: $ref: '#/components/schemas/NotificationPolicyDto' count: type: integer description: Total number of on-call notification policies that would have been returned in the absence of offset and limit format: int64 MoogErrorResponse: type: object description: On-Call API error response body properties: status: type: string description: Error status indicator (always "error") examples: - error message: type: string additional: type: array items: type: string required: - status - message NotificationPolicyDto: type: object title: Notification Policy Dto properties: name: type: string description: The name of the notification policy. pattern: ^[a-zA-Z0-9()_\-\s]+$ minLength: 1 maxLength: 127 enabled: type: boolean description: Indicates whether the policy is enabled/disabled default: true description: type: string description: (optional) A description for the notification policy. maxLength: 280 incident_filter: type: string description: An filter expression to query. pattern: \S notification_actions: type: array description: A list of actions for the notification policy to step through once triggered. minItems: 1 maxItems: 40 items: $ref: '#/components/schemas/NotificationAction' id: type: string description: unique id of the notification policy readOnly: true created: $ref: '#/components/schemas/Timestamp' description: when the policy was created last_updated: $ref: '#/components/schemas/Timestamp' description: when the policy was last updated created_by: type: string description: user who created the policy readOnly: true last_updated_by: type: string description: user who last updated the policy readOnly: true required: - name - incident_filter - notification_actions MoogResponseNotificationPolicyListDto: type: object description: On-Call API NotificationPolicyListDto response body properties: status: type: string description: Success status indicator (always "success") examples: - success data: $ref: '#/components/schemas/NotificationPolicyListDto' required: - status - data NotificationAction: type: object title: Notification Action properties: id: type: string discriminator: propertyName: '@type' mapping: DELAY: '#/components/schemas/DelayAction' NOTIFY: '#/components/schemas/NotifyScheduleAction' NOTIFY_USER: '#/components/schemas/NotifyUserAction' MoogFailureResponse: type: object description: On-Call API failure response body properties: status: type: string description: Failure status indicator (always "failure") examples: - failure message: type: string additional: type: array items: type: string required: - status - message Timestamp: type: integer title: Timestamp description: Number of milliseconds since Jan 1, 1970 UTC format: int64 BaseNotificationPolicyDto: type: object title: Base Notification Policy Dto description: A notification policy for paging a set of on-call schedules properties: name: type: string description: The name of the notification policy. pattern: ^[a-zA-Z0-9()_\-\s]+$ minLength: 1 maxLength: 127 enabled: type: boolean description: Indicates whether the policy is enabled/disabled default: true description: type: string description: (optional) A description for the notification policy. maxLength: 280 incident_filter: type: string description: An filter expression to query. pattern: \S notification_actions: type: array description: A list of actions for the notification policy to step through once triggered. minItems: 1 maxItems: 40 items: $ref: '#/components/schemas/NotificationAction' required: - name - incident_filter - notification_actions MoogResponseNotificationPolicyDto: type: object description: On-Call API NotificationPolicyDto response body properties: status: type: string description: Success status indicator (always "success") examples: - success data: $ref: '#/components/schemas/NotificationPolicyDto' required: - status - data securitySchemes: ApiKeyAuth: type: apiKey description: API Key for accessing On-Call API name: apiKey in: header externalDocs: url: https://docs.moogsoft.com/en/moogsoft-apis.html description: Find out more about Apex AIOps Incident Management