2.0info: 3.3.0 feature_toggle description: Permite gerenciar as features definidas nos serviços com os Tenants da plataforma x-senior-domain: platform x-senior-domain-path: platform x-senior-service-path: feature_toggle 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: /feature_toggle/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 properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Status do serviços 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 properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Status do serviços 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/queries/getEnabledFeatures: post: description: Busca as features ativadas para o tenant tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object properties: tenant: type: string description: Filtro por tenant, por padrão pega do tenant corrente. Permissão master é necessária para buscar de outros tenants domain: type: string description: Filtro por domínio service: type: string description: Filtro pelo nome do serviço responses: 200: description: Ok schema: type: object required: – features properties: features: type: array items: type: object allOf: – #/definitions/feature minimum: 1 description: Lista de features ativadas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Busca as features ativadas para o tenant tags: – Queries x-senior-visibility: PUBLIC parameters: – name: tenant description: Filtro por tenant, por padrão pega do tenant corrente. Permissão master é necessária para buscar de outros tenants in: query type: string – name: domain description: Filtro por domínio in: query type: string – name: service description: Filtro pelo nome do serviço in: query type: string responses: 200: description: Ok schema: type: object required: – features properties: features: type: array items: type: object allOf: – #/definitions/feature minimum: 1 description: Lista de features ativadas 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/queries/listFeatures: post: description: Lista as features baseado nos filtros tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object properties: domain: type: string description: Filtro por dominio service: type: string description: Filtro por serviço search: type: string description: Filtro baseado nos campos das features (nome, label, descrição, primitiva) pagination: type: object allOf: – #/definitions/pagination description: As configurações de paginação da listagem. Não definido, retornará os 10 primeiros resultados. responses: 200: description: Ok schema: type: object required: – features – listInformation properties: features: type: array items: type: object allOf: – #/definitions/completeFeature minimum: 1 description: Lista de features listInformation: type: object allOf: – #/definitions/listInformation description: Informações sobre os resultados da listagem 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/queries/getTenantsByFeature: post: description: Coletar os tenants de uma determinada feature tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – domain – service – name properties: domain: type: string description: Dominio da Feature service: type: string description: Serviço da Feature name: type: string description: Nome da Feature responses: 200: description: Ok schema: type: object required: – tenants properties: tenants: type: array items: type: string minimum: 1 description: Lista de tenants 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Coletar os tenants de uma determinada feature tags: – Queries x-senior-visibility: PUBLIC parameters: – name: domain description: Dominio da Feature in: query required: true type: string – name: service description: Serviço da Feature in: query required: true type: string – name: name description: Nome da Feature in: query required: true type: string responses: 200: description: Ok schema: type: object required: – tenants properties: tenants: type: array items: type: string minimum: 1 description: Lista de tenants 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/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 /feature_toggle/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 /feature_toggle/actions/assignTenants: post: description: Vincula um ou mais tenants à uma ou mais features, tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – features – tenants properties: features: type: array items: type: object allOf: – #/definitions/feature minimum: 1 description: Features onde os tenants serão atribuídos tenants: type: array items: type: string minimum: 1 description: Tenants a serem incluídos nas features globalEvent: type: boolean description: Informa se a publicação do evento deve ser global. Caso o comportamento de uma feature seja invertido, publicará sempre de forma global. default: false responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/actions/unassignTenants: post: description: Remove um ou mais tenants de uma ou mais features tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – features – tenants properties: features: type: array items: type: object allOf: – #/definitions/feature minimum: 1 description: Features onde os tenants serão atribuídos tenants: type: array items: type: string minimum: 1 description: Tenants a serem removidos das features globalEvent: type: boolean description: Informa se a publicação do evento deve ser global. Caso o comportamento de uma feature seja invertido, publicará sempre de forma global. default: false responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/actions/reassignTenants: post: description: Vincula ou remove um ou mais tenants à uma ou mais features tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – features properties: features: type: array items: type: object allOf: – #/definitions/feature minimum: 1 description: Features onde os tenants serão atribuídos toAssign: type: array items: type: string description: Tenants a serem incluídos nas features toUnassign: type: array items: type: string description: Tenants a serem removidos das features globalEvent: type: boolean description: Informa se a publicação do evento deve ser global. Caso o comportamento de uma feature seja invertido, publicará sempre de forma global. default: false responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/actions/removeFeature: post: description: Remove uma feature e os tenants associados tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – name – domain – service properties: name: type: string description: Nome da feature que será excluída domain: type: string description: Domínio utilizado service: type: string description: Nome do serviço que utiliza a feature responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/actions/changeFeatureBehavior: post: description: Altera o comportamento de uma feature e remove dela todos os tenants associados. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – domain – service – name – excludeTenants properties: domain: type: string description: Nome do domínio service: type: string description: Nome do serviço name: type: string description: Nome da feature excludeTenants: type: boolean description: Faz com que a feature esteja ativa para todos os tenants por padrão. Ela será inativa apenas para os tenants associados. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /feature_toggle/events/featureTenantChanged: post: description: Notifica quando uma ou mais features foram incluídas ou excluídas nos tenants x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object properties: included: type: array items: type: object allOf: – #/definitions/feature description: Features incluídas excluded: type: array items: type: object allOf: – #/definitions/feature description: Features excluídas responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /feature_toggle/events/featureChanged: post: description: Notifica quando uma ou mais features foram adicionadas, removidas ou alteradas x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object properties: included: type: array items: type: object allOf: – #/definitions/feature description: Features incluídas excluded: type: array items: type: object allOf: – #/definitions/feature description: Features excluídas changed: type: array items: type: object allOf: – #/definitions/feature description: Features alteradas responses: 200: description: OK default: description: Error response schema: #/definitions/genericErrordefinitions: healthCheckStatus: 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 feature: description: Informaçoes que compõem uma Feature/Primitiva discriminator: _discriminator type: object required: – domain – service – name – _discriminator properties: domain: type: string description: Nome do domínio service: type: string description: Nome do serviço name: type: string description: Nome da feature primitive: type: string description: Nome da primitiva, uma feature pode não estar relacionada a uma primitiva excludeTenants: type: boolean description: Faz com que a feature esteja ativa para todos os tenants por padrão. Ela será inativa apenas para os tenants associados. _discriminator: type: string description: completeFeature: description: Retorna o objeto completo da Feature allOf: – #/definitions/feature – type: object properties: label: type: string description: Label da Feature description: type: string description: Descrição da Feature pagination: description: As configurações de paginação de uma listagem type: object properties: pageNumber: type: integer format: int64 description: O número da página retornado. A primeira página corresponde ao índice 0 default: 0 pageSize: type: integer format: int64 description: Quantidade de registros por página default: 10 listInformation: description: As informações sobre os resultados de listagem realizada type: object required: – totalElements – totalPages properties: totalElements: type: integer format: int64 description: Quantidade total de resultados encontrados totalPages: type: integer format: int64 description: Quantidade total de páginas encontradas 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