# Canto

> Search, tag and organize images, videos and documents in Canto's digital asset library, and upload new files to it.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/canto

## Actions

### Add asset to album

Put an asset in an album. It stays in any other albums it's in.

**Inputs**

- Album (`album_id`, text, required): The album.
- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Add keyword

Add one of your account's keywords to an asset. The keyword must already exist in Canto.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Keyword (`keyword`, text, required): The keyword, exactly as your account's keyword list has it.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Add tag

Add a tag to an asset. A tag the asset already has is left as it is.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Tag (`tag`, text, required): The tag, any text.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Create album

Create an album, at the top of the library or inside a folder. Albums hold assets.

**Inputs**

- Name (`name`, text, required): The new album's name, up to 80 characters, without \ / : * ? " < > or |.
- In folder (`parent_folder`, text): The folder to create it in. Leave empty for the top of the library.
- Description (`description`, text): A description of the album, up to 400 characters.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "created": "example",
    "description": "example",
    "id": "example",
    "idPath": "example",
    "name": "example",
    "namePath": "example",
    "owner": "example",
    "scheme": "example",
    "size": "example",
    "time": "example",
    "url": {
      "detail": "example"
    }
  }
}
```

### Create folder

Create a folder, at the top of the library or inside another folder. Folders hold albums and other folders.

**Inputs**

- Name (`name`, text, required): The new folder's name, up to 80 characters, without \ / : * ? " < > or |.
- In folder (`parent_folder`, text): The folder to create it in. Leave empty for the top of the library.
- Description (`description`, text): A description of the folder, up to 400 characters.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "created": "example",
    "description": "example",
    "id": "example",
    "idPath": "example",
    "name": "example",
    "namePath": "example",
    "owner": "example",
    "scheme": "example",
    "size": "example",
    "time": "example",
    "url": {
      "detail": "example"
    }
  }
}
```

### Get album

Get an album's details: its name, path, description and number of assets.

**Inputs**

- Album (`album_id`, text, required): The album.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "created": "example",
    "description": "example",
    "id": "example",
    "idPath": "example",
    "name": "example",
    "namePath": "example",
    "owner": "example",
    "scheme": "example",
    "size": "example",
    "time": "example",
    "url": {
      "detail": "example"
    }
  }
}
```

### Get asset

Get an asset's details: its name, size, tags, keywords, approval status, custom fields, versions and links.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "additional": {},
    "altText": "example",
    "approvalStatus": "example",
    "copyright": "example",
    "created": "example",
    "default": {},
    "description": "example",
    "dpi": "example",
    "expirationDate": "example",
    "height": "example",
    "id": "example",
    "keyword": [
      "example"
    ],
    "lastUploaded": "example",
    "metadata": {},
    "name": "example",
    "owner": "example",
    "ownerName": "example",
    "scheme": "example",
    "size": "example",
    "tag": [
      "example"
    ],
    "termsAndConditions": "example",
    "time": "example",
    "url": {
      "HighJPG": "example",
      "LowJPG": "example",
      "PNG": "example",
      "detail": "example",
      "directUrlOriginal": "example",
      "directUrlPreview": "example",
      "download": "example",
      "metadata": "example",
      "preview": "example"
    },
    "versionHistory": [
      {
        "comment": "example",
        "created": "example",
        "currentVersion": true,
        "no": "example",
        "ownerName": "example",
        "time": "example",
        "versionId": "example"
      }
    ],
    "width": "example"
  }
}
```

### Get download link

Get a link that downloads an asset's original file without signing in, until it expires.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Link works for (`expires`, text): How long the link works. Canto's default is 1 day. One of: `3600` (1 hour), `86400` (1 day), `604800` (7 days).

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "url": "example"
  }
}
```

### Get folder tree

Get the folders and albums inside a folder.

**Inputs**

- Folder (`folder_id`, text, required): The folder.
- Sort by (`sort_by`, text): What to sort by. Canto's default is the date its settings show assets by. One of: `time` (Date), `name`, `scheme` (Type), `owner`, `size` (File size).
- Order (`sort_direction`, text): The order. Canto's default is newest first. One of: `descending` (Newest, last or largest first), `ascending` (Oldest, first or smallest first).
- Levels (`levels`, number): How many levels deep to go. Leave empty for everything inside. At least 1.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "results": [
      {
        "children": [
          {}
        ],
        "created": "example",
        "description": "example",
        "id": "example",
        "idPath": "example",
        "name": "example",
        "namePath": "example",
        "owner": "example",
        "ownerName": "example",
        "scheme": "example",
        "size": "example",
        "time": "example",
        "url": {
          "detail": "example"
        }
      }
    ],
    "sortBy": "example",
    "sortDirection": "example"
  }
}
```

### Get library tree

Get the library's folders and albums, with the folders and albums inside each.

**Inputs**

