{
    "openapi": "3.0.1",
    "info": {
      "title": "Audit Log Staging Service APIs",
      "description": "OpenAPI v3 specification for Audit Log Staging Service: <a href='/APIs/auditlogMicroservice.json' target='_blank' download='auditlogstaging.json'>Download</a> \n\n # Introduction \n\n The Audit Log Staging APIs provides the ability to download audit logs.\n\nTo execute the Audit Log Staging Service APIs, you must provide an authentication token generated from the Boomi Enterprise Platform. Learn more about the token authentication, sample requests and responses, and the different error codes of these APIs.\n\n >**Note:** The Audit Log Staging APIs use a `Boomi-JWT` authentication, which is different from the `basic-auth` authentication of the Boomi Enterprise Platform APIs. \n\n ## API Errors \n\n - 400 (Bad Request): Input parameters are invalid.\n\n - 401 (Unauthorized): User access tokens are invalid or expired.\n\n - 404 (Not Found): The specified url/request could not be found.\n\n - 403 (Forbidden) \n\n - 405 (Method Not Allowed): The request method is not supported.\n\n - 409 (Conflict): A request with the same accountId and date range already exists. \n\n - 500 (Internal Server Error): Unexpected server issues. \n\n## JWT authentication tokens\n\nThese APIs require JWT authentication. Include your JWT bearer token in the Authorization header of each request. \n\nTo generate a JWT token, you must use HTTP Basic authentication and provide your Boomi Enterprise Platform account `username` and `password` in a GET request to the Platform API.\n\nFor North American Platform accounts, send a GET request to:\n\n`https://api.boomi.com/auth/jwt/generate/{accountId}`\n\nFor European Platform accounts, the URL is:\n\n`https://api.platform.gb.boomi.com/auth/jwt/generate/{accountId}`\n\nwhere `{accountId}` is the ID of the authenticating accout for the request. You can obtain your Enterprise Platform account information in **Settings \\> User Information \\> Account Information**.\n\n>**Note:** JWT tokens expire after 5 minutes. If you make a request with an expired token, you will receive a 401 error.\n\n",
      
      "license": {
        "name": "Boomi API License and Rate Limits",
        "url": "/docs/GettingStarted/API_licensing"
      },
      "version": "1.38"
    },
    "servers": [
      {
        "url": "https://api.boomi.com/auditlog-query",
        "description": "US"
      },
      {
      "url": "https://api.platform.gb.boomi.com/auditlog-query",
      "description": "GB"
    }
    ],
    "security": [
      {
        "Boomi-Platform-JWT": []
      }
    ],
    "tags": [
      {
        "name": "Audit Log Staging",
        "description": "The auditlog-query APIs allow you to download blob audit log data instead of making stacked API requests. You can also choose to receive an email notification when the download is complete."
      }
    ],
    "paths": {
      "/rest/v1/auditlog/query/staging": {
        "post": {
          "tags": [
            "Audit Log Staging"
          ],
          "summary": "Blob Audit Log Request",
          "description": "This API allows you to request blob data for audit logs based on the date range. It stages a request to query audit logs based on the provided criteria. \n\n ### Request Parameters \n\n - `fromDate` is the start date and time for the range of audit logs to retrieve. The date must be formatted as `YYYY-MM-DDThh:mm:ssZ` (i.e. 2024-11-29T11:08:10Z). The timezone must be UTC. \n -  `toDate` is the end date and time for the range of audit logs to retrieve. The range you set must be greater than 7 days but less than one year. The date must be formatted as `YYYY-MM-DDThh:mm:ssZ` (i.e. 2024-11-29T11:08:10Z). The timezone is UTC. \n - `accountId` is the the identifier requesting the API. \n - `email` is the email you want to be notified at if the request is successful. This is an optional field.",
          "operationId": "stageAuditLogRequest",
          "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "example": {
                  "queryFilter": {
                    "expression": {
                      "values": [
                        "2024-11-15T10:24:07Z (FromDate)",
                        "2024-12-07T11:59:56Z (ToDate)"
                      ],
                      "operator": "BETWEEN",
                      "property": "date"
                    }
                  },
                  "accountId": "boomi-internal",
                  "email": "user@boomi.com"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagingResponse"
                },
                "example": {
                  "error": "Invalid date format"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The specified url/request could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagingResponse"
                },
                "example": {
                  "statusCode": "NOT_FOUND",
                  "error": "No endpoint POST /auditlog-query-devtest/rest/v1/auditlog/query/stagingg."
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - An error occurred while processing the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagingResponse"
                },
                "example": {
                  "error": "Unable to process your request internal error"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed - The request method is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagingResponse"
                },
                "example": {
                  "statusCode": "METHOD_NOT_ALLOWED",
                  "error": "Request method 'GET' is not supported"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - The request lacks valid authentication credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                },
                "example": {
                  "resultCode": "RESTRICTED",
                  "serviceTransactionId": "b99d27cf-ca5f-447b-99a0-1ffb643be452",
                  "resultString": "Token is invalid or expired"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - A request with the same accountId and date range already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagingResponse"
                },
                "examples": {
                  "StagingResponse": {
                    "description": "StagingResponse",
                    "value": {
                      "requestId": 137,
                      "error": "A request with the same accountId and date range already exists."
                    }
                  },
                  "AnotherResponse": {
                    "description": "AnotherResponse",
                    "value": {
                      "requestId": 159,
                      "error": "A request with the accountId is already in progress or pending."
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Successfully received the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StagingResponse"
                },
                "example": {
                  "requestId": 159,
                  "message": "Blob data request for audit logs has been received"
                }
              }
            }
          }
        }
      }
    },
      "/rest/v1/auditlog/query/staging/{accountId}/{requestId}/status": {
        "get": {
          "tags": [
            "Audit Log Staging"
          ],
          "summary": "Get Status of Blob Audit Log Request",
          "description": "The Status API allows you to check the status of a previously made request. This API is useful for tracking the progress or completion of previous requests. Once a request is completed, the audit log staging data is deleted after 7 days for security purposes. You can make new requests as needed.\n",
          "operationId": "statusRequest",
          "parameters": [
            {
              "name": "accountId",
              "in": "path",
              "required": true,
              "schema": {
                "type": "string"
              },
              "description": "Unique string identifier for the request whose status you want to retrieve"
            },
            {
              "name": "requestId",
              "in": "path",
              "required": true,
              "schema": {
                "type": "integer",
                "format": "int64"
              },
              "description": "Unique long integer for the request whose status you want to retrieve"
            }
          ],
          "responses": {
            "400": {
              "description": "Bad Request",
              "content": {
                "application/json": {
                  "schema": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ErrorHandler"
                      },
                      {
                        "$ref": "#/components/schemas/ModelErrorResult"
                      }
                    ]
                  }
                }
              }
            },
            "404": {
              "description": "Not Found - The specified request ID was not found for the logged-in user.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "example": {
                    "statusCode": "NOT_FOUND",
                    "error": "Request ID not found for the logged-in user"
                  }
                }
              }
            },
            "500": {
              "description": "Internal Server Error - An error occurred while processing the request.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "example": {
                    "error": "Unable to process your request internal error"
                  }
                }
              }
            },
            "405": {
              "description": "Method Not Allowed",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/ErrorHandler"
                  }
                }
              }
            },
            "403": {
              "description": "Forbidden",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/ModelErrorResult"
                  }
                }
              }
            },
            "401": {
              "description": "Unauthorized - The request lacks valid authentication credentials.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/ErrorResult"
                  },
                  "example": {
                    "resultCode": "RESTRICTED",
                    "serviceTransactionId": "b99d27cf-ca5f-447b-99a0-1ffb643be452",
                    "resultString": "Token is invalid or expired"
                  }
                }
              }
            },
            "200": {
              "description": "Successfully retrieved the request status.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "examples": {
                    "StagingResponse": {
                      "description": "StagingResponse",
                      "value": {
                        "requestId": 160,
                        "message": "AuditLog request completed successfully",
                        "downloadLink": "https://aws.com/presignedurl",
                        "downloadLinkExpiry": "2024-12-31T23:59:59Z",
                        "checksum": "78c53d143b059a4f0913848a30d39529"
                      }
                    },
                    "AnotherSuccess": {
                      "description": "AnotherSuccess",
                      "value": {
                        "requestId": 121,
                        "message": "Request is already cancelled."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "/rest/v1/auditlog/query/staging/accounts/{accountId}/requests/{requestId}": {
        "delete": {
          "tags": [
            "Audit Log Staging"
          ],
          "summary": "Cancel Blob Audit Log Request",
          "description": "Cancels a previously staged audit log request based on the account ID and request ID.\n",
          "operationId": "cancelRequest",
          "parameters": [
            {
              "name": "accountId",
              "in": "path",
              "required": true,
              "schema": {
                "type": "string"
              },
              "description": "Unique string identifier for the request whose status you want to retrieve"
            },
            {
              "name": "requestId",
              "in": "path",
              "required": true,
              "schema": {
                "type": "integer",
                "format": "int64"
              },
              "description": "Unique long integer for the request whose status you want to retrieve"
            }
          ],
          "responses": {
            "400": {
              "description": "Bad Request",
              "content": {
                "application/json": {
                  "schema": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ErrorHandler"
                      },
                      {
                        "$ref": "#/components/schemas/ModelErrorResult"
                      }
                    ]
                  }
                }
              }
            },
            "404": {
              "description": "Not Found - The specified url/request could not be found.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "example": {
                    "statusCode": "NOT_FOUND",
                    "error": "No endpoint POST /auditlog-query-devtest/rest/v1/auditlog/query/stagingg."
                  }
                }
              }
            },
            "500": {
              "description": "Internal Server Error - An error occurred while processing the request.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "example": {
                    "resultCode": "GENERAL_ERROR",
                    "serviceTransactionId": "5981aa64-e478-4735-a4b0-ee866575fb55",
                    "resultString": "No static resource rest/v2/accounts/boomi_accountId/auditlog/c687d4ef-a4d8-49be-af38-7bc88da2ae7bm."
                  }
                }
              }
            },
            "405": {
              "description": "Method Not Allowed - The request method is not supported.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "example": {
                    "statusCode": "METHOD_NOT_ALLOWED",
                    "error": "Request method 'GET' is not supported"
                  }
                }
              }
            },
            "403": {
              "description": "Forbidden",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/ModelErrorResult"
                  }
                }
              }
            },
            "401": {
              "description": "Unauthorized - The request lacks valid authentication credentials.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/ErrorResult"
                  },
                  "example": {
                    "resultCode": "RESTRICTED",
                    "serviceTransactionId": "b99d27cf-ca5f-447b-99a0-1ffb643be452",
                    "resultString": "Token is invalid or expired"
                  }
                }
              }
            },
            "200": {
              "description": "Successfully canceled the request.",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/StagingResponse"
                  },
                  "examples": {
                    "StagingResponse": {
                      "description": "StagingResponse",
                      "value": {
                        "requestId": 160,
                        "message": "Request has been cancelled successfully."
                      }
                    },
                    "AnotherResponse": {
                      "description": "AnotherResponse",
                      "value": {
                        "requestId": 121,
                        "message": "Request is already cancelled."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "components": {
      "schemas": {
        "ModelErrorResult": {
          "type": "object",
          "properties": {
            "resultCode": {
              "type": "string",
              "enum": [
                "OK",
                "GENERAL_ERROR",
                "NOT_FOUND",
                "UNIMPLEMENTED",
                "NOT_SUPPORTED",
                "VALIDATION_ERROR",
                "RESTRICTED",
                "INSUFFICIENT_AUTHENTICATION"
              ]
            },
            "serviceTransactionId": {
              "type": "string"
            },
            "resultString": {
              "type": "string"
            }
          }
        },
        "ErrorHandler": {
          "type": "object",
          "properties": {
            "statusCode": {
              "type": "string"
            },
            "error": {
              "type": "string"
            }
          }
        },
        "StagingResponse": {
          "type": "object",
          "properties": {
            "requestId": {
              "type": "integer",
              "format": "int64",
              "description": "A unique identifier assigned to a staging API request. This ID is provided in the response to the user."
            },
            "message": {
              "type": "string",
              "description": "Conveys the outcome of the API request."
            },
            "error": {
              "type": "string",
              "description": "Indicates any error that occurs during the request."
            },
            "downloadLink": {
              "type": "string",
              "description": "URL link to download the staging blob data archive file."
            },
            "downloadLinkExpiry": {
              "type": "string",
              "description": "The time when the download link expires."
            },
            "checksum": {
              "type": "string",
              "description": "MD5 hash of the downloaded file to verify the integrity of the data."
            }
          }
        },
        "ErrorResult": {
          "type": "object",
          "properties": {
            "resultCode": {
              "type": "string",
              "enum": [
                "OK",
                "GENERAL_ERROR",
                "NOT_FOUND",
                "UNIMPLEMENTED",
                "NOT_SUPPORTED",
                "VALIDATION_ERROR",
                "RESTRICTED",
                "INSUFFICIENT_AUTHENTICATION"
              ]
            },
            "serviceTransactionId": {
              "type": "string"
            },
            "resultString": {
              "type": "string"
            }
          }
        }
      },
      "securitySchemes": {
        "Boomi-Platform-JWT": {
          "type": "http",
          "description": "\u003Cul\u003E\n\u003Cli\u003EValue for JWT can be obtained by using platform endpoint '/auth/jwt/generate/{accountId}'\u003C/li\u003E\n\u003Cli\u003EPlease, note that this token expires after 5 minutes.\u003C/li\u003E\n\u003C/ul\u003E",
          "scheme": "bearer",
          "bearerFormat": "JWT"
        }
      }
    }
  }