openapi: 3.2.0 info: version: 1.0.0 title: Create Your Own Integration Custom Integration Configs API description: This API enables you to create and manage custom endpoints for inbound integrations. 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: custom-integration-configs description: Operations for custom integration configs paths: /v2/integrations/byoapi/{endpointId}/config/draft: put: tags: - custom-integration-configs summary: Updates the draft config for an endpoint operationId: updateDraftEndpointConfig parameters: - name: endpointId in: path description: The unique id of the endpoint required: true schema: type: string requestBody: description: The updated config required: true content: application/json: schema: $ref: '#/components/schemas/EndpointConfigDto' responses: '200': description: Successfully updated draft config content: application/json: schema: $ref: '#/components/schemas/MoogResponseEndpointConfigDto' '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: description: Required user permissions for this endpoint value: - integrations:edit get: tags: - custom-integration-configs summary: Gets the draft config for a particular endpoint description: Gets the unpublished config for an endpoint. This draft is not being applied to payloads sent to the endpoint operationId: getDraftEndpointConfig parameters: - name: endpointId in: path description: The unique id of the endpoint required: true schema: type: string responses: '200': description: Successfully retrieved the draft config for the endpoint content: application/json: schema: $ref: '#/components/schemas/MoogResponseEndpointConfigDto' '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: description: Required user permissions for this endpoint value: - integrations:view /v2/integrations/byoapi/{endpointId}/config/live: put: tags: - custom-integration-configs summary: Updates the live config for an endpoint operationId: updateLiveEndpointConfig parameters: - name: endpointId in: path description: The unique id of the endpoint required: true schema: type: string requestBody: description: The updated config required: true content: application/json: schema: $ref: '#/components/schemas/EndpointConfigDto' responses: '200': description: Successfully updated live config content: application/json: schema: $ref: '#/components/schemas/MoogResponseEndpointConfigDto' '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: description: Required user permissions for this endpoint value: - integrations:edit get: tags: - custom-integration-configs summary: Gets the live config for a particular endpoint description: Gets the live or published config that an endpoint is currently applying to incoming requests operationId: getLiveEndpointConfig parameters: - name: endpointId in: path description: The unique id of the endpoint required: true schema: type: string responses: '200': description: Successfully retrieved the live config for the endpoint content: application/json: schema: $ref: '#/components/schemas/MoogResponseEndpointConfigDto' '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: description: Required user permissions for this endpoint value: - integrations:view /v2/integrations/byoapi/{endpointId}/config/test: post: tags: - custom-integration-configs summary: Tests the provided config for an endpoint against a provided series of json… description: Tests the provided config for an endpoint against a provided series of json payloads operationId: testEndpointConfig parameters: - name: endpointId in: path description: The unique id of the endpoint required: true schema: type: string requestBody: description: The test config and test payloads required: true content: application/json: schema: $ref: '#/components/schemas/TestConfigAndPayloads' responses: '200': description: Successfully tested the config content: application/json: schema: $ref: '#/components/schemas/MoogResponseTestResult' '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: description: Required user permissions for this endpoint value: - integrations:edit components: schemas: Mapping: type: object title: Mapping MoogResponseEndpointConfigDto: type: object title: Moog Response Endpoint Config Dto description: Create Your Own Integration API EndpointConfigDto response body properties: status: type: string description: Success status indicator (always "success") examples: - success data: $ref: '#/components/schemas/EndpointConfigDto' required: - status - data LocationDto: type: object title: Location properties: street: type: string building: type: string suite: type: integer format: int32 floor: type: string city: type: string state_or_province: type: string country: type: string postcode: type: string geo_coordinates: $ref: '#/components/schemas/GeoLocationDto' rack: type: string aisle: type: string u_position: type: string region: type: string data_center: type: string availability_zone: type: string geo_coordinates_lat: type: integer format: int32 geo_coordinates_long: type: integer format: int32 TestResult: type: object title: Test Result description: The results of testing an endpoint config properties: mappingResults: type: array items: $ref: '#/components/schemas/TestMappingResultDto' dedupeKeyStatus: type: object additionalProperties: $ref: '#/components/schemas/DedupeKeyStatus' MoogErrorResponse: type: object description: Create Your Own Integration 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 WebEventDto: type: object title: Event properties: source: type: string description: The source that generated the event maxLength: 32500 examples: - www.your-source.com check: type: string description: The check that triggered the event examples: - cpu load severity: $ref: '#/components/schemas/Severity' description: The relative severity of the event description: type: string description: A human-readable description of the event maxLength: 32500 examples: - CPU spike to 75% deduplication_key: type: string description: Custom event deduplication key value examples: - my-service::user-response-time time: $ref: '#/components/schemas/Timestamp' description: Time of event, seconds or milliseconds since Jan 1, 1970 UTC. If not specified, arrival time is used. services: type: array description: One or more services that gathered the event or are associated with it examples: - - retail - support items: type: string alias: type: string description: The alias for the event source utc_offset: type: string description: An offset to apply to the provided event time, as an abbreviation such as "PST", a full name such as "America/Los_Angeles", or offset form such as "GMT-8:00" examples: - UTC manager: type: string description: A general identifier of the event generator or intermediary, such as AppDynamics, NewRelic, etc. examples: - CloudWatchEC2 manager_id: type: string description: ID for the external manager or tool that sent the event examples: - '1234' class: type: string description: The high-level category of the resource that generated the fault or performance event examples: - Application namespace: type: string description: The namespace value related to the event type: type: string description: The high-level category of the issue that generated the fault or performance event examples: - Capacity tags: type: object description: Tags cannot contain embedded objects; nor lists other than a "labels" list location: $ref: '#/components/schemas/LocationDto' description: A set of key-value pairs that specific the physical or virtual location where the event occurred policyId: type: string description: The policy id representing the policy associated with the moog detector required: - source - check - severity - description GeoLocationDto: type: object title: GeoLocation properties: lat: type: number format: float long: type: number format: float TestMappingResultDto: type: object title: Test Mapping Result Dto properties: payloadProcessingResult: type: string errorMessage: type: string dedupeKeyErrors: type: object additionalProperties: type: string event: $ref: '#/components/schemas/WebEventDto' metric: {} DedupeKeyStatus: type: string enum: - SUCCESS - PARTIAL - FAILURE title: Dedupe Key Status Timestamp: type: integer title: Timestamp description: Number of milliseconds since Jan 1, 1970 UTC format: int64 EndpointConfigDto: type: object title: Endpoint Config Dto description: Create your own endpoint configuration. properties: batchKey: type: string description: Optional batch key mappings: type: array description: List of the mappings. minItems: 1 items: $ref: '#/components/schemas/Mapping' required: - mappings MoogResponseTestResult: type: object title: Moog Response Test Result description: Create Your Own Integration API TestResult response body properties: status: type: string description: Success status indicator (always "success") examples: - success data: $ref: '#/components/schemas/TestResult' required: - status - data MoogFailureResponse: type: object description: Create Your Own Integration 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 TestConfigAndPayloads: type: object title: Test Config And Payloads description: The test config and json payloads required to run a test properties: testConfig: $ref: '#/components/schemas/EndpointConfigDto' testPayloads: type: array minItems: 1 items: type: object required: - testConfig - testPayloads Severity: type: string enum: - clear - unknown - warning - minor - major - critical title: Severity description: Severity Level (case-insensitive) securitySchemes: ApiKeyAuth: type: apiKey description: API Key for accessing Create Your Own Integration API name: apiKey in: header externalDocs: url: https://docs.moogsoft.com/en/moogsoft-apis.html description: Find out more about Apex AIOps Incident Management