# Wistia

> Manage Wistia media, folders and tags and read account usage.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/wistia

## Actions

### Archive media

Archive media.

**Inputs**

- Hashed Ids (`hashed_ids`, list, required): An array of the media hashed IDs to be archived.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "background_job_status": {
      "hashed_id": "example",
      "id": 1,
      "status": "queued"
    },
    "message": "example"
  }
}
```

### Copy media

Copy media.

**Inputs**

- Mediahashed (`mediaHashedId`, text, required): Hashed ID of the media (e.g., "4d23503f70")
- Folder (`folder_id`, number): The ID of the folder where you want the new copy placed. Defaults to the source media’s current folder if omitted or invalid.
- Owner (`owner`, text): An email address specifying the owner of the new media. Defaults to the source media’s current owner if omitted or invalid.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "archived": false,
    "created": "example",
    "description": "example",
    "duration": "example",
    "embedCode": "example",
    "folder": "example",
    "hashed_id": "example",
    "id": 1,
    "name": "example",
    "progress": 1.0,
    "protected": false,
    "section": "example",
    "status": "queued",
    "thumbnail": {
      "height": 1,
      "url": "example",
      "width": 1
    },
    "type": "Video",
    "updated": "example"
  }
}
```

### Copy media batch

Copy media batch.

**Inputs**

- Hashed Ids (`hashed_ids`, list, required): An array of the media hashed IDs to be copied.
- Folder (`folder_id`, text, required): The hashed ID of the destination folder where the copies will be placed.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "destination": {
      "hashedId": "example",
      "name": "example",
      "type": "example"
    }
  }
}
```

### Create folder

Create folder.

**Inputs**

- Name (`name`, text): The name of the folder you want to create.
- Adminemail (`adminEmail`, text): The email address of the person you want to set as the owner of this folder. Defaults to the Wistia Account Owner.
- Description (`description`, text): The folder’s description.
- Anonymouscanupload (`anonymousCanUpload`, true/false): Whether anonymous users can upload media to the folder.
- Anonymouscandownload (`anonymousCanDownload`, true/false): Whether anonymous users can download media from the folder.
- Public (`public`, true/false): A flag indicating whether or not the folder is enabled for public access.
- Personallibrary (`personalLibrary`, true/false): When true, creates the folder inside the requesting user's personal "My Library" (owned by them) instead of a shared account folder.

**Outputs**

- `data` (object): A folder (previously called a project) is a container in which to organize media into. It can be used to set permissions that apply to all the media in the folder as well as organizing media into subfolders (previously called media groups).

**Example output**

```json
{
  "data": {
    "anonymous_can_download": false,
    "anonymous_can_upload": false,
    "created": "example",
    "cursor": "example",
    "description": "example",
    "hashed_id": "example",
    "id": 1,
    "kind": "library",
    "media_count": 1,
    "medias": {
      "url": "example"
    },
    "name": "example",
    "personal_library": false,
    "public": false,
    "public_id": "example",
    "updated": "example"
  }
}
```

### Create tag

Create tag.

**Inputs**

- Name (`name`, text, required): The tag name. Stored lowercased with whitespace squished, 50 characters max, and must not already exist on the account.

**Outputs**

- `data` (object): A tag is used to tag related media. You can then filter media by a specific tag.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "cursor": "example",
    "name": "example",
    "taggings_count": 1,
    "updated_at": "example"
  }
}
```

### Delete folder

Delete folder.

**Inputs**

- Id (`id`, text, required): Hashed ID of the folder (e.g., "4d23503f70")

**Outputs**

- `data` (object): A folder (previously called a project) is a container in which to organize media into. It can be used to set permissions that apply to all the media in the folder as well as organizing media into subfolders (previously called media groups).

**Example output**

```json
{
  "data": {
    "anonymous_can_download": false,
    "anonymous_can_upload": false,
    "created": "example",
    "cursor": "example",
    "description": "example",
    "hashed_id": "example",
    "id": 1,
    "kind": "library",
    "media_count": 1,
    "medias": {
      "url": "example"
    },
    "name": "example",
    "personal_library": false,
    "public": false,
    "public_id": "example",
    "updated": "example"
  }
}
```

