Skip to content

Link support files

To create a link between a parent file and a support file, the parentId attribute must be set to the ID of the parent file, and the parentType attribute must be set to FILE.

Support files can be linked during upload operation or after the upload operation.

  • On upload - Upload operation supports linking a support file to a parent file.
  • After upload - Use the PATCH file API or the POST link API.
  • A parent file can have a maximum of 10 support file links.
  • A main file should be created. To know more about create a file refer here
POST {baseUrl}/spaces/{spaceId}/uploads
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • name - Name of file
    • parentId - Parent id for the file where it needs to be created
    • parentType - Should be FILE for support files
    • supportFileKey - Key to link the support file to the parent file
    • parentMajorVersion - Major version of the parent file to link the support file to a specific version of the parent file

After the upload operation is completed, the JSON response includes the id value for the file and URLs for file upload.

POST {baseUrl}/spaces/{spaceId}/uploads
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • name - Name of file
    • parentId - Parent id for the file where it needs to be created
    • parentType - FILE or FOLDER. But for the support file upload it should be FILE
    • supportFileKey - Key to link the support file to the parent file
    • parentMajorVersion - Major version of the parent file to link the support file to a specific version of the parent file

After the upload operation is completed, the JSON response includes the id value for the file and URLs for file upload.

Limitation: Only the parent file’s latest version can be linked using this API

PATCH {baseUrl}/spaces/{spaceId}/files/{fileId}
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • links - Links object which contains the support file key, support file id and support file version
    • links.<key> - The support file key
    • links.<key>.id - The id of the support file
    • links.<key>.version - The version of the support file. If not provided, the latest version will be linked

Parent file’s specific version can be linked using this API. Use the <major_version>.* format as the version ID because support files and links operate only on the main content version.

POST {baseUrl}/spaces/{spaceId}/files/{fileId}/versions/{versionId}/link
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • links - Links object which contains the support file key, support file id and support file version
    • links.<key> - The support file key
    • links.<key>.id - The id of the support file
    • links.<key>.version - The version of the support file. If not provided, the latest version will be linked

To know more about the upload file API refer here.