swagger: '2.0' info: description: API for custom datapurge version: 1.0.0 title: Data Purge REEST API host: control.tower.host basePath: /api/v1/ schemes: - https paths: /data-purges: post: summary: Create new data-purge configuration description: Supply either stored procedure name with parameteers or custom SQL operationId: createDataPurge consumes: - application/json produces: - application/json parameters: - in: body name: body description: DataPurge object that needs to be added to CT database required: true schema: $ref: '#/definitions/DataPurgeCreatoionRequest' responses: '200': description: successful operation schema: $ref: '#/definitions/DataPurge' '400': description: Invalid input '403': description: Operaiton not permitted '/data-purges/{uuid}': put: summary: Update existing data-purge configuration description: '' operationId: updateDataPurge consumes: - application/json produces: - application/json parameters: - in: body name: body description: DataPurge object to be updated on CT side required: true schema: $ref: '#/definitions/DataPurgeCreatoionRequest' - name: uuid in: path description: data purge UUID required: true type: string responses: '200': description: successful operation schema: $ref: '#/definitions/DataPurge' '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Datapurge not found delete: summary: Delete existing data-purge configuration description: '' operationId: deleteDataPurge consumes: - application/json produces: - application/json parameters: - name: uuid in: path description: data purge UUID required: true type: string responses: '200': description: Successful operation '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Datapurge not found get: summary: Get information about particular data-purge configuration description: '' operationId: findByUUID produces: - application/json parameters: - name: uuid in: path description: Datapurge UUID required: true type: string responses: '200': description: successful operation schema: $ref: '#/definitions/DataPurge' '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Datapurge not found /data-purges/: get: summary: List all data-purge configurations description: '' operationId: listDataPurges produces: - application/json parameters: - name: page in: query description: page number required: true type: integer format: int64 - name: size in: query description: page size required: true type: integer format: int64 - name: sort in: query description: sort field required: true type: string - name: sortDirection in: query description: sort direction required: true type: string responses: '200': description: successful operation schema: type: array items: $ref: '#/definitions/DataPurge' '400': description: Invalid input '403': description: Operaiton not permitted /data-purges/procedures: get: summary: List all available stored procedures description: '' operationId: listStoredProcedures consumes: - application/json produces: - application/json parameters: [] responses: '200': description: successful operation schema: type: array items: $ref: string '400': description: Invalid input '403': description: Operaiton not permitted '/data-purges/procedures/{sp_name}': get: summary: Get stored procedure parameters description: '' operationId: getStoredProcedureParameters consumes: - application/json produces: - application/json parameters: - name: sp_name in: path description: stored proceedure name required: true type: string responses: '200': description: successful operation schema: type: array items: $ref: string '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Stored procedure not found '/data-purges/{data_purge_uuid}/start': post: summary: Start Data Purge From Given Configuration Without Scheduler description: "" operationId: startPurge produces: - application/json parameters: - name: data_purge_uuid in: path description: data purge UUID required: true type: string responses: '200': description: successful operation schema: $ref: '#/definitions/LaunchResponse' '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Configuration not found '/data-purges/{data_purge_uuid}/events/{execution_id}': get: summary: Get events by execution description: '' operationId: getEventsByExecution produces: - application/json parameters: - name: data_purge_uuid in: path description: Execution ID required: true type: string - name: execution_id in: path description: Execution ID required: true type: number responses: '200': description: successful operation schema: type: array items: $ref: '#/definitions/Event' '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Execution not found '/data-purges/{data_purge_uuid}/statuses': get: summary: Get all execution statuses by configuration description: "" operationId: startScheduler produces: - application/json parameters: - name: data_purge_uuid in: path description: data purge UUID required: true type: string responses: '200': description: successful operation schema: $ref: '#/definitions/DataPurgeStatusResponse' '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Data purge not found '/data-purges/{data_purge_uuid}/events': get: summary: Get events by configuration description: '' operationId: getEventsByScheduler produces: - application/json parameters: - name: data_purge_uuid in: path description: Datapurge UUID required: true type: string responses: '200': description: successful operation schema: type: array items: $ref: '#/definitions/Event' '400': description: Invalid input '403': description: Operaiton not permitted '404': description: Data purge not found definitions: DataPurgeCreatoionRequest: type: object required: - name - cronExpression properties: name: type: string description: type: string storedProcedureName: type: string cronExpression: type: string customSql: type: string active: type: boolean parameters: type: array items: $ref: '#/definitions/ParameterValue' DataPurge: type: object properties: uuid: type: string name: type: string description: type: string storedProcedureName: type: string cronExpression: type: string active: type: boolean lastExecutionPoint: type: string nextExecutionPoint: type: string creationDate: type: string parameters: type: array items: $ref: '#/definitions/ParameterValue' ParameterValue: type: object properties: name: type: string value: type: string Event: type: object properties: eventDate: type: string schedulerUuid: type: string storedProcedureName: type: string description: type: string level: type: string LaunchResponse: type: object properties: executionId: type: number ErrorResponse: type: object properties: message: type: string DataPurgeStatusResponse: type: object properties: uuid: type: array items: type: string externalDocs: description: Find out more about Swagger url: 'http://swagger.io'