### Delete media

Delete media.

**Inputs**

- Mediahashed (`mediaHashedId`, text, required): Hashed ID of the media (e.g., "4d23503f70")

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "archived": false,
    "created": "example",
    "description": "example",
    "duration": "example",
    "embedCode": "example",
    "hashed_id": "example",
    "id": 1,
    "name": "example",
    "progress": 1.0,
    "protected": false,
    "section": "example",
    "status": "queued",
    "thumbnail": {
      "height": 1,
      "url": "example",
      "width": 1
    },
    "type": "Video",
    "updated": "example"
  }
}
```

### Delete tag

Delete tag.

**Inputs**

- Name (`name`, text, required): Name of the tag to delete

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Get account

Get account.

**Inputs**: None.

**Outputs**

- `data` (object): An account represents a customer at Wistia. Each account can own media, folders channels, etc.

**Example output**

```json
{
  "data": {
    "channel_count": 1,
    "folder_count": 1,
    "id": 1,
    "media_count": 1,
    "name": "example",
    "url": "example",
    "video_limit": 1
  }
}
```

### Get account usage

Get account usage.

**Inputs**: None.

**Outputs**

- `data` (object): Account usage and plan information, including storage, media, seat, and bandwidth limits. Fields under `limits` are only visible to account owners and managers.

**Example output**

```json
{
  "data": {
    "can_invite_teammates": false,
    "can_upload": false,
    "limits": {
      "bandwidth": {
        "limit_bytes": 1,
        "period": "monthly",
        "resets_at": "example",
        "used_bytes": 1
      },
      "media": {
        "count": 1,
        "flexible_limit": 1,
        "inflexible_limit": 1
      },
      "primary_resource": "storage",
      "storage": {
        "flexible_limit_bytes": 1,
        "inflexible_limit_bytes": 1,
        "used_bytes": 1
      },
      "users": {
        "account_billable_count": 1,
        "billable_count": 1,
        "flexible_limit": 1,
        "inflexible_limit": 1,
        "viewers_count": 1
      }
    },
    "links": {
      "billing_url": "example",
      "plans_url": "example",
      "usage_url": "example"
    },
    "plan": {
      "is_standard": false,
      "is_trial": false,
      "name": "example",
      "tier": "example",
      "trial_expires_at": "example"
    },
    "role": "example",
    "upload_blocked_reason": "example",
    "verified_domain": false
  }
}
```

### Get folder

Get folder.

**Inputs**

- Id (`id`, text, required): Hashed ID of the folder (e.g., "4d23503f70")

**Outputs**

- `data` (object): A folder (previously called a project) is a container in which to organize media into. It can be used to set permissions that apply to all the media in the folder as well as organizing media into subfolders (previously called media groups).

**Example output**

```json
{
  "data": {
    "anonymous_can_download": false,
    "anonymous_can_upload": false,
    "created": "example",
    "cursor": "example",
    "description": "example",
    "hashed_id": "example",
    "id": 1,
    "kind": "library",
    "media_count": 1,
    "medias": {
      "url": "example"
    },
    "name": "example",
    "personal_library": false,
    "public": false,
    "public_id": "example",
    "updated": "example"
  }
}
```

### Get media

Get media.

**Inputs**

- Mediahashed (`mediaHashedId`, text, required): Hashed ID of the media (e.g., "4d23503f70")
- Description Format (`description_format`, text): Description format. One of: `markdown`.
- Include (`include`, text): Include. One of: `speakers`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "archived": false,
    "assets": [],
    "created": "example",
    "description": "example",
    "duration": "example",
    "embedCode": "example",
    "folder": "example",
    "hashed_id": "example",
    "id": 1,
    "name": "example",
    "progress": 1.0,
    "protected": false,
    "section": "example",
    "speakers": [],
    "status": "queued",
    "subfolder": {
      "created": "example",
      "cursor": "example",
      "description": "example",
      "hashed_id": "example",
      "name": "example",
      "position": 1,
      "updated": "example"
    },
    "tags": [],
    "thumbnail": {
      "height": 1,
      "url": "example",
      "width": 1
    },
    "type": "Video",
    "updated": "example"
  }
}
```

