2.0info: 5.2.1 cache_manager description: Cache manager service x-senior-domain: platform x-senior-domain-path: platform x-senior-service-path: cache_manager 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: /cache_manager/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 /cache_manager/queries/listCacheStates: post: description: List of endpoints metadatas and their cache states. tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object properties: pagination: type: object allOf: – #/definitions/pagination description: Pagination settings for a listing of records. If not defined, the first 10 results will be returned. onlyEnabled: type: boolean description: Filter that shows only active caches. default: false responses: 200: description: Ok schema: type: object required: – listInformation properties: endpointsCacheStates: type: array items: type: object allOf: – #/definitions/endpointCacheState description: List of endpoints metadatas and their cache states. listInformation: type: object allOf: – #/definitions/listInformation description: Records list information. 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/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 /cache_manager/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 /cache_manager/actions/enableCache: post: description: Enable cache for a list of endpoints. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – endpoints properties: endpoints: type: array items: type: object allOf: – #/definitions/endpointIdentifier minimum: 1 description: List of endpoints to be added on cache. tenants: type: array items: type: string description: List of tenants that will have these endpoints added on cache. Assume its global when not informed. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/disableCache: post: description: Disable cache for a list of endpoints. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – endpoints properties: endpoints: type: array items: type: object allOf: – #/definitions/endpointIdentifier minimum: 1 description: List of endpoints to be removed from cache. tenants: type: array items: type: string description: List of tenants that will have these endpoints removed from cache. Assume its global when not informed. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateAllCaches: post: description: Invalidate all cache keys. Only allowed for services of platform domain and with TRUSTED header. tags: – Actions x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateEndpointsCache: post: description: Invalidate cache of endpoints for all tenants and users. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – endpoints properties: endpoints: type: array items: type: object allOf: – #/definitions/endpointIdentifier minimum: 1 description: List of endpoints to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateEndpointsCacheForTenants: post: description: Invalidate cache of endpoints for informed tenants and all their users. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – endpoints properties: endpoints: type: array items: type: object allOf: – #/definitions/endpointIdentifier minimum: 1 description: List of endpoints to invalidate cache. tenants: type: array items: type: string description: List of tenants to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateEndpointsCacheForUsers: post: description: Invalidate cache of endpoints for informed users from informed tenant. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – endpoints – users properties: endpoints: type: array items: type: object allOf: – #/definitions/endpointIdentifier minimum: 1 description: List of endpoints to invalidate cache. tenant: type: string description: Tenant to invalidate cache. users: type: array items: type: string minimum: 1 description: List of user names to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateServicesCache: post: description: Invalidate cache of services for all users from all tenants. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – services properties: services: type: array items: type: object allOf: – #/definitions/serviceIdentifier minimum: 1 description: List of services to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateServicesCacheForTenants: post: description: Invalidate cache of services for all users from informed tenants. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – services properties: services: type: array items: type: object allOf: – #/definitions/serviceIdentifier minimum: 1 description: List of services to invalidate cache. tenants: type: array items: type: string description: Tenant to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateServicesCacheForUsers: post: description: Invalidate cache of services for informed users from informed tenant. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – services – users properties: services: type: array items: type: object allOf: – #/definitions/serviceIdentifier minimum: 1 description: List of services to invalidate cache. tenant: type: string description: Tenant to invalidate cache. users: type: array items: type: string minimum: 1 description: List of user names to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateCacheForTenants: post: description: Invalidate cache of all endpoints for informed tenants and all their users. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object properties: tenants: type: array items: type: string description: List of tenants to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/actions/invalidateCacheForUsers: post: description: Invalidate cache of all endpoints for informed users from informed tenant. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – users properties: tenant: type: string description: Tenant to invalidate cache. users: type: array items: type: string minimum: 1 description: List of user names to invalidate cache. responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /cache_manager/events/cacheStatusChanged: post: description: Event indicating that some caches had their status changed. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – endpointsChanged properties: endpointsChanged: type: array items: type: object allOf: – #/definitions/endpointCacheState minimum: 1 description: List of caches that had their status changed. 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 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 serviceIdentifier: description: Service identifier. type: object required: – domain – name properties: domain: type: string description: Domain that owns the service. name: type: string description: Service name. endpointIdentifier: description: Endpoint identifier. type: object required: – domain – service – name – version properties: domain: type: string description: Domain that owns the endpoint. service: type: string description: Service that owns the endpoint. name: type: string description: Endpoint name. type: integer format: int64 description: Endpoint version. endpointCacheState: description: Cache state of an endpoint type: object required: – endpointIdentifier – cacheEnabled – customizationEnabled properties: endpointIdentifier: type: object allOf: – #/definitions/endpointIdentifier description: Endpoint identifier. cacheEnabled: type: boolean description: Tells whether the cache is enabled or not. customizationEnabled: type: boolean description: Endpoint has customization enabled. tenant: type: string description: Tenant to which the cache is set. Returns null if its global. pagination: description: Pagination settings for a listing of records. type: object properties: pageNumber: type: integer format: int64 description: Number of the page. The first page corresponds to index 0. default: 0 pageSize: type: integer format: int64 description: Number of records per page. default: 10 listInformation: description: Records list information. type: object required: – totalElements – totalPages properties: totalElements: type: integer format: int64 description: Total number of records found. totalPages: type: integer format: int64 description: Total number of pages found. 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