create_file_upload
Create a file upload.
Input fields
BigInt!)
File size in bytes.
String!)
MD5 file checksum as base64.
String!)
File content type.
Boolean)
Whether to create a file record for this upload. If false or omitted, no file record will be created.
FileType)
The type of file being uploaded. Required when create_file is true.
FileUploadOwnerInput)
Information required to create an owner of this file.
String!)
Name to give this file.
Return fields
JSON!)
HTTP request headers
ID!)
ID of the file metadata
ID)
The Sentera ID of the owner of the file upload
String)
The s3 url, which requires AWS credentials when downloading the file
String!)
Presigned URL to upload a file to s3
String!)
Please use upload_url instead
Upload URL
Examples
Create File Upload
Request credentials to upload a file to Sentera's cloud storage.
If you are uploading for import_mosaics then you need image/tiff.
mutation CreateFileUpload{
create_file_upload(
filename: "test.geojson"
content_type: "application/geo+json"
byte_size: 480452
checksum: "R1DTObliXS7goESYAqrAOQ=="
) {
id
upload_url
headers
}
}
{
"data": {
"create_file_upload": {
"id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMFpLQVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--1cadf0aeac8ac03c730ef549710be2e79accdc6c",
"upload_url": "https://cloudvault-prod-import.s3.us-west-2.amazonaws.com/rq7eh5z7kema07lr011zrx58a6eb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJOTRNP3QHKMDZANQ%2F20201106%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20201106T183828Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=content-length%3Bcontent-md5%3Bcontent-type%3Bhost&X-Amz-Signature=a034f856bf414d7a4a61e2be1efc2c62e6e45c179b8df1830bef77474ca7fe12",
"headers": {
"Content-Type": "application/geo+json",
"Content-MD5": "R1DTObliXS7goESYAqrAOQ=="
}
}
}
}
Create File Upload for an Owner
Request credentials to upload a file to Sentera's cloud storage.
If you are uploading for import_mosaics then you need image/tiff.
More Details
mutation CreateFileUploadForOwner{
create_file_upload(
filename: "test.geojson"
content_type: "application/geo+json"
byte_size: 480452
checksum: "R1DTObliXS7goESYAqrAOQ=="
file_upload_owner: {
parent_sentera_id: "7hy7bwv_CO_cyscAcme_CV_deve_6e3c36d3f_220308_135409"
owner_type: FEATURE_SET
owner_sentera_id: "w3x63n1_FS_cyscAcme_CV_deve_6e3c36d3f_220308_135411"
}
) {
id
upload_url
headers
s3_url
owner_sentera_id
}
}
{
"data": {
"create_file_upload": {
"id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMFpLQVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--1cadf0aeac8ac03c730ef549710be2e79accdc6c",
"upload_url": "https://cloudvault-prod-import.s3.us-west-2.amazonaws.com/rq7eh5z7kema07lr011zrx58a6eb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJOTRNP3QHKMDZANQ%2F20201106%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20201106T183828Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=content-length%3Bcontent-md5%3Bcontent-type%3Bhost&X-Amz-Signature=a034f856bf414d7a4a61e2be1efc2c62e6e45c179b8df1830bef77474ca7fe12",
"headers": {
"Content-Type": "application/geo+json",
"Content-MD5": "R1DTObliXS7goESYAqrAOQ=="
},
"s3_url": "s3://cloudvault-prod-permanent/cyscAcme/m0t9fcg_AS_cyscAcme_CV_deve_6e3c36d3f_220308_135409/7hy7bwv_CO_cyscAcme_CV_deve_6e3c36d3f_220308_135409/FeatureSets/w3x63n1_FS_cyscAcme_CV_deve_6e3c36d3f_220308_135411/test",
"owner_sentera_id": "w3x63n1_FS_cyscAcme_CV_deve_6e3c36d3f_220308_135411"
}
}
}