Files
File detail
Returns detailed information about a single file.
When federationToken=true is passed, the response additionally contains provider-specific read credentials and the file location: credentials + s3Path (AWS), absCredentials + absPath (Azure) or gcsCredentials + gcsPath (GCP).
get/v2/storage/branch/{branchId}/files/{fileId}
Request
- Base URLhttps://connection.keboola.com
- Auth
- API key in header X-StorageApi-Token
- or API key in header X-KBC-ManageApiToken
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
fileIdinteger required
File Id
branchIdstring required
Query parameters
federationTokenboolean
Return credentials with permissions for a direct file download from the file storage. The credentials are valid for 12 hours.
Response
File detail.
Example response
{
"id": 236518631,
"created": "2017-02-13T12:01:05+0100",
"isEncrypted": true,
"name": "somefile.csv",
"fileType": "csv",
"url": "https://s3.amazonaws.com/kbc-sapi-files/exp-180/578/files/2017/02/14/236518630.somefile.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=374...a4c",
"provider": "aws",
"region": "us-east-1",
"sizeBytes": 12345,
"tags": [
"tag1",
"tag2"
],
"maxAgeDays": 15,
"runIds": [],
"creatorToken": {
"id": 27978,
"description": "dev@keboola.com"
},
"credentials": {
"AccessKeyId": "ASI...O7A",
"SecretAccessKey": "gIT...RtE",
"SessionToken": "Ago...QU=",
"Expiration": "2017-02-14T22:10:17+00:00"
},
"s3Path": {
"bucket": "kbc-sapi-files",
"key": "exp-180/578/files/2017/02/14/236504176.235728260.csvmanifest"
},
"absCredentials": {
"SASConnectionString": "BlobEndpoint=https://kbcfshc7chguaeh2km.blob.core.windows.net;SharedAccessSignature=sv=2017-11-09&sr=c&sp=rl&sig=tBsXf...",
"expiration": "2017-02-13T12:01:05+0100"
},
"absPath": {
"container": "exp-15-files-4516-27364641-2022-11-09",
"name": "somefile.csv"
},
"gcsCredentials": {
"access_token": "ya29.dr...",
"expires_in": 3599,
"token_type": "Bearer",
"projectId": "ci-connection-361807"
},
"gcsPath": {
"bucket": "kbc-ci-connection-files-storage",
"key": "exp-15/23058/files/2022/11/09/851783.somefile.csv"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.