2.0info: 4.2.0 Armazenamento de Arquivos description: Este serviço permite os clientes armazenar, acessar e atualizar dados na Cloud AWS. x-senior-domain: plataforma x-senior-domain-path: platform x-senior-service-path: blob_service 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: /blob_service/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 /blob_service/queries/isDownloadAvailable: post: description: Permite que um cliente verifique se um download solicitado já está disponível. tags: – Queries x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobDetails responses: 200: description: Ok schema: type: object required: – available properties: available: type: boolean description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/queries/resolveLocation: post: description: Requests the permanent location of a file. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobRequest responses: 200: description: Ok schema: type: object allOf: – #/definitions/blobDetails 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/queries/getFileMetadata: post: description: Enables clients to retrieve the metadata of a file. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/getFileMetadataInput responses: 200: description: Ok schema: type: object allOf: – #/definitions/getFileMetadataOutput 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Enables clients to retrieve the metadata of a file. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: domainName description: in: query required: true type: string – name: serviceName description: in: query required: true type: string – name: targetObject description: The id of the blob this file is for in: query required: true type: string – name: areaSecret description: The area secret in: query required: true type: string – name: fileName description: The name of the permanent file in: query required: true type: string – name: ref description: Used as a reference between request/response. Will be sent back in response unmodified. in: query type: string responses: 200: description: Ok schema: type: object allOf: – #/definitions/getFileMetadataOutput 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/queries/getFilesMetadata: post: description: Enables clients to retrieve the metadata of one or more files. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – getFileMetadataInput properties: getFileMetadataInput: type: array items: type: object allOf: – #/definitions/getFileMetadataInput minimum: 1 description: responses: 200: description: Ok schema: type: object required: – getFileMetadataOutput properties: getFileMetadataOutput: type: array items: type: object allOf: – #/definitions/getFileMetadataOutput minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/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 /blob_service/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 /blob_service/actions/createArea: post: description: Cria uma nova área permanente para armazenar os dados. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – domainName – serviceName – areaSecret properties: domainName: type: string description: serviceName: type: string description: areaSecret: type: string description: responses: 200: description: Ok schema: type: object required: – success properties: success: type: boolean description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/uploadFile: post: description: Cria uma nova área para armazenamento de arquivos, caso ainda não exista e devolve uma url para onde o arquivo deve ser enviado.\n Essa área de armazenamento é uma espécie de estrutura de diretório único, formada por um domínio/serviço, e uma senha (areaSecret) que permite um certo nível de segurança. Com isso, é possível evitar que um serviço diferente, inadvertidamente, sobrescreva ou exclua arquivos que não são do seu domínio.\n Obs.: Uma vez definido o areaSecret, não é mais possível alterá-lo. Então, para todas as chamadas subsequentes, será necessário informar o mesmo areaSecret, caso contrário, ele irá tentar criar uma nova área, mas ela já existe. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobRequest responses: 200: description: Ok schema: type: object allOf: – #/definitions/blobDetails 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/uploadFiles: post: description: Cria uma nova área para armazenamento de arquivos, caso ainda não exista e devolve uma url para onde os arquivos devem ser enviados.\n Essa área de armazenamento é uma espécie de estrutura de diretório único, formada por um domínio/serviço, e uma senha (areaSecret) que permite um certo nível de segurança. Com isso, é possível evitar que um serviço diferente, inadvertidamente, sobrescreva ou exclua arquivos que não são do seu domínio.\n Obs.: Uma vez definido o areaSecret, não é mais possível alterá-lo. Então, para todas as chamadas subsequentes, será necessário informar o mesmo areaSecret, caso contrário, ele irá tentar criar uma nova área, mas ela já existe. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – blobRequest properties: blobRequest: type: array items: type: object allOf: – #/definitions/blobRequest minimum: 1 description: responses: 200: description: Ok schema: type: object required: – blobDetails properties: blobDetails: type: array items: type: object allOf: – #/definitions/blobDetails minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/requestUpload: post: description: Solicita o upload de um arquivo anexado ao objeto de destino fornecido. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobRequest responses: 200: description: Ok schema: type: object allOf: – #/definitions/blobDetails 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/requestUploads: post: description: Requests an upload for one or more files attached to the given target object. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – blobRequest properties: blobRequest: type: array items: type: object allOf: – #/definitions/blobRequest minimum: 1 description: responses: 200: description: Ok schema: type: object required: – blobDetails properties: blobDetails: type: array items: type: object allOf: – #/definitions/blobDetails minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/requestDownload: post: description: Requests the download of a file to the working area.\n When the file is actually available, a downloadAvailable signal will be sent out.\n You can also use isDownloadAvailable to poll for completion. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobRequest responses: 200: description: Ok schema: type: object allOf: – #/definitions/blobDetails 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/requestDownloads: post: description: Demonstra a intensão de realizar o download de um ou mais arquivos.\n Quando o arquivo estiver realmente disponível, um sinal downloadAvailable será enviado.\n Também poderá ser usado isDownloadAvailable para pesquisar a conclusão. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – blobRequest properties: blobRequest: type: array items: type: object allOf: – #/definitions/blobRequest minimum: 1 description: responses: 200: description: Ok schema: type: object required: – blobDetails properties: blobDetails: type: array items: type: object allOf: – #/definitions/blobDetails minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/requestAccess: post: description: Requests access to a blob. The blob will be available upon completion of this action. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobRequest responses: 200: description: Ok schema: type: object allOf: – #/definitions/blobDetails 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/commitFile: post: description: Confirma o arquivo disponível no local de trabalho fornecido como um anexo permanente para um objeto de destino.\n Quando a operação realmente for concluída, um sinal fileCommitted será enviado.\n Apenas o serviço que possui o próprio blob pode confirmar um arquivo. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/commitFileInput responses: 200: description: Ok schema: type: object allOf: – #/definitions/commitFileOutput 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/commitFiles: post: description: Commits the files available at the given work location as a permanent attachment to a target objects.\n When the operation actually completes, a fileCommitted signal will be sent out.\n Only the service that owns the blob itself can commit a file. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – commitFiles properties: commitFiles: type: array items: type: object allOf: – #/definitions/commitFileInput minimum: 1 description: responses: 200: description: Ok schema: type: object required: – commitFiles properties: commitFiles: type: array items: type: object allOf: – #/definitions/commitFileOutput minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/releaseFile: post: description: Releases a file previously requested for upload or download. After this request,\n it will no longer be available from the work location. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/blobDetails responses: 200: description: Ok schema: type: object required: – success properties: success: type: boolean description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/deleteFile: post: description: Exclui um arquivo permanentemente. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/deleteFileInput responses: 200: description: Ok schema: type: object required: – success properties: success: type: boolean description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /blob_service/actions/deleteFiles: post: description: Exclui um ou mais arquivos permanentemente. tags: – Actions x-senior-visibility: PUBLIC parameters: – name: input in: body required: true schema: type: object required: – deleteFileInput properties: deleteFileInput: type: array items: type: object allOf: – #/definitions/deleteFileInput minimum: 1 description: responses: 200: description: Ok schema: type: object required: – success properties: success: type: boolean description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericErrordefinitions: healthCheckStatus: description: Status do Healthcheck type: string enum: – UP – DOWN protocol: description: When requesting a blob location, clients can specify the protocols they can work with.\n Implementation note: only HTTP is available at this time. type: string enum: – File – HTTP – S3 – DAV requirement: description: When requesting access to a blob, clients can specify the desired location requirements.\n Open: the location URI must be promptly accessible, without requiring additional credentials;\n External: the location URI must be accessible from the internet (as opposed to only accessible from the local network);\n Temporary: the location URI should be temporary (as opposed to fixed). type: string enum: – Open – External – Temporary fileType: description: All known file types. type: string enum: – Unknown – PDF – MsWord – MsExcel – MsPowerPoint – MsVisio – MsOutlook – MsPublisher – OoxmlWord – OoxmlExcel – OoxmlPowerPoint – OoxmlVisio – PlainText – Image – Video – Audio 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/healthCheckStatus description: Status deleteFileInput: description: Dados para excluir o arquivo. type: object required: – domainName – serviceName – targetObject – areaSecret – fileName – failIfNotExists properties: domainName: type: string description: Nome do domínio serviceName: type: string description: Nome do serviço targetObject: type: string description: Identificador único do arquivo. areaSecret: type: string description: Nome da área ou pasta onde se encontra o arquivo, criada durante o upload. fileName: type: string description: O nome efetivo do arquivo. styles: type: array items: type: string description: Utilizado para apagar miniaturas de imagens. Ex: 32×32, 50×50. Indica qual a proporção da imagem que deve ser apagada. failIfNotExists: type: boolean description: Especifica se esta ação deve falhar se o arquivo fornecido não existir commitFileInput: description: Registro de entrada para confirmar o arquivo no serviço de armazenamento type: object required: – domainName – serviceName – targetObject – version – areaSecret – release – fileName properties: domainName: type: string description: Nome do domínio serviceName: type: string description: Nome do serviço targetObject: type: string description: Identificador único do arquivo type: string description: Versão do arquivo areaSecret: type: string description: Nome da área ou pasta onde se encontra o arquivo, criada durante o upload release: type: boolean description: Se a cópia de trabalho deve ser liberada após o commit fileName: type: string description: O nome efetivo do arquivo defaultStyle: type: string description: Tamanho default da imagem (substitui o arquivo original): 32×32#, 50×50 onde o indica que a proporção de tela será mantida styles: type: array items: type: string description: Tamanhos de imagens que deverão ser criadas: 32×32#, 50×50 onde o indica que a proporção de tela será mantida extractMetadata: type: boolean description: Retornar o metadata do arquivo de forma síncrona cacheTimeToExpireInMonths: type: integer format: int64 description: Tempo em meses para expirar o cache ignoreThumbnailGenerationErrors: type: boolean description: Ignora erros na criação de thumbnails ignoreMetadataExtractionErrors: type: boolean description: Ignora erros na extração de metadados commitFileOutput: description: Registro de saída do arquivo salvo no serviço de armazenamento type: object required: – domainName – serviceName – targetObject – location properties: domainName: type: string description: Nome do domínio serviceName: type: string description: Nome do serviço targetObject: type: string description: Identificador único do arquivo location: type: object allOf: – #/definitions/location description: Localização do arquivo name: type: string description: Nome do arquivo size: type: integer format: int64 description: Tamanho do arquivo type: type: string allOf: – #/definitions/fileType description: Tipo do arquivo type: string description: Título summary: type: string description: @Deprecated Este campo será removido dia 28/02/2020 keyWords: type: string description: @Deprecated Este campo será removido dia 28/02/2020 contentType: type: string description: Tipo de conteúdo (Mime type) thumbnailGenerationError: type: string description: Thumbnail generation error metadataExtractionError: type: string description: Metadata extraction error getFileMetadataInput: description: type: object required: – domainName – serviceName – targetObject – areaSecret – fileName properties: domainName: type: string description: serviceName: type: string description: targetObject: type: string description: The id of the blob this file is for areaSecret: type: string description: The area secret fileName: type: string description: The name of the permanent file ref: type: string description: Used as a reference between request/response. Will be sent back in response unmodified. getFileMetadataOutput: description: type: object required: – name – size – type – title – contentType properties: name: type: string description: size: type: integer format: int64 description: type: type: string allOf: – #/definitions/fileType description: type: string description: summary: type: string description: @Deprecated Este campo será removido dia 28/02/2020 keyWords: type: string description: @Deprecated Este campo será removido dia 28/02/2020 contentType: type: string description: ref: type: string description: modified: type: string format: date-time description: The date and time when the file was modified. blobRequest: description: Representa os dados para solicitar operações de arquivo no serviço Blob. type: object required: – domainName – serviceName – targetObjectId properties: domainName: type: string description: Nome do domínio serviceName: type: string description: Nome do Serviço areaSecret: type: string description: Nome da área ou pasta onde se encontra o arquivo, criada durante o upload. targetObjectId: type: string description: Identificador único do arquivo. fileName: type: string description: O nome efetivo do arquivo. type: string description: Versão do arquivo token: type: string description: As versões podem ter tokens secretos para controlar o acesso requirements: type: array items: type: string allOf: – #/definitions/requirement description: Requisitos de localização supportedProtocols: type: array items: type: string allOf: – #/definitions/protocol description: Os protocolos de transferência de arquivos que o cliente pode suportar. style: type: string description: O tamanho/estilo/formato ex: 32×32#, 50×50 onde indicado para manter a proporção ttl: type: integer format: int64 description: Tempo de vida do arquivo em segundos, para o serviço requestUpload o valor maximo é 604800 segundos minimum: 1 maximum: 31536000 blobDetails: description: Representa a saída das operações de blob type: object required: – domainName – serviceName – targetObjectId – location properties: domainName: type: string description: Nome do domínio serviceName: type: string description: Nome do serviço targetObjectId: type: string description: Identificador único do arquivo type: string description: Qual a versão? token: type: string description: As versões podem ter tokens secretos para controlar o acesso location: type: object allOf: – #/definitions/location description: Localização do arquivo fileName: type: string description: O nome efetivo do arquivo location: description: type: object required: – protocol – uri properties: protocol: type: string allOf: – #/definitions/protocol description: uri: type: string description: credentials: type: object allOf: – #/definitions/credentials description: credentials: description: A base type for types of credentials. discriminator: _discriminator type: object required: – _discriminator properties: _discriminator: type: string description: usernameAndPassword: description: allOf: – #/definitions/credentials – type: object required: – username – password properties: username: type: string description: password: type: string description: key: description: allOf: – #/definitions/credentials – type: object required: – value properties: value: type: string description: 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