2.0info: 1.0.1 accesscontrol x-senior-domain: platform x-senior-domain-path: platform x-senior-service-path: accesscontrol 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: /accesscontrol/queries/healthcheck: post: description: Verifica se o serviço está funcionando 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ço checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Itens verificados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Verifica se o serviço está funcionando 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ço checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Itens verificados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/queries/checkUserNamedForResource: post: description: Verifica se o usuário está nomeado para o recurso tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – tenantName – username – resource – action properties: tenantName: type: string description: Nome do tenant username: type: string description: Nome do usuário resource: type: string description: Recurso action: type: string description: Ação do recurso responses: 200: description: Ok schema: type: object required: – isUserNamed properties: isUserNamed: type: boolean description: Informa se o usuário é nomeado ou não 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Verifica se o usuário está nomeado para o recurso tags: – Queries x-senior-visibility: PRIVATE parameters: – name: tenantName description: Nome do tenant in: query required: true type: string – name: username description: Nome do usuário in: query required: true type: string – name: resource description: Recurso in: query required: true type: string – name: action description: Ação do recurso in: query required: true type: string responses: 200: description: Ok schema: type: object required: – isUserNamed properties: isUserNamed: type: boolean description: Informa se o usuário é nomeado ou não 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/queries/verifyProductMetricHasUsers: post: description: Verifica se a métrica possui usuários nomeados tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – productErpId – metricKey properties: productErpId: type: string description: Id do produto no erp metricKey: type: string description: Chave da métrica no License Server responses: 200: description: Ok schema: type: object required: – hasNamedUser properties: hasNamedUser: type: boolean description: Informa se a métrica possui usuários nomeados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Verifica se a métrica possui usuários nomeados tags: – Queries x-senior-visibility: PRIVATE parameters: – name: productErpId description: Id do produto no erp in: query required: true type: string – name: metricKey description: Chave da métrica no License Server in: query required: true type: string responses: 200: description: Ok schema: type: object required: – hasNamedUser properties: hasNamedUser: type: boolean description: Informa se a métrica possui usuários nomeados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/queries/summaryNamedUsers: post: description: Retorna um resumo dos valores da quantidade contratada e dos usuários nomeados de um tenant tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – productErpId – metricKey properties: productErpId: type: string description: Id do produto no erp metricKey: type: string description: Chave da métrica responses: 200: description: Ok schema: type: object required: – totalContracted – totalNamedUsers – totalAvailable properties: totalContracted: type: integer format: int64 description: Quantidade total contratada totalNamedUsers: type: integer format: int64 description: Quantidade de usuários nomeados totalAvailable: type: integer format: int64 description: Quantidade total disponível 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna um resumo dos valores da quantidade contratada e dos usuários nomeados de um tenant tags: – Queries x-senior-visibility: PRIVATE parameters: – name: productErpId description: Id do produto no erp in: query required: true type: string – name: metricKey description: Chave da métrica in: query required: true type: string responses: 200: description: Ok schema: type: object required: – totalContracted – totalNamedUsers – totalAvailable properties: totalContracted: type: integer format: int64 description: Quantidade total contratada totalNamedUsers: type: integer format: int64 description: Quantidade de usuários nomeados totalAvailable: type: integer format: int64 description: Quantidade total disponível 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/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 /accesscontrol/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 /accesscontrol/actions/changeNamedUserMetric: post: description: Altera a métrica que controla os usuários nomeados tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – oldMetricKey – newMetricKey properties: oldMetricKey: type: string description: Chave da métrica atual newMetricKey: type: string description: Nova chave da métrica que irá controlar os usuários nomeados responses: 200: description: Ok schema: type: object required: – ok properties: ok: type: boolean description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/actions/removeResourcesByProduct: post: description: Remove todos os recursos associados a um módulo/produto tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – productErpId properties: productErpId: type: string description: Id do produto no erp responses: 200: description: Ok schema: type: object required: – ok properties: ok: type: boolean description: Resultado da operação 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/actions/registerNamedUsers: post: description: Salva uma lista de usuários nomeados para uma métrica de um produto tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – productErpId – metricKey – usernames properties: productErpId: type: string description: Id do produto no ERP metricKey: type: string description: Métrica do produto no License Server usernames: type: array items: type: string minimum: 1 description: Lista de usuários responses: 200: description: Ok schema: type: object required: – productErpId – metricKey – usernames properties: productErpId: type: string description: Id do produto no ERP metricKey: type: string description: Métrica do produto no License Server usernames: type: array items: type: object allOf: – #/definitions/usernameAndID minimum: 1 description: Lista de usuários 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/actions/isUserNamedToService: post: description: Verifica se o usuário logado está nomeado para o serviço tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – serviceName properties: serviceName: type: string description: Nome do serviço responses: 200: description: Ok schema: type: object required: – isNamed properties: isNamed: type: boolean description: Informa se o usuário está nomeado para o serviço ou não 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/signals/registerResources: post: description: Registra recursos em um módulo tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – productErpId – resources properties: productErpId: type: string description: Id do produto no erp resources: type: array items: type: object allOf: – #/definitions/resourceDTO minimum: 1 description: Lista de recursos responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericError /accesscontrol/apis/namedUser: post: description: Fachada para gestão de usuários nomeados tags: – APIS x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/namedUserFacade responses: 200: description: Ok schema: #/definitions/namedUserFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Fachada para gestão de usuários nomeados tags: – APIS x-senior-visibility: PUBLIC parameters: – name: offset in: query type: number – name: size in: query type: number – name: filter in: query type: string – name: groupby in: query type: string – name: displayfields in: query type: string – name: translation in: query type: boolean responses: 200: description: Ok schema: type: object properties: totalPages: description: Quantidade total de páginas: total de registros dividido pelo tamanho solicitado da página, arredondado pra cima type: integer format: int64 totalElements: description: Quantidade total de registros type: integer format: int64 contents: type: array items: #/definitions/namedUserFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/apis/namedUser/{id}: get: description: Fachada para gestão de usuários nomeados tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string responses: 200: description: Ok schema: #/definitions/namedUserFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError delete: description: Fachada para gestão de usuários nomeados tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string responses: 200: description: Ok 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/apis/module: post: description: Fachada para gestão de módulos tags: – APIS x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/moduleFacade responses: 200: description: Ok schema: #/definitions/moduleFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Fachada para gestão de módulos tags: – APIS x-senior-visibility: PUBLIC parameters: – name: offset in: query type: number – name: size in: query type: number – name: filter in: query type: string – name: groupby in: query type: string – name: displayfields in: query type: string – name: translation in: query type: boolean responses: 200: description: Ok schema: type: object properties: totalPages: description: Quantidade total de páginas: total de registros dividido pelo tamanho solicitado da página, arredondado pra cima type: integer format: int64 totalElements: description: Quantidade total de registros type: integer format: int64 contents: type: array items: #/definitions/moduleFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/apis/module/{id}: get: description: Fachada para gestão de módulos tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string responses: 200: description: Ok schema: #/definitions/moduleFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError put: description: Fachada para gestão de módulos tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string – name: input in: body required: true schema: #/definitions/moduleFacade responses: 200: description: Ok schema: #/definitions/moduleFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError delete: description: Fachada para gestão de módulos tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string responses: 200: description: Ok 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/apis/resource: post: description: Fachada para gestão de recursos de um módulo tags: – APIS x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/resourceFacade responses: 200: description: Ok schema: #/definitions/resourceFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Fachada para gestão de recursos de um módulo tags: – APIS x-senior-visibility: PUBLIC parameters: – name: offset in: query type: number – name: size in: query type: number – name: filter in: query type: string – name: groupby in: query type: string – name: displayfields in: query type: string – name: translation in: query type: boolean responses: 200: description: Ok schema: type: object properties: totalPages: description: Quantidade total de páginas: total de registros dividido pelo tamanho solicitado da página, arredondado pra cima type: integer format: int64 totalElements: description: Quantidade total de registros type: integer format: int64 contents: type: array items: #/definitions/resourceFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /accesscontrol/apis/resource/{id}: get: description: Fachada para gestão de recursos de um módulo tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string responses: 200: description: Ok schema: #/definitions/resourceFacade 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError delete: description: Fachada para gestão de recursos de um módulo tags: – APIS x-senior-visibility: PUBLIC parameters: – name: id in: path required: true type: string responses: 200: description: Ok 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError definitions: healthCheckStatus: type: string enum: – UP – DOWN description: Status do healthcheck: * `UP` – Disponível * `DOWN` – Indisponível 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 checkDTO: description: Itens verificados no healthcheck type: object required: – name – status properties: name: type: string description: Nome do item status: type: string allOf: – #/definitions/healthCheckStatus description: Status resourceDTO: description: Recurso do módulo type: object required: – resource – action properties: resource: type: string description: Recurso action: type: string description: Ação do recurso usernameAndID: description: ID e nome do usuário type: object required: – id – username properties: id: type: string description: Id do usuário username: type: string description: Nome do usuário 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 namedUserFacade: description: Fachada para gestão de usuários nomeados type: object required: – productErpId – metricKey – username properties: id: type: string format: uuid description: Id do usuário productErpId: type: string description: Id do produto no ERP metricKey: type: string description: Métrica do produto no License Server username: type: string description: Nome do usuário moduleFacade: description: Fachada para gestão de módulos type: object required: – metricKey – productErpId – service – domain – description properties: id: type: string format: uuid description: Id do módulo metricKey: type: string description: Chave da métrica no License Server productErpId: type: string description: Id do produto no erp service: type: string description: Serviço domain: type: string description: Domínio description: type: string description: Descrição do módulo resourceFacade: description: Fachada para gestão de recursos de um módulo type: object required: – productErpId – resource – action properties: id: type: string format: uuid description: Id do recurso productErpId: type: string description: Id do produto no erp resource: type: string description: Recurso action: type: string description: Ação do recurso 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