2.0info: 3.1.0 Gerenciamento de aplicações description: Responsável pelo gerenciamento de aplicações do API Manager na plataforma Senior X x-senior-domain: Plataforma x-senior-domain-path: platform x-senior-service-path: application_management 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: /application_management/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/healthcheckDTO description: Status do serviço checks: type: object allOf: – #/definitions/checkDTO description: Itens verificados 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/healthcheckDTO description: Status do serviço checks: type: object allOf: – #/definitions/checkDTO description: Itens verificados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/queries/listApplications: post: description: Lista as aplicações cadastradas no API Manager tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object responses: 200: description: Ok schema: type: object properties: applications: type: array items: type: object allOf: – #/definitions/application description: Aplicações cadastradas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Lista as aplicações cadastradas no API Manager tags: – Queries x-senior-visibility: PUBLIC parameters: responses: 200: description: Ok schema: type: object properties: applications: type: array items: type: object allOf: – #/definitions/application description: Aplicações cadastradas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/queries/getApplicationDetail: post: description: Retorna as informações detalhadas de uma aplicação tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name properties: name: type: string description: nome da aplicação responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação com informações detalhadas, incluindo secret para acesso as APIs 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna as informações detalhadas de uma aplicação tags: – Queries x-senior-visibility: PUBLIC parameters: – name: name description: nome da aplicação in: query required: true type: string responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação com informações detalhadas, incluindo secret para acesso as APIs 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/queries/getApplicationsByName: post: description: Retorna lista com as informações das aplicações encontradas tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – names properties: names: type: array items: type: string minimum: 1 description: Lista com nome das aplicações responses: 200: description: Ok schema: type: object required: – applications properties: applications: type: array items: type: object allOf: – #/definitions/application minimum: 1 description: Lista de aplicações encontradas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna lista com as informações das aplicações encontradas tags: – Queries x-senior-visibility: PUBLIC parameters: – name: names description: Lista com nome das aplicações in: query required: true type: array items: type: string minimum: 1 responses: 200: description: Ok schema: type: object required: – applications properties: applications: type: array items: type: object allOf: – #/definitions/application minimum: 1 description: Lista de aplicações encontradas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/queries/getApplicationByConsumerKey: post: description: Retorna as informações detalhadas de uma aplicação tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – consumerKey properties: consumerKey: type: string description: Chave para acesso às APIs que a aplicação assina responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação com informações detalhadas, incluindo secret para acesso as APIs 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna as informações detalhadas de uma aplicação tags: – Queries x-senior-visibility: PUBLIC parameters: – name: consumerKey description: Chave para acesso às APIs que a aplicação assina in: query required: true type: string responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação com informações detalhadas, incluindo secret para acesso as APIs 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/queries/getBasicApplicationByConsumerKey: post: description: Retorna as informações básicas (sem consumer secret) da aplicação encontrada tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – consumerKey properties: consumerKey: type: string description: Chave para acesso às APIs que a aplicação assina responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação com as informações básicas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna as informações básicas (sem consumer secret) da aplicação encontrada tags: – Queries x-senior-visibility: PUBLIC parameters: – name: consumerKey description: Chave para acesso às APIs que a aplicação assina in: query required: true type: string responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação com as informações básicas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/queries/getCreationLimits: post: description: Retorna os limites de criação de aplicações tags: – Queries x-senior-visibility: PUBLIC responses: 200: description: Ok schema: type: object required: – usage – limit properties: usage: type: integer format: int64 description: Quantidade de aplicações criadas limit: type: integer format: int64 description: Quantidade máxima de aplicações que podem ser criadas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna os limites de criação de aplicações tags: – Queries x-senior-visibility: PUBLIC responses: 200: description: Ok schema: type: object required: – usage – limit properties: usage: type: integer format: int64 description: Quantidade de aplicações criadas limit: type: integer format: int64 description: Quantidade máxima de aplicações que podem ser criadas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/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 /application_management/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 /application_management/actions/saveApplication: post: description: Salva uma aplicação no API Manager, caso a aplicação não exista préviamente, uma nova será criada tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name – description properties: name: type: string description: Nome da aplicação description: type: string description: Descrição da aplicação responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação criada no API Manager 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/actions/createApplication: post: description: Cria uma aplicação no API Manager tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name – description properties: name: type: string description: Nome da aplicação description: type: string description: Descrição da aplicação reuseToken: type: boolean description: Se esta aplicação irá gerar um novo token a cada autenticação responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação criada no API Manager 401: description: Invalid Credentials 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 402: description: Pagamento requerido 409: description: A aplicação informada já existe default: description: Error response schema: #/definitions/genericError /application_management/actions/updateApplication: post: description: Altera uma aplicação no API Manager tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name – description properties: name: type: string description: Nome da aplicação description: type: string description: Descrição da aplicação reuseToken: type: boolean description: Se esta aplicação irá gerar um novo token a cada autenticação responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Aplicação criada no API Manager 401: description: Invalid Credentials 400: description: Requisição inválida, parâmetros obrigatórios não informados ou campo informado incorretamente 404: description: A aplicação informada não existe default: description: Error response schema: #/definitions/genericError /application_management/actions/deleteApplication: post: description: Exclui uma aplicação cadastrada no API Manager tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name properties: name: type: string description: Aplicação previamente criada no API Manager responses: 200: description: Ok schema: type: object required: – name properties: name: type: string description: Aplicação excluída no API Manager 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/actions/generateKeys: post: description: Executa a geração de chaves de acesso das APIs no API Manager tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name properties: name: type: string description: Aplicação previamente criada no API Manager responses: 200: description: Ok schema: type: object required: – application properties: application: type: object allOf: – #/definitions/application description: Informações completas da aplicação, incluindo o key e secret gerados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /application_management/events/applicationDeleted: post: description: Evento publicado quando uma aplicação é removida. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – name properties: name: type: string description: responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /application_management/events/applicationCreated: post: description: Evento publicado quando uma aplicação é criada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – name properties: name: type: string description: responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /application_management/events/applicationAccessKeyGenerated: post: description: Evento publicado quando a chave de uma aplicação é gerada/regerada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – name properties: name: type: string description: responses: 200: description: OK default: description: Error response schema: #/definitions/genericErrordefinitions: healthcheckDTO: description: Status do Healthcheck 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 checkDTO: description: Itens verificados no healthcheck type: object required: – name – status properties: name: type: string description: Nome do item status: type: string allOf: – #/definitions/healthcheckDTO description: Status application: description: Aplicação do API Manager type: object required: – name – description properties: name: type: string description: Nome da aplicação description: type: string description: Descrição da aplicação consumerKey: type: string description: Chave para acesso às APIs que a aplicação assina consumerSecret: type: string description: Segredo para acesso às APIs que a aplicação assina secret: true reuseToken: type: boolean description: Configuração para reutilização de token na autenticação 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