files

Create a file

Create a file of a supported type. Currently, we support these file extensions: .csv; .html; .jmp, .jrn, .jrp (JMP); .jpeg, .jpg (JPEG); .png; .pdf; .zip; and .txt.

A successful file upload requires 3 calls in serial:

  1. Create a file, this endpoint, which returns an S3 PUT URL for the 2nd call and a file ID for the 3rd call
  2. Upload the file contents to S3. Add x-amz-server-side-encryption: AES256 to the request headers, because we use server-side encryption. Here is a curl example:
    curl -H "x-amz-server-side-encryption: AES256" -X PUT -T <LOCAL_FILE> -L <S3_PUT_URL>
    
  3. Update the file, which marks the upload as SUCCEEDED

Note: URL is valid for 1 hour after being returned from this endpoint. It should not be stored persistently for later use.

Files up to 30MB are supported.

post/files

Request

  • Base URL
    https://{tenant_name}.benchling.com/api/v2
  • Auth
    HTTP bearer

Request body

customFieldsCustomFields
filenamestring

Filename for the file

folderIdstring

ID of the folder that contains the file

namestring

Display name for the file

Response

OK

errorMessagestring nullable
uploadStatus'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED_VALIDATION' | 'NOT_UPLOADED'
createdAtstring date-time

Date and time the file was created

customFieldsCustomFields
displayIdstring

User-friendly ID of the file

filenamestring
folderIdstring

ID of the folder that contains the file

idstring
modifiedAtstring date-time

Date and time the file was last modified

namestring

Changes

No recorded changes to this operation across all 1 revision of this API.