For the complete documentation index, see llms.txt. This page is also available as Markdown.

create_attachment

imerit_ango.sdk.SDK.

create_attachment(project_id, attachments)

Add attachments to assets in your project.

Parameters

  • project_id: string

  • attachments: List[dict]

    • List of attachments to attach to existing assets. Attachments are dictionaries containing information about the asset the attachment will be attached to, the type of attachment, and the content of the attachment.

Sample JSON
[
  {
    "externalId": "sample_image_1.png",
    "attachments": [
      {
        "type": "IMAGE",
        "value": "https://sample-attachment-image.jpg"
      },
      {
        "type": "TEXT",
        "value": "Some sample text."
      }
    ]
  },
  {
    "externalId": "sample_image_2.png",
    "attachments": [
      {
        "type": "VIDEO",
        "value": "https://sample-attachment-video.jpg"
      }
    ]
  }
]

Attachments can have one of the types "IMAGE", "TEXT", or "VIDEO".

For IMAGE and VIDEO, you will need to provide a link to the resource. JPG, PNG, and MP4 are supported.

For text, you will need to provide the text that will be attached.

For image and video attachments, you may provide links to assets in private buckets, provided that you've connected them to Ango Hub. More information on how to do so can be found on the Attachments page.

Returns:

  • output: dict

    • A dictionary containing the result of the operation.

    • Including a status field indicating whether the request was successful and a data field containing the response payload with updated resources produced by the operation.

How to verify in Ango Hub?

After successfully executing the create_attachment function, you can validate the changes directly in Ango Hub.

Navigate to: Projects → [Your Project] → Tasks

  • Filter the relevant tasks as needed.

  • Open a task and check the Attachment section from the right sidebar.

  • Confirm that the attachments have been created and displayed correctly.

Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.

Example

See also

Attachments

Last updated