- Sort by (`sort_by`, text): What to sort by. Canto's default is the date its settings show assets by. One of: `time` (Date), `name`, `scheme` (Type), `owner`, `size` (File size).
- Order (`sort_direction`, text): The order. Canto's default is newest first. One of: `descending` (Newest, last or largest first), `ascending` (Oldest, first or smallest first).
- Levels (`levels`, number): How many levels deep to go. Leave empty for the whole tree. At least 1.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "results": [
      {
        "children": [
          {}
        ],
        "created": "example",
        "description": "example",
        "id": "example",
        "idPath": "example",
        "name": "example",
        "namePath": "example",
        "owner": "example",
        "ownerName": "example",
        "scheme": "example",
        "size": "example",
        "time": "example",
        "url": {
          "detail": "example"
        }
      }
    ],
    "sortBy": "example",
    "sortDirection": "example"
  }
}
```

### Get preview link

Get a link to a preview image of an asset, such as a photo's smaller copy or a document's first page.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Size (`size`, number): The preview's longer side in pixels. Canto gives its largest preview when this is bigger. Leave empty for 800. At least 1.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "url": "example"
  }
}
```

### Get upload status

List recent uploads with their status (Initial, Processing or Done) and, once done, the new asset's ID and type.

**Inputs**

- Hours (`hours`, number): How many hours back to look, 1 to 24. Canto's default is 1. From 1 to 24.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "found": 1,
    "results": [
      {
        "id": "example",
        "name": "example",
        "scheme": "example",
        "status": "example",
        "time": "example"
      }
    ]
  }
}
```

### List album assets

List the assets in an album, optionally filtered, a page at a time.

**Inputs**

- Album (`album_id`, text, required): The album.
- Search for (`keyword`, text): Words to look for, as in Canto's search box. Separate words any of which may match with |, and words that must all match with +.
- Search in (`search_in`, text): Look for the words only in this field. Leave empty to look everywhere. One of: `filename` (File name), `description`, `comment` (Comments), `keywords`, `author`, `tags`.
- Asset types (`types`, list): Only these types of asset. Leave empty for every type. One or more of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Tag (`tags`, text): Only assets with this tag.
- Keyword (`keywords`, text): Only assets with this keyword.
- Approval status (`approval`, text): Only assets with this approval status. Works when approvals are turned on in Canto. One of: `approved`, `pending`, `restricted`, `expired`.
- Owner (`owner`, text): Only assets this person uploaded.
- Uploaded from (`uploaded_from`, date and time): Only assets uploaded at or after this time.
- Uploaded to (`uploaded_to`, date and time): Only assets uploaded at or before this time.
- Sort by (`sort_by`, text): What to sort by. Canto's default is the date its settings show assets by. One of: `time` (Date), `name`, `scheme` (Type), `owner`, `size` (File size).
- Order (`sort_direction`, text): The order. Canto's default is newest first. One of: `descending` (Newest, last or largest first), `ascending` (Oldest, first or smallest first).
- Start at (`start`, number): How many assets to skip: 0 for the first page, or the next_start a previous step returned. At least 0.
- Limit (`limit`, number): How many assets to return, up to 1,000. Canto's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "found": 1,
    "next_start": 1,
    "results": [
      {
        "additional": {},
        "approvalStatus": "example",
        "default": {},
        "dpi": "example",
        "height": "example",
        "id": "example",
        "keyword": [
          "example"
        ],
        "name": "example",
        "owner": "example",
        "ownerName": "example",
        "relatedAlbums": [
          {
            "id": "example",
            "idPath": "example",
            "scheme": "example"
          }
        ],
        "scheme": "example",
        "size": "example",
        "tag": [
          "example"
        ],
        "time": "example",
        "url": {
          "HighJPG": "example",
          "LowJPG": "example",
          "PNG": "example",
          "detail": "example",
          "directUrlOriginal": "example",
          "directUrlPreview": "example",
          "download": "example",
          "metadata": "example",
          "preview": "example"
        },
        "width": "example"
      }
    ]
  }
}
```

### List custom fields

List your account's custom fields, with each one's type and choices.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "fields": [
      {
        "id": "example",
        "name": "example",
        "type": "example",
        "values": [
          "example"
        ]
      }
    ]
  }
}
```

### Move album to trash

Move an album to Canto's trash. Its assets stay in the library.

**Inputs**

- Album (`album_id`, text, required): The album.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "deleteFail": [
      "example"
    ],
    "permissionFail": [
      "example"
    ],
    "status": "example"
  }
}
```

### Move asset to trash

Move an asset to Canto's trash, where an admin can restore it.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Move folder to trash

Move a folder, with the folders and albums in it, to Canto's trash.

**Inputs**