### Import media

Import media.

**Inputs**

- Url (`url`, text, required): The publicly accessible URL of the media file to import.
- Folder (`folder_id`, text): The hashed ID of the folder (project) to import the media into. If not provided, a new folder will be created.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "background_job_status": {
      "hashed_id": "example",
      "id": 1,
      "status": "queued"
    },
    "message": "example"
  }
}
```

### List folders

List folders.

**Inputs**

- Page (`page`, number): Page.
- Per Page (`per_page`, number): Per page.
- Cursor Enabled (`cursor_enabled`, number): If `cursor[enabled]` is set to 1, the first result set will be fetched with cursor pagination enabled. This values is ignored if `cursor[before]` or `cursor[after]` are set. One of: `0`, `1`.
- Cursor Before (`cursor_before`, text): If `cursor[before]` is set then cursor pagination is enabled and all records before the cursor up to the `per_page` are returned. This feature is useful for fetching "new records", for example, in a "pull to refersh" feature when showing records in a descending order.
- Cursor After (`cursor_after`, text): If `cursor[after]` is set then cursor pagination is enabled and all records after the cursor up to the `per_page` are returned.
- Sort By (`sort_by`, text): Sort by. One of: `name`, `created`, `updated`, `mediaCount`, `id`.
- Sort Direction (`sort_direction`, number): Sort direction. One of: `0`, `1`.
- Hashed Ids (`hashed_ids`, list): Hashed ids.

**Outputs**

- `data` (list): Response.

**Example output**

```json
{
  "data": []
}
```

### List media

List media.

**Inputs**

- Page (`page`, number): Page.
- Per Page (`per_page`, number): Per page.
- Cursor Enabled (`cursor_enabled`, number): If `cursor[enabled]` is set to 1, the first result set will be fetched with cursor pagination enabled. This values is ignored if `cursor[before]` or `cursor[after]` are set. One of: `0`, `1`.
- Cursor Before (`cursor_before`, text): If `cursor[before]` is set then cursor pagination is enabled and all records before the cursor up to the `per_page` are returned. This feature is useful for fetching "new records", for example, in a "pull to refersh" feature when showing records in a descending order.
- Cursor After (`cursor_after`, text): If `cursor[after]` is set then cursor pagination is enabled and all records after the cursor up to the `per_page` are returned.
- Sort By (`sort_by`, text): Sort by. One of: `name`, `created`, `updated`, `position`.
- Sort Direction (`sort_direction`, number): Sort direction. One of: `0`, `1`.
- Folder (`folder_id`, text): Hashed ID of the folder (e.g., "4d23503f70")
- Name (`name`, text): Name.
- Description Format (`description_format`, text): Description format. One of: `markdown`.
- Include (`include`, text): Include. One of: `speakers`.
- Type (`type`, text): Type. One of: `Video`, `Audio`, `Image`, `PdfDocument`, `MicrosoftOfficeDocument`, `Swf`, `UnknownType`.
- Hashed Ids (`hashed_ids`, list): Hashed ids.
- Tags (`tags`, list): Tags.
- Archived (`archived`, true/false): Archived.

**Outputs**

- `data` (list): Response.

**Example output**

```json
{
  "data": []
}
```

### List tags

List tags.

**Inputs**

- Page (`page`, number): Page.
- Per Page (`per_page`, number): Per page.
- Cursor Enabled (`cursor_enabled`, number): If `cursor[enabled]` is set to 1, the first result set will be fetched with cursor pagination enabled. This values is ignored if `cursor[before]` or `cursor[after]` are set. One of: `0`, `1`.
- Cursor Before (`cursor_before`, text): If `cursor[before]` is set then cursor pagination is enabled and all records before the cursor up to the `per_page` are returned. This feature is useful for fetching "new records", for example, in a "pull to refersh" feature when showing records in a descending order.
- Cursor After (`cursor_after`, text): If `cursor[after]` is set then cursor pagination is enabled and all records after the cursor up to the `per_page` are returned.
- Sort By (`sort_by`, text): Sort by. One of: `name`, `created`, `updated`, `taggingsCount`, `id`.
- Sort Direction (`sort_direction`, number): Sort direction. One of: `0`, `1`.

**Outputs**

- `data` (list): Response.

**Example output**

```json
{
  "data": []
}
```

### Move media

Move media.

**Inputs**

- Hashed Ids (`hashed_ids`, list, required): An array of the media hashed IDs to be moved.
- Folder (`folder_id`, text, required): The hashed ID of the folder where you want the media moved.
- Subfolder Id (`subfolder_id`, text): Optional. The hashed ID of the subfolder where you want the media moved. If not provided, media will be moved to the folder's default subfolder. The subfolder must belong to the specified folder.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "background_job_status": {
      "hashed_id": "example",
      "id": 1,
      "status": "queued"
    },
    "message": "example"
  }
}
```

