2.0info: 3.1.5 Report executor description: Service that execute reports x-senior-domain: Platform x-senior-domain-path: platform x-senior-service-path: report_executor contact: name: Senior X Platform url: https://dev.senior.com.br email: seniorx-dev@senior.com.brhost: platform.senior.com.br /t/senior.com.br/bridge/1.0/rest/platformsecurityDefinitions: APIKeyHeader: type: apiKey in: header name: Authorizationsecurity: – APIKeyHeader: [] – application/json – application/jsonpaths: /report_executor/queries/healthcheck: post: description: Query para o SRE verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthcheckDTO description: Status geral do serviço checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Verificações para assegurar o status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Query para o SRE verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PUBLIC parameters: responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthcheckDTO description: Status geral do serviço checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Verificações para assegurar o status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /report_executor/queries/getMetadata: post: description: Default getMetadata query. Every service must handle this command and return metadata in the format requested. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: metadataFormat: type: string description: responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Default getMetadata query. Every service must handle this command and return metadata in the format requested. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: metadataFormat description: in: query type: string responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /report_executor/queries/getDependencies: post: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – dependencies properties: dependencies: type: array items: type: object allOf: – #/definitions/dependency minimum: 1 description: List with this service dependencies 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – dependencies properties: dependencies: type: array items: type: object allOf: – #/definitions/dependency minimum: 1 description: List with this service dependencies 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /report_executor/actions/generateReport: post: description: Generates the report identified by the informed id. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – source – format properties: source: type: object allOf: – #/definitions/source description: The source of the report, SQL or HTTP link to a file format: type: string allOf: – #/definitions/format description: Output format for the report timeToLive: type: integer format: int64 description: Time to live, for how long the report will be available once it is generated. Default 5 days. default: 7200 queryTimeout: type: integer format: int64 description: Query timeout in seconds minimum: 1 default: 240 generationTimeout: type: integer format: int64 description: Max time spent generating report in seconds, 0 means without limit minimum: 0 default: 0 overrideUserTimezone: type: boolean description: Override default timezone default: false timezoneOffset: type: integer format: int64 description: The timezone that will override the default timezone default: 0 priority: type: string allOf: – #/definitions/priorityExecution description: Priority to execute that report timeShowsSeconds: type: boolean description: Informa se colunas do tipo time deverão mostrar os segundos default: false formatDecimalColumns: type: boolean description: Informa se colunas com valores decimais deverão ser formatadas se baseando no locale default: false notSanitizeColumnName: type: boolean description: Não aplicar sanitização no nome das colunas default: false fieldsConfiguration: type: array items: type: object allOf: – #/definitions/recFieldConfiguration description: Configurações específicas por coluna allowColumnCustomTypes: type: boolean description: Allow Request Column CustomTypes to report-database default: false responses: 200: description: Ok schema: type: object required: – ticket properties: ticket: type: string description: Ticket that identifies the report 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /report_executor/actions/cancelGeneration: post: description: Cancel a report generation tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – ticket properties: ticket: type: string description: Ticket that identifies the report responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /report_executor/events/reportGenerated: post: description: Event that indicates when the report execution has finished successfully x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – ticket – domain – service properties: ticket: type: string description: Ticket that identifies the report domain: type: string description: Domain name that originated the request service: type: string description: Service name that originated the request report: type: string description: Report HTTP link if status was success responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /report_executor/events/reportGeneratedError: post: description: Event that indicates when the report execution has finished with errors x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – ticket – domain – service – error properties: ticket: type: string description: Ticket that identifies the report domain: type: string description: Domain name that originated the request service: type: string description: Service name that originated the request error: type: string allOf: – #/definitions/error description: The identification of the error message: type: string description: Additional error message responses: 200: description: OK default: description: Error response schema: #/definitions/genericErrordefinitions: format: type: string enum: – PDF – CSV – HTML – XLS – XLSX – XML – ODT – RTF description: Formats that a report can be generated in: * `PDF` – PDF * `CSV` – CSV * `HTML` – HTML * `XLS` – XLS * `XLSX` – XLSX * `XML` – XML * `ODT` – ODT * `RTF` – RTF error: type: string enum: – UNEXPECTED_ERROR – TIMEOUT_EXCEPTION – DATABASE_UNAVAILABLE – LIMIT_EXCEEDED – INVALID_PARAMETER – CANCELED_GENERATION description: Errors that may occur in report generation: * `UNEXPECTED_ERROR` – When a unknown or unexpected exception its thrown * `TIMEOUT_EXCEPTION` – When the query timeouts * `DATABASE_UNAVAILABLE` – When the database its temporarily unavailable * `LIMIT_EXCEEDED` – When the limits for report generation its exceeded * `INVALID_PARAMETER` – Required parameter is missing or the data type is wrong * `CANCELED_GENERATION` – When generation is canceled dataType: type: string enum: – STRING – DATE – DATETIME – TIME – LONG – DOUBLE – FLOAT – BOOLEAN – BIGDECIMAL description: Type of the data: * `STRING` – String * `DATE` – Date * `DATETIME` – Date and time * `TIME` – Time * `LONG` – Long/Integer * `DOUBLE` – Double * `FLOAT` – Float * `BOOLEAN` – Boolean * `BIGDECIMAL` – Big decimal priorityExecution: type: string enum: – LOW – MEDIUM – HIGH description: Priority to maintain order in task executions: * `LOW` – Low * `MEDIUM` – Medium * `HIGH` – High healthcheckDTO: type: string enum: – UP – DOWN userNotificationKind: type: string enum: – Operational – Management – News description: User notification kind.: * `Operational` – Operational * `Management` – Management * `News` – News userNotificationPriority: type: string enum: – Error – Alert – None description: User notification priority.: * `Error` – Error * `Alert` – Alert * `None` – None eventEmailFormat: type: string enum: – HTML – PLAIN_TEXT description: Format of the email: * `HTML` – Html * `PLAIN_TEXT` – Plain Text parameter: description: Parameter for report generation type: object required: – name – value properties: name: type: string description: Name of the parameter value: type: string format: byte description: The value of the parameter queryParameter: description: Parameter for report generation in query mode type: object required: – type properties: value: type: string format: byte description: The value of the parameter type: type: string allOf: – #/definitions/dataType description: The type of the value parameter source: description: Can be a sourceFile or a sourceQuery discriminator: _discriminator type: object required: – _discriminator properties: _discriminator: type: string description: sourceFile: description: Indicates the source it is a report file to execute allOf: – #/definitions/source – type: object required: – source properties: source: type: string description: HTTP link to the source of report. For caching purposes, if the report changes, the URL must change too. parameters: type: array items: type: object allOf: – #/definitions/parameter description: Value for the required parameters sourceQuery: description: Indicates that the source is a SQL query allOf: – #/definitions/source – type: object required: – title – source properties: type: string description: The title to render in report source: type: string description: The SQL query of the report, use the ? symbol to represent where the parameter will be inject parameters: type: array items: type: object allOf: – #/definitions/queryParameter description: The parameters to inject in query execution, must be in the same order that they were declared in the sql maxRows: type: integer format: int64 description: Number of rows to retrieve, 0 means everything minimum: 0 default: 0 checkDTO: description: Dados do healthcheck type: object required: – name – status properties: name: type: string description: Nome do healthcheck status: type: string allOf: – #/definitions/healthcheckDTO description: Status do healthcheck recFieldConfiguration: description: Configurações de colunas type: object required: – fieldName properties: fieldName: type: string description: Nome da coluna label: type: string description: Alias da coluna width: type: integer format: int64 description: Largura da coluna notifyUserEventPayload: description: Represents a regular user event notification payload discriminator: _discriminator type: object required: – notificationKind – notificationPriority – notificationSubject – notificationContent – sourceDomain – sourceService – destinationUser – _discriminator properties: notificationClass: type: string description: Class of notification notificationOrigin: type: string description: Origin of notification. Free text. Optional. notificationKind: type: string allOf: – #/definitions/userNotificationKind description: Notification kind. notificationPriority: type: string allOf: – #/definitions/userNotificationPriority description: Notification priority. notificationSubject: type: string description: Notification subject. notificationContent: type: string description: Notification content. sourceDomain: type: string description: Domain that generates the notification. sourceService: type: string description: Service that generates the notification. destinationUser: type: string description: Username of the destination user. link: type: string description: Notification link _discriminator: type: string description: emailNotifyUserEventPayload: description: Represents an email notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – from properties: from: type: string description: Email sender address sendTo: type: array items: type: string description: Additional recipients to send the email to format: type: string allOf: – #/definitions/eventEmailFormat description: Email format pushNotifyUserEventPayload: description: Represents a push notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – applicationId properties: applicationId: type: string description: Apple/Google application id blobReference: description: Default blob reference type. Every service defines its own. type: object required: – targetObjectId properties: domainName: type: string description: The domain the blob belongs to. serviceName: type: string description: The service the blob belongs to. targetObjectId: type: string description: The basic id of the blob. targetCopyId: type: string description: The id of the blob copy. basicErrorPayload: description: Default error payload type. Every service defines its own. type: object properties: message: type: string description: The user-facing error message, if any. errorCode: type: string description: The program-accessible (and service-specific) error code. dependency: description: Represents a service dependency type: object required: – domain – service – version properties: domain: type: string description: Domain of the dependency service service: type: string description: Name of the dependency service type: string description: Version of the dependency service genericError: properties: message: type: string description: Messaging describing the error. reason: type: string enum: – BAD_REQUEST – UNAUTHORIZED – PAYMENT_REQUIRED – FORBIDDEN – OBJECT_NOT_FOUND – REQUEST_TIMEOUT – GONE – UNPROCESSABLE – INTERNAL_ERROR – NOT_IMPLEMENTED – SERVICE_UNAVAILABLE – INSUFFICIENT_STORAGE description: A symbolic code identifying the category of the reason of the error: * `BAD_REQUEST` – Bad Request * `UNAUTHORIZED` – Unauthorized * `PAYMENT_REQUIRED` – Payment Required * `OBJECT_NOT_FOUND` – Object Not Found * `REQUEST_TIMEOUT` – Request Timeout * `GONE` – Gone * `UNPROCESSABLE` – Unprocessable * `INTERNAL_ERROR` – Internal Error * `NOT_IMPLEMENTED` – Not Implemented * `SERVICE_UNAVAILABLE` – Service Unavailable * `INSUFFICIENT_STORAGE` – Insufficient Storage