openapi: 3.2.0 info: version: 3.0.0 title: Alerts/Incidents Autoclose Policy API description: This API enables you to retrieve and update alerts and incidents, and other APIs relating to them 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: autoclose-policy description: Autoclose policy for alerts and incidents paths: /v2/autoclose-policy: get: tags: - autoclose-policy summary: Get autoclose policies description: Get autoclose policies for alert, incident, or both operationId: getAutoClosePolicies parameters: - name: type in: query schema: type: string description: Type of policy to retrieve (incident or alert), retrieves both types if empty default: '' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseListOfAutoClosePolicyDto' '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: - automation:view description: Required user permissions for this endpoint post: tags: - autoclose-policy summary: Create autoclose policy description: Create autoclose policy for alerts or incidents. operationId: postAutoClosePolicy requestBody: description: Settings used to create new policy required: true content: application/json: schema: $ref: '#/components/schemas/BaseAutoClosePolicyDto' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseAutoClosePolicyDto' '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: - automation:edit description: Required user permissions for this endpoint /v2/autoclose-policy/{id}: patch: tags: - autoclose-policy summary: Update autoclose policy description: Update autoclose policy for alerts or incidents. operationId: patchAutoClosePolicy parameters: - name: id in: path required: true schema: type: string requestBody: description: Settings used to update existing policies. required: true content: application/json: schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseAutoClosePolicyDto' '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: - automation:edit description: Required user permissions for this endpoint get: tags: - autoclose-policy summary: Get autoclose policy description: Get autoclose policy by id operationId: getAutoClosePolicy parameters: - name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MoogResponseAutoClosePolicyDto' '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: - automation:view description: Required user permissions for this endpoint delete: tags: - autoclose-policy summary: Delete autoclose policy description: Delete autoclose policy with specified id operationId: deleteAutoClosePolicy 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: - automation:edit description: Required user permissions for this endpoint components: schemas: Instant: type: number title: Instant format: int64 examples: - '2022-03-10T16:15:50Z' MoogErrorResponse: type: object description: Alerts/Incidents 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 MoogResponseAutoClosePolicyDto: type: object description: Alerts/Incidents API AutoClosePolicyDto response body properties: status: type: string description: Success status indicator (always "success") examples: - success data: $ref: '#/components/schemas/AutoClosePolicyDto' required: - status - data MoogFailureResponse: type: object description: Alerts/Incidents 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 AutoClosePolicyDto: type: object title: Auto Close Policy Dto properties: name: type: string type: type: string description: type: string filter: type: string close_resolved_in_seconds: type: integer format: int64 close_all_in_seconds: type: integer format: int64 id: type: string created_at: $ref: '#/components/schemas/Instant' created_by: type: string last_updated: $ref: '#/components/schemas/Instant' last_updated_by: type: string MoogResponseListOfAutoClosePolicyDto: type: object description: Alerts/Incidents API AutoClosePolicyDto response body properties: status: type: string description: Success status indicator (always "success") examples: - success data: type: array items: $ref: '#/components/schemas/AutoClosePolicyDto' required: - status - data BaseAutoClosePolicyDto: type: object title: Base Auto Close Policy Dto properties: name: type: string type: type: string description: type: string filter: type: string close_resolved_in_seconds: type: integer format: int64 close_all_in_seconds: type: integer format: int64 securitySchemes: ApiKeyAuth: type: apiKey description: API Key for accessing Alerts/Incidents API name: apiKey in: header externalDocs: url: https://docs.moogsoft.com/en/moogsoft-apis.html description: Find out more about Apex AIOps Incident Management