### Restore media

Restore media.

**Inputs**

- Hashed Ids (`hashed_ids`, list, required): An array of the media hashed IDs to be restored.
- Folder (`folder_id`, text, required): The hashed ID of the folder to restore the medias to.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "container": {
      "hashedId": "example",
      "name": "example",
      "type": "example"
    }
  }
}
```

### Update folder

Update folder.

**Inputs**

- Id (`id`, text, required): Hashed ID of the folder (e.g., "4d23503f70")
- Name (`name`, text): The folder’s new name.
- Description (`description`, text): The folder’s new description.
- Anonymouscanupload (`anonymousCanUpload`, true/false): Whether anonymous users can upload media to the folder.
- Anonymouscandownload (`anonymousCanDownload`, true/false): Whether anonymous users can download media from the folder.
- Public (`public`, true/false): A flag indicating whether or not the folder is enabled for public access.

**Outputs**

- `data` (object): A folder (previously called a project) is a container in which to organize media into. It can be used to set permissions that apply to all the media in the folder as well as organizing media into subfolders (previously called media groups).

**Example output**

```json
{
  "data": {
    "anonymous_can_download": false,
    "anonymous_can_upload": false,
    "created": "example",
    "cursor": "example",
    "description": "example",
    "hashed_id": "example",
    "id": 1,
    "kind": "library",
    "media_count": 1,
    "medias": {
      "url": "example"
    },
    "name": "example",
    "personal_library": false,
    "public": false,
    "public_id": "example",
    "updated": "example"
  }
}
```

### Update media

Update media.

**Inputs**

- Mediahashed (`mediaHashedId`, text, required): Hashed ID of the media (e.g., "4d23503f70")
- Name (`name`, text): The media’s new name.
- New Still Media Id (`new_still_media_id`, text): The Wistia hashed ID of an image that will replace the still that’s displayed before the player starts playing.
- Description (`description`, text): A new description for this media. Accepts plain text or markdown.
- Tags (`tags`, list): An array of tag names to apply to the media. This replaces any existing tags. To add tags without replacing existing tags, use bulk-tag-media.
- Custom Metadata (`custom_metadata`, object): Custom metadata field values to set, keyed by field key. Values take the same shapes as the Set Custom Metadata Field Value endpoint; a null value clears that field and omitted fields are untouched. Requires the custom metadata feature on the account.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "archived": false,
    "created": "example",
    "description": "example",
    "duration": "example",
    "embedCode": "example",
    "hashed_id": "example",
    "id": 1,
    "name": "example",
    "progress": 1.0,
    "protected": false,
    "section": "example",
    "status": "queued",
    "tags": [],
    "thumbnail": {
      "height": 1,
      "url": "example",
      "width": 1
    },
    "type": "Video",
    "updated": "example"
  }
}
```
