2.0info: 1.0.1 Replicação de tenants description: Serviço responsável pela solicitação de replicação do tenant x-senior-domain: Plataforma x-senior-domain-path: platform x-senior-service-path: tenant_replication 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: /tenant_replication/queries/listRequests: post: description: Lista todas as solicitações da mais recente para a mais antiga tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: key: type: string description: Última chave retornada na requisição, para paginação size: type: integer format: int64 description: Quantidade de registros por página default: 10 responses: 200: description: Ok schema: type: object properties: requests: type: array items: type: object allOf: – #/definitions/listRequestItemDTO description: Lista de solicitações lastKey: type: string description: A última chave da lista se houver mais registros, não necessariamente é o identificador do registro 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Lista todas as solicitações da mais recente para a mais antiga tags: – Queries x-senior-visibility: PRIVATE parameters: – name: key description: Última chave retornada na requisição, para paginação in: query type: string – name: size description: Quantidade de registros por página in: query type: integer format: int64 responses: 200: description: Ok schema: type: object properties: requests: type: array items: type: object allOf: – #/definitions/listRequestItemDTO description: Lista de solicitações lastKey: type: string description: A última chave da lista se houver mais registros, não necessariamente é o identificador do registro 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/queries/getRequest: post: description: Recupera uma solicitação existente tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – id properties: id: type: string description: responses: 200: description: Ok schema: type: object required: – request properties: request: type: object allOf: – #/definitions/getRequestItemDTO description: Dados completos da solicitação 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Recupera uma solicitação existente tags: – Queries x-senior-visibility: PRIVATE parameters: – name: id description: in: query required: true type: string responses: 200: description: Ok schema: type: object required: – request properties: request: type: object allOf: – #/definitions/getRequestItemDTO description: Dados completos da solicitação 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/queries/getProducts: post: description: Retorna os produtos existentes para replicação tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object responses: 200: description: Ok schema: type: object required: – products properties: products: type: array items: type: object allOf: – #/definitions/productDTO minimum: 1 description: Os produtos existentes 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna os produtos existentes para replicação tags: – Queries x-senior-visibility: PRIVATE parameters: responses: 200: description: Ok schema: type: object required: – products properties: products: type: array items: type: object allOf: – #/definitions/productDTO minimum: 1 description: Os produtos existentes 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/queries/getWindows: post: description: Retorna as janelas de replicação existentes para o mês informado tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – month – year properties: month: type: integer format: int64 description: Mês no formato 1-12 minimum: 1 maximum: 12 year: type: integer format: int64 description: Ano no formato yyyy minimum: 2000 maximum: 3000 responses: 200: description: Ok schema: type: object properties: windows: type: array items: type: string format: date description: As janelas existentes em UTC 0 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna as janelas de replicação existentes para o mês informado tags: – Queries x-senior-visibility: PRIVATE parameters: – name: month description: Mês no formato 1-12 in: query required: true type: integer format: int64 – name: year description: Ano no formato yyyy in: query required: true type: integer format: int64 responses: 200: description: Ok schema: type: object properties: windows: type: array items: type: string format: date description: As janelas existentes em UTC 0 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/queries/healthcheck: post: description: Query verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PRIVATE 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/upDown description: Status geral do serviço checks: type: array items: type: object allOf: – #/definitions/healthCheckDTO minimum: 1 description: Verificações para assegurar o status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Query verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PRIVATE parameters: responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/upDown description: Status geral do serviço checks: type: array items: type: object allOf: – #/definitions/healthCheckDTO minimum: 1 description: Verificações para assegurar o status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/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 /tenant_replication/queries/getDependencies: post: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PUBLIC 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: PUBLIC 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 /tenant_replication/actions/createRequest: post: description: Solicita uma nova replicação de tenant tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/createRequestDTO responses: 200: description: Ok schema: type: object required: – id properties: id: type: string description: Identificador da solicitação 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/actions/deleteRequest: post: description: Exclui uma solicitação existente tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – id properties: id: type: string description: Identificador da solicitação responses: 200: description: Ok schema: type: object required: – id properties: id: type: string description: Identificador da solicitação excluída 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/actions/startReplication: post: description: Inicializa a replicação.\n API de uso interno da Senior X. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – schedule properties: schedule: type: string format: date description: Janela sendo iniciada responses: 200: description: Ok schema: type: object properties: started: type: array items: type: object allOf: – #/definitions/startedRequestDTO description: Solicitações iniciadas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tenant_replication/actions/finishReplication: post: description: Finaliza a replicação.\n API de uso interno da Senior X. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – schedule – tenants – products properties: schedule: type: string format: date description: Data da janela sendo executada tenants: type: array items: type: string minimum: 1 description: Os tenants que tiverem execução da replicação products: type: array items: type: object allOf: – #/definitions/replicatedProduct minimum: 1 description: O status da replicação em nível de produto responses: 200: description: Ok schema: type: object properties: requestsPending: type: array items: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericErrordefinitions: requestStatus: description: Status da solicitação type: string enum: – SCHEDULED – REPLICATING – DONE – ERROR replicationStatus: description: Estado da replicação type: string enum: – FAILED – SUCCESSFUL – NOT_REPLICATED upDown: description: Up or down type: string enum: – UP – DOWN userNotificationKind: description: User notification kind. type: string enum: – Operational – Management – News userNotificationPriority: description: User notification priority. type: string enum: – Error – Alert – None eventEmailFormat: description: Format of the email type: string enum: – HTML – PLAIN_TEXT createRequestDTO: description: Objeto para criação da solicitação type: object required: – schedule – products properties: schedule: type: string format: date description: Janela de execução selecionada products: type: array items: type: object allOf: – #/definitions/productSelectionDTO minimum: 1 description: Produtos selecionados para replicação listRequestItemDTO: description: Registro da listagem de solicitações type: object required: – id – createdTime – scheduled – status properties: id: type: string description: Identificador da solicitação createdTime: type: string format: date-time description: Data da solicitação scheduled: type: string format: date description: Data da janela agendada status: type: string allOf: – #/definitions/requestStatus description: Estado da solicitação getRequestItemDTO: description: Registro da listagem de solicitações type: object required: – id – createdTime – scheduled – status – products properties: id: type: string description: Identificador da solicitação createdTime: type: string format: date-time description: Data da solicitação scheduled: type: string format: date description: Data da janela agendada status: type: string allOf: – #/definitions/requestStatus description: Estado da solicitação products: type: array items: type: object allOf: – #/definitions/productDTO minimum: 1 description: Produtos selecionados para replicação startedRequestDTO: description: Solicitações iniciadas type: object required: – tenant – products properties: tenant: type: string description: Tenant products: type: array items: type: object allOf: – #/definitions/productSelectionDTO minimum: 1 description: Produtos a replicar productSelectionDTO: description: Lista de produtos e funcionalidades que serão replicados type: object required: – product – features properties: product: type: string description: Produto features: type: array items: type: string minimum: 1 description: Funcionalidades productDTO: description: Produto e suas informações type: object required: – product – name – description – warning – features properties: product: type: string description: Produto name: type: string description: Nome description: type: string description: Descrição warning: type: string description: Warning features: type: array items: type: object allOf: – #/definitions/featureDTO minimum: 1 description: Funcionalidades featureDTO: description: Funcionalidade e suas informações discriminator: _discriminator type: object required: – feature – name – description – warning – required – _discriminator properties: feature: type: string description: Funcionalidade name: type: string description: Nome description: type: string description: Descrição warning: type: string description: Warning required: type: boolean description: Obrigatório _discriminator: type: string description: replicatedFeatureDTO: description: A funcionalidade que foi replicada e seu estado allOf: – #/definitions/featureDTO – type: object required: – status properties: status: type: string allOf: – #/definitions/replicationStatus description: replicatedProduct: description: Produto que foi replicado type: object required: – product – features properties: product: type: string description: Produto features: type: array items: type: object allOf: – #/definitions/replicatedFeature minimum: 1 description: Funcionalidades replicatedFeature: description: Funcionalidade replicada type: object required: – feature – status properties: feature: type: string description: Funcionalidade status: type: string allOf: – #/definitions/replicationStatus description: Estado healthCheckDTO: description: Dados do health check type: object required: – name – status properties: name: type: string description: Nome do health check status: type: string allOf: – #/definitions/upDown description: Status do health check 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 description: A symbolic code identifying the category of the reason of the error. enum: – BAD_REQUEST – UNAUTHORIZED – PAYMENT_REQUIRED – FORBIDDEN – OBJECT_NOT_FOUND – REQUEST_TIMEOUT – GONE – UNPROCESSABLE – INTERNAL_ERROR – NOT_IMPLEMENTED – SERVICE_UNAVAILABLE – INSUFFICIENT_STORAGE