2.0info: 8.4.1 Configurações description: Serviço de configurações centralizadas da plataforma Senior X x-senior-domain: Plataforma x-senior-domain-path: platform x-senior-service-path: configuration 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: /configuration/queries/healthcheck: post: description: Query para o SRE verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Status do serviços checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Items avaliados 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: PRIVATE responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Status do serviços checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Items avaliados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getProperty: post: description: API DEPRECIADA: Use searchPropertyMeta or getServiceProperties instead | DATA: 2020-01-26 | Get a single property tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – propertyHeader properties: propertyHeader: type: object allOf: – #/definitions/propertyHeader description: responses: 200: description: Ok schema: type: object required: – property properties: property: type: object allOf: – #/definitions/property description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getProperties: post: description: Get a list of properties tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – tenant – propertyHeader properties: tenant: type: string description: The tenant which the properties belong. propertyHeader: type: array items: type: object allOf: – #/definitions/propertyHeader minimum: 1 description: responses: 200: description: Ok schema: type: object required: – propertyList properties: propertyList: type: array items: type: object allOf: – #/definitions/property minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/searchPropertyMeta: post: description: Search for properties and return them with metadata tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: tenant: type: string description: dominio: type: string description: servico: type: string description: level: type: string allOf: – #/definitions/propertyLevel description: The property level: SYSTEM or INFRA. If level is not informed, level filter is not considered. filter: type: string description: Will be search in: (key OR hashTag) offset: type: integer format: int64 description: Initial record. Starting in zero. count: type: integer format: int64 description: Max records returned responses: 200: description: Ok schema: type: object required: – recordCount properties: recordCount: type: integer format: int64 description: Total number of records found. Some records with access denied cannot be brought. offset: type: integer format: int64 description: Position of next record metaPropertyList: type: array items: type: object allOf: – #/definitions/metaProperty description: Result list 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getServiceProperties: post: description: Retrieves a list of all domains/services properties of a specific tenant tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: tenant: type: string description: The specific tenant to retrieve properties dominio: type: string description: If informed, only with this specific domain servico: type: string description: If informed, only with this specific service responses: 200: description: Ok schema: type: object properties: propertyList: type: array items: type: object allOf: – #/definitions/property description: Result list 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retrieves a list of all domains/services properties of a specific tenant tags: – Queries x-senior-visibility: PRIVATE parameters: – name: tenant description: The specific tenant to retrieve properties in: query type: string – name: dominio description: If informed, only with this specific domain in: query type: string – name: servico description: If informed, only with this specific service in: query type: string responses: 200: description: Ok schema: type: object properties: propertyList: type: array items: type: object allOf: – #/definitions/property description: Result list 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getGlobalProperties: post: description: Retrieves a list of global properties tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: dominio: type: string description: If informed, all whole globals and with this specific domain servico: type: string description: If informed, all whole globals and with this specific service responses: 200: description: Ok schema: type: object properties: propertyList: type: array items: type: object allOf: – #/definitions/property description: Result list 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retrieves a list of global properties tags: – Queries x-senior-visibility: PRIVATE parameters: – name: dominio description: If informed, all whole globals and with this specific domain in: query type: string – name: servico description: If informed, all whole globals and with this specific service in: query type: string responses: 200: description: Ok schema: type: object properties: propertyList: type: array items: type: object allOf: – #/definitions/property description: Result list 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getConfigurationMetadata: post: description: tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – dominio – servico properties: dominio: type: string description: servico: type: string description: responses: 200: description: Ok schema: type: object required: – propertyMetadataList properties: propertyMetadataList: type: array items: type: object allOf: – #/definitions/propertyMetadata minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: tags: – Queries x-senior-visibility: PRIVATE parameters: – name: dominio description: in: query required: true type: string – name: servico description: in: query required: true type: string responses: 200: description: Ok schema: type: object required: – propertyMetadataList properties: propertyMetadataList: type: array items: type: object allOf: – #/definitions/propertyMetadata minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getOverriddenProperties: post: description: Retorna as propriedades sobrescritas de determinado tenant e filtro aplicado.\nNão é resolvido o valor da propriedade final, somente retorna o que está configurado no tenant.\nEssa API é de uso interno da plataforma para a não exposição de dados sensíveis. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – properties properties: tenant: type: string description: Tenant do qual as propriedades pertencem. properties: type: array items: type: object allOf: – #/definitions/overriddenPropertyKey minimum: 1 description: As chaves a serem filtradas responses: 200: description: Ok schema: type: object properties: properties: type: array items: type: object allOf: – #/definitions/overriddenPropertyValue description: As propriedades encontradas, se nenhum valor for encontrado para a chave, ela não será retornada 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/getPropertiesValues: post: description: Get the properties in all services that match the key tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – properties properties: tenant: type: string description: The tenant which the properties belong. properties: type: array items: type: object allOf: – #/definitions/getPropertyKey minimum: 1 description: responses: 200: description: Ok schema: type: object required: – properties properties: properties: type: array items: type: object allOf: – #/definitions/getPropertyValue minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/queries/listServiceProperties: post: description: Recupera uma lista de todas as propriedades de domínios/serviços do tenant atual\n### Resources:\n- res://senior.com.br/platform/configuration tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object properties: dominio: type: string description: Se informado, somente com este domínio específico servico: type: string description: Se informado, somente com este serviço específico responses: 200: description: Ok schema: type: object properties: propertyList: type: array items: type: object allOf: – #/definitions/property description: Lista de resultados 401: description: Credenciais inválidas default: description: Error response schema: #/definitions/genericError get: description: Recupera uma lista de todas as propriedades de domínios/serviços do tenant atual\n### Resources:\n- res://senior.com.br/platform/configuration tags: – Queries x-senior-visibility: PUBLIC parameters: – name: dominio description: Se informado, somente com este domínio específico in: query type: string – name: servico description: Se informado, somente com este serviço específico in: query type: string responses: 200: description: Ok schema: type: object properties: propertyList: type: array items: type: object allOf: – #/definitions/property description: Lista de resultados 401: description: Credenciais inválidas default: description: Error response schema: #/definitions/genericError /configuration/queries/getCustomProperty: post: description: Obtém uma propriedade customizada. Obtém apenas do tenant autenticado e no domínio platform, serviço __custom__\n### Resources:\n- res://senior.com.br/platform/configuration_custom tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – propertyKey properties: propertyKey: type: string description: Nome da propriedade que deve ser retornada responses: 200: description: Ok schema: type: object allOf: – #/definitions/customPropertyValue 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 401: description: O token de acesso é inválido ou está expirado 403: description: Permissão negada 404: description: Propriedade não encontrada default: description: Error response schema: #/definitions/genericError get: description: Obtém uma propriedade customizada. Obtém apenas do tenant autenticado e no domínio platform, serviço __custom__\n### Resources:\n- res://senior.com.br/platform/configuration_custom tags: – Queries x-senior-visibility: PUBLIC parameters: – name: propertyKey description: Nome da propriedade que deve ser retornada in: query required: true type: string responses: 200: description: Ok schema: type: object allOf: – #/definitions/customPropertyValue 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 401: description: O token de acesso é inválido ou está expirado 403: description: Permissão negada 404: description: Propriedade não encontrada default: description: Error response schema: #/definitions/genericError /configuration/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 /configuration/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 /configuration/actions/setProperty: post: description: Updates an existing property. Throws an exception if an error occur.\nDont support global properties, only for tenants. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – property properties: property: type: object allOf: – #/definitions/property description: responses: 200: description: Ok schema: type: object required: – result properties: result: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/actions/setProperties: post: description: Updates each property from the list. Throws an exception if an error occur and no property will be updated.\nNotice: All the properties must belong for the same tenant. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – propertyList properties: tenant: type: string description: The tenant which the properties belong. If not informed, assume they are global properties dominio: type: string description: The domain which the properties belong. If not informed, assume they are super global properties servico: type: string description: The service which the properties belong. If not informed, assume they are super global properties propertyList: type: array items: type: object allOf: – #/definitions/changedProperty minimum: 1 description: The list of properties responses: 200: description: Ok schema: type: object required: – processedCount properties: processedCount: type: integer format: int64 description: Number of properties that have been created/updated/deleted 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /configuration/actions/createCustomProperty: post: description: Insere uma propriedade customizada. Insere apenas do tenant autenticado e no domínio platform, serviço __custom__\n### Resources:\n- res://senior.com.br/platform/configuration_custom tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/customPropertyValue responses: 200: description: Ok schema: type: object 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 401: description: O token de acesso é inválido ou está expirado 403: description: Permissão negada 409: description: Propriedade já existe default: description: Error response schema: #/definitions/genericError /configuration/actions/updateCustomProperty: post: description: Atualiza uma propriedade customizada. Atualiza apenas do tenant autenticado e no domínio platform, serviço __custom__\n### Resources:\n- res://senior.com.br/platform/configuration_custom tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/customPropertyValue responses: 200: description: Ok schema: type: object 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 401: description: O token de acesso é inválido ou está expirado 403: description: Permissão negada 404: description: Propriedade não encontrada default: description: Error response schema: #/definitions/genericError /configuration/actions/deleteCustomProperty: post: description: Exclui uma propriedade customizada. Exclui apenas do tenant autenticado e no domínio platform, serviço __custom__\n### Resources:\n- res://senior.com.br/platform/configuration_custom tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – propertyKey properties: propertyKey: type: string description: Nome da propriedade responses: 200: description: Ok schema: type: object 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 401: description: O token de acesso é inválido ou está expirado 403: description: Permissão negada 404: description: Propriedade não encontrada default: description: Error response schema: #/definitions/genericError /configuration/events/startup: post: description: x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – dominio – servico properties: dominio: type: string description: servico: type: string description: responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /configuration/events/configurationChanged: post: description: Notify systems that properties have been changed x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – tenant – dominio – servico properties: tenant: type: string description: dominio: type: string description: servico: type: string description: changedPropertyList: type: array items: type: object allOf: – #/definitions/changedProperty description: completeChangeList: type: boolean description: The change list is complete (including deleted properties) and can be used to update configurations locally. responses: 200: description: OK default: description: Error response schema: #/definitions/genericErrordefinitions: healthCheckStatus: description: Status do Healthcheck type: string enum: – UP – DOWN propertyScope: description: type: string enum: – GLOBAL – DOMAIN – SERVICE propertyChangeOperation: description: type: string enum: – CREATED – UPDATED – DELETED propertyLevel: description: type: string enum: – INFRA – SYSTEM propertyType: description: type: string enum: – String – Integer – Long – Double – Boolean – Date – Time – DateTime – Secret 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 checkDTO: description: Componente avaliado no health check type: object required: – name – status properties: name: type: string description: Nome do componente status: type: string allOf: – #/definitions/healthCheckStatus description: Status do componente customPropertyValue: description: Atributos da propriedade customizada type: object required: – propertyKey properties: propertyKey: type: string description: Nome da propriedade type: type: string allOf: – #/definitions/propertyType description: Tipo do dado da propriedade propertyValue: type: string description: Valor da propriedade hashTags: type: array items: type: string description: HashTags para a tela de configuração label: type: string description: Descrição da propriedade na tela de configuração propertyLevel: type: string allOf: – #/definitions/propertyLevel description: Nível da propridade (SYSTEM/INFRA) – Informativo propertyHeader: description: type: object required: – propertyTenant – propertyDomain – propertyService – propertyKey properties: propertyTenant: type: string description: propertyDomain: type: string description: propertyService: type: string description: propertyKey: type: string description: property: description: discriminator: _discriminator type: object required: – ownerDomain – ownerService – _discriminator properties: ownerDomain: type: string description: ownerService: type: string description: propertyTenant: type: string description: propertyDomain: type: string description: propertyService: type: string description: propertyKey: type: string description: propertyType: type: string allOf: – #/definitions/propertyType description: propertyValue: type: string description: propertyScope: type: string allOf: – #/definitions/propertyScope description: propertyMaster: type: boolean description: propertyHashTags: type: array items: type: string description: propertyLabel: type: string description: propertySource: type: string description: propertyLevel: type: string allOf: – #/definitions/propertyLevel description: _discriminator: type: string description: changedProperty: description: allOf: – #/definitions/property – type: object properties: propertyOldValue: type: string description: propertyChangeOperation: type: string allOf: – #/definitions/propertyChangeOperation description: metaProperty: description: allOf: – #/definitions/changedProperty – type: object required: – propertyHasValue properties: metadata: type: object allOf: – #/definitions/propertyMetadata description: propertyHasValue: type: boolean description: Indicativo se a propriedade tem um valor definido (em qualquer nível ou mesmo globalmente; útil para as propriedades do typo Secret, que não tem seu valor retornado) propertyMetadata: description: type: object required: – level – key – type properties: master: type: boolean description: scope: type: string allOf: – #/definitions/propertyScope description: level: type: string allOf: – #/definitions/propertyLevel description: key: type: string description: type: type: string allOf: – #/definitions/propertyType description: defaultValue: type: string description: minValue: type: number format: double description: maxValue: type: number format: double description: regEx: type: string description: comment: type: string description: label: type: string description: hashTags: type: array items: type: string description: required: type: boolean description: actionRead: type: string description: actionWrite: type: string description: changeDateTime: type: string description: getPropertyKey: description: type: object required: – ownerDomain – ownerService – propertyKey properties: ownerDomain: type: string description: ownerService: type: string description: propertyKey: type: string description: getPropertyValue: description: type: object required: – metadata – values properties: metadata: type: object allOf: – #/definitions/propertyMetadata description: values: type: array items: type: object allOf: – #/definitions/property minimum: 1 description: overriddenPropertyKey: description: type: object required: – propertyDomain properties: propertyDomain: type: string description: propertyService: type: string description: propertyKey: type: string description: overriddenPropertyValue: description: type: object required: – propertyKey – propertyValue properties: propertyDomain: type: string description: propertyService: type: string description: propertyKey: type: string description: propertyValue: type: string description: 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