2.0info: 6.0.0 Autorização Legada description: Responsável pela autorização legada na plataforma G7. x-senior-domain: Plataforma x-senior-domain-path: platform x-senior-service-path: authorization_legacy 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: /authorization_legacy/queries/listRolesWithUsers: post: description: API DEPRECIADA: For internal use only (called by usuarios/userManager/listaUsuarios and usuarios/userManager/listaUsuariosTenant) | DATA: 2021-01-22 | Retorna uma lista com todos papéis e seus usuários tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: users: type: array items: type: string description: Nome de usuários utilizado como filtro responses: 200: description: Ok schema: type: object required: – roles properties: roles: type: array items: type: object allOf: – #/definitions/roleWithUsers minimum: 1 description: Listagem de papéis com seus usuários 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: API DEPRECIADA: For internal use only (called by usuarios/userManager/listaUsuarios and usuarios/userManager/listaUsuariosTenant) | DATA: 2021-01-22 | Retorna uma lista com todos papéis e seus usuários tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: users description: Nome de usuários utilizado como filtro in: query type: array items: type: string responses: 200: description: Ok schema: type: object required: – roles properties: roles: type: array items: type: object allOf: – #/definitions/roleWithUsers minimum: 1 description: Listagem de papéis com seus usuários 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /authorization_legacy/queries/listaPapeisUsuario: post: description: API DEPRECIADA: Use platform/authorization/getUserRoles instead | DATA: 2019-08-31 | Lista os papéis de um usuário tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – idUsuario properties: idUsuario: type: string description: Identificador do Usuário responses: 200: description: Ok schema: type: object required: – papeis properties: papeis: type: array items: type: object allOf: – #/definitions/recPapel minimum: 1 description: Lista com os ids dos papéis associados ao usuário 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: API DEPRECIADA: Use platform/authorization/getUserRoles instead | DATA: 2019-08-31 | Lista os papéis de um usuário tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: idUsuario description: Identificador do Usuário in: query required: true type: string responses: 200: description: Ok schema: type: object required: – papeis properties: papeis: type: array items: type: object allOf: – #/definitions/recPapel minimum: 1 description: Lista com os ids dos papéis associados ao usuário 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /authorization_legacy/queries/obtemPapeisUsuario: post: description: API DEPRECIADA: Use platform/authorization/getUserRoles instead | DATA: 2020-02-29 | Lista os papeis do usuário que executou a primitiva (a partir do username do cabeçalho da mensagem) tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: responses: 200: description: Ok schema: type: object required: – papeis properties: papeis: type: array items: type: object allOf: – #/definitions/recPapel minimum: 1 description: Lista com os papéis associados ao usuário 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: API DEPRECIADA: Use platform/authorization/getUserRoles instead | DATA: 2020-02-29 | Lista os papeis do usuário que executou a primitiva (a partir do username do cabeçalho da mensagem) tags: – Queries deprecated : true x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – papeis properties: papeis: type: array items: type: object allOf: – #/definitions/recPapel minimum: 1 description: Lista com os papéis associados ao usuário 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /authorization_legacy/queries/listaUsuariosCompletosPapel: post: description: API DEPRECIADA: Use platform/authorization/getAssignedUsers instead | DATA: 2019-08-31 | Lista os informações completas dos usuários que possuem um determinado papel tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – idPapel properties: idPapel: type: string description: Identificador do Papel responses: 200: description: Ok schema: type: object required: – usuarios properties: usuarios: type: array items: type: object allOf: – #/definitions/Usuario minimum: 1 description: Lista com os usuarios que possuem o papel 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: API DEPRECIADA: Use platform/authorization/getAssignedUsers instead | DATA: 2019-08-31 | Lista os informações completas dos usuários que possuem um determinado papel tags: – Queries deprecated : true x-senior-visibility: PRIVATE parameters: – name: idPapel description: Identificador do Papel in: query required: true type: string responses: 200: description: Ok schema: type: object required: – usuarios properties: usuarios: type: array items: type: object allOf: – #/definitions/Usuario minimum: 1 description: Lista com os usuarios que possuem o papel 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /authorization_legacy/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 /authorization_legacy/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 /authorization_legacy/actions/removePapelUsuario: post: description: API DEPRECIADA: Use platform/authorization/unassignUsers or platform/authorization/reassignUsers instead | DATA: 2019-08-31 | Remove o papel de um usuário. Um usuário deve ter ao menos um papel atribuído. Caso seja feita uma tentativa de excluir todos os papéis, uma exceção será lançada. tags: – Actions deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – idUsuario – idPapel properties: idUsuario: type: string description: Identificador do Usuário idPapel: type: string description: Identificador do Papel responses: 200: description: Ok schema: type: object required: – ok properties: ok: type: boolean description: Retorna um boolean com TRUE, apenas para o API Manager não gerar erro 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /authorization_legacy/actions/adicionaPapelUsuario: post: description: API DEPRECIADA: Use platform/authorization/assignUsers or platform/authorization/reassignUsers instead | DATA: 2019-08-31 | Adiciona um papel a um usuário tags: – Actions deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – idUsuario – idPapel properties: idUsuario: type: string description: Identificador do Usuário idPapel: type: string description: Identificador do Papel responses: 200: description: Ok schema: type: object required: – ok properties: ok: type: boolean description: Retorna um boolean com TRUE, apenas para o API Manager não gerar erro 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /authorization_legacy/actions/verificaPermissoesRecursos: post: description: API DEPRECIADA: Use platform/authorization/checkAccess instead | DATA: 2019-08-31 | Verifica permissões em várias ações para vários recursos tags: – Actions deprecated : true x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – recursos properties: nomeUsuario: type: string description: Nome do usuário. Se não for informado será utilizado o usuário da mensagem. recursos: type: array items: type: object allOf: – #/definitions/recRecurso minimum: 1 description: Lista dos recursos para verificação de permissão responses: 200: description: Ok schema: type: object required: – permissoes properties: permissoes: type: array items: type: object allOf: – #/definitions/recRecursoPermissao minimum: 1 description: Lista de permissões para cada recurso e ações 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericErrordefinitions: 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 recRecurso: description: Representa um recurso com suas ações type: object required: – uriRecurso – acoesPermissao properties: uriRecurso: type: string description: Identificador do Recurso acoesPermissao: type: array items: type: string minimum: 1 description: Lista de ações que se quer verificar no recurso recRecursoPermissao: description: Representa um recurso com suas ações type: object required: – uriRecurso – acoesPermissao properties: uriRecurso: type: string description: Identificador do Recurso acoesPermissao: type: array items: type: object allOf: – #/definitions/permissaoAcao minimum: 1 description: Ações com sua permissão headerRec: description: Header da grid de consulta de elementos type: object required: – key – name properties: key: type: string description: Identificador da coluna name: type: string description: Nome da coluna papelRec: description: Representa um papel type: object required: – idPapel – nomePapel – descricaoPapel properties: idPapel: type: string description: Identificador do papel nomePapel: type: string description: Nome do papel descricaoPapel: type: string description: Descrição do papel role: description: Representa um papel discriminator: _discriminator type: object required: – id – name – description – _discriminator properties: id: type: string description: Identificador do papel name: type: string description: Nome do papel description: type: string description: Descrição do papel _discriminator: type: string description: roleWithUsers: description: Representa um papel com seus usuários allOf: – #/definitions/role – type: object properties: users: type: array items: type: string description: Usuaríos associados ao papel paginationRec: description: Dados de paginação da grid das telas de consulta type: object required: – count – page – pages – size properties: count: type: integer format: int64 description: Quantidade de itens total page: type: integer format: int64 description: Página atual pages: type: integer format: int64 description: Quantidade de páginas total size: type: integer format: int64 description: Quantidade de itens por página permissaoAcao: description: Representa uma ação e o resultado de sua permissão type: object required: – nomeAcao – permitido – filtrosCustomizados – filtros properties: nomeAcao: type: string description: Identificador da Ação permitido: type: boolean description: Valor para a permissão filtrosCustomizados: type: array items: type: string minimum: 1 description: lista com as URIS dos filtros customizados que estão ativos para este usuário/recurso/ação filtros: type: array items: type: string minimum: 1 description: lista com expressões json contendo os filtros de dados ativos para este usuário/recurso/ação recPapel: description: Representa um papel type: object required: – idPapel – nome properties: idPapel: type: string description: Identificador do Papel nome: type: string description: Nome do Papel descricao: type: string description: Descrição do Papel Usuario: description: Representa um usuário type: object required: – idUsuario – nome – nomeCompleto – email – bloqueado properties: idUsuario: type: string description: Identificador do Usuário nome: type: string description: Nome do Usuário (username) nomeCompleto: type: string description: Nome completo do Usuário descricao: type: string description: Descrição do Usuário email: type: string description: Endereço de email do usuário bloqueado: type: boolean description: Indica se o usuário está bloqueado 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