Skip to main content

Create File

POST 

/api/workspaces/:workspace_id/files/

Create a new file object in the scope of an entity or session. Subsequently, the temp_upload_url and temp_upload_data from the response need to be used to upload the file itself.

Request

Path Parameters

    workspace_id stringrequired

Body

required

    scope stringrequired

    Possible values: [entity, session]

    Scope of the file. Can be one of: entity, session.

    entity_id integer

    Id of entity which the file is bound. This field can be provided when in tree or simple app types only.

    editor_session uuid

    Editor session to be scoped under. This field should be provided on editor app type only.

    filename stringrequired

    Possible values: non-empty and <= 512 characters

    Name of the file to be uploaded.

Responses

Schema

    id integer
    scope stringrequired

    Possible values: [entity, session]

    Scope of the file. Can be one of: entity, session.

    entity_id integer

    Id of entity which the file is bound. This field can be provided when in tree or simple app types only.

    editor_session uuid

    Editor session to be scoped under. This field should be provided on editor app type only.

    filename stringrequired

    Possible values: non-empty and <= 512 characters

    Name of the file to be uploaded.

    created_at date-time

    Creation date and time of the file.

    temp_upload_url string

    Possible values: non-empty

    Temporary S3 upload url of the object. See :ref:Using S3 Presigned Post Payloads <s3 presigned post target> for details.

    temp_upload_data object

    Temporary S3 upload fields which will be used when sending the object to S3 with file. See :ref:Using S3 Presigned Post Payloads <s3 presigned post target> for details.

Loading...