- Folder (`folder_id`, text, required): The folder.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "deleteFail": [
      "example"
    ],
    "permissionFail": [
      "example"
    ],
    "status": "example"
  }
}
```

### Remove asset from album

Take an asset out of an album. The asset stays in the library.

**Inputs**

- Album (`album_id`, text, required): The album.
- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Remove keyword

Remove a keyword from an asset. Removing one it doesn't have does nothing.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Keyword (`keyword`, text, required): The keyword to remove.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Remove tag

Remove a tag from an asset. Removing a tag it doesn't have does nothing.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Tag (`tag`, text, required): The tag to remove.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Rename asset

Change an asset's name.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- New name (`name`, text, required): The new name, usually with the file's extension, such as poster.jpg.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Search assets

Find assets in the library by words, type, tag, keyword, approval status, owner or upload date, a page at a time.

**Inputs**

- Search for (`keyword`, text): Words to look for, as in Canto's search box. Separate words any of which may match with |, and words that must all match with +.
- Search in (`search_in`, text): Look for the words only in this field. Leave empty to look everywhere. One of: `filename` (File name), `description`, `comment` (Comments), `keywords`, `author`, `tags`.
- Asset types (`types`, list): Only these types of asset. Leave empty for every type. One or more of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Tag (`tags`, text): Only assets with this tag.
- Keyword (`keywords`, text): Only assets with this keyword.
- Approval status (`approval`, text): Only assets with this approval status. Works when approvals are turned on in Canto. One of: `approved`, `pending`, `restricted`, `expired`.
- Owner (`owner`, text): Only assets this person uploaded.
- Uploaded from (`uploaded_from`, date and time): Only assets uploaded at or after this time.
- Uploaded to (`uploaded_to`, date and time): Only assets uploaded at or before this time.
- Sort by (`sort_by`, text): What to sort by. Canto's default is the date its settings show assets by. One of: `time` (Date), `name`, `scheme` (Type), `owner`, `size` (File size).
- Order (`sort_direction`, text): The order. Canto's default is newest first. One of: `descending` (Newest, last or largest first), `ascending` (Oldest, first or smallest first).
- Start at (`start`, number): How many assets to skip: 0 for the first page, or the next_start a previous step returned. At least 0.
- Limit (`limit`, number): How many assets to return, up to 1,000. Canto's default is 100. From 1 to 1000.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "found": 1,
    "next_start": 1,
    "results": [
      {
        "additional": {},
        "approvalStatus": "example",
        "default": {},
        "dpi": "example",
        "height": "example",
        "id": "example",
        "keyword": [
          "example"
        ],
        "name": "example",
        "owner": "example",
        "ownerName": "example",
        "relatedAlbums": [
          {
            "id": "example",
            "idPath": "example",
            "scheme": "example"
          }
        ],
        "scheme": "example",
        "size": "example",
        "tag": [
          "example"
        ],
        "time": "example",
        "url": {
          "HighJPG": "example",
          "LowJPG": "example",
          "PNG": "example",
          "detail": "example",
          "directUrlOriginal": "example",
          "directUrlPreview": "example",
          "download": "example",
          "metadata": "example",
          "preview": "example"
        },
        "width": "example"
      }
    ]
  }
}
```

### Set custom field

Set one of your account's custom fields on an asset, or add or remove a value of a multiple-choice or label field.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Custom field (`custom_field`, text, required): The custom field, as set up in Canto's settings.
- Value (`value`, text, required): The value. A date is written YYYY-MM-DD, a rating 1 to 5, a choice as Canto lists it and a label as its color code, such as #FFFFFF.
- Change (`mode`, text): For a multiple-choice or label field, whether to add the value (the default) or remove it. Other fields are set to the value. One of: `add` (Add this value), `remove` (Remove this value).

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Update asset details

Change an asset's description or copyright.

**Inputs**

- Asset type (`scheme`, text, required): The asset's type as Canto files it. A trigger or an earlier step gives it as scheme. One of: `image`, `video`, `audio`, `document`, `presentation`, `other`.
- Asset (`asset_id`, text, required): The asset. Choose one of the newest, or use the id from a trigger or an earlier step.
- Description (`description`, text): The asset's description.
- Description change (`description_mode`, text): Whether the description replaces the one the asset has (the default) or is added to its end. One of: `cover` (Replace the description), `append` (Add to the end of the description).
- Copyright (`copyright`, text): The asset's copyright notice.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Upload file

Add a file to the library, optionally in an album. Canto adds it once it has processed the file, usually within minutes; Get upload status shows when it's done, with the new asset's ID.

**Inputs**

- File (`file`, text, required): Upload a file, choose one from an earlier step, or enter a link to one. Up to 100 MB.
- File name (`file_name`, text): The name for the asset, with its extension, such as poster.jpg. Leave empty to keep the file's own name. Use a name no recent upload had, as Canto recommends.
- Album (`album_id`, text): The album to put the asset in. Leave empty to add it to the library only.

**Outputs**

- `data` (object): The response from Canto.

**Example output**

```json
{
  "data": {
    "album_id": "example",
    "file_name": "example",
    "success": true
  }
}
```
