Libsyn API Reference
Asset
Handles Libsyn assets.
- Search Assets - Retrieve a list of Libsyn assets by filters.
- Retrieve Asset - Retrieve information on an individual Libsyn asset file.
- Update Asset - Update an individual Libsyn asset file.
Fields
| Field | Type | Description |
|---|---|---|
| content_id | integer | Represents the content id of the asset file. |
| file_name | string | File name of the asset file. |
| parent_content_id | integer | Represents the parent content id of the asset file. |
| show_id | integer | Represents a valid Libsyn show ID (numeric or string) (may also be known as show slug). |
| url | string | URL address of the asset file. |
| secure_url | string | Secure URL address of the asset file. |
| file_size | integer | Represents the file size of the asset file. |
| mime_type | string | Mime type of the media file. |
| creation_date | string | Creation date of the asset file. |
| page_count | integer | Total number of pages returned in the search request. (Present in the Search Posts endpoint.) |
| page_size | integer | Total number of items per page. (Present in the Search Posts endpoint.) |
| total_items | integer | Total number of items returned in the search request. (Present in the Search Posts and Retrieve Post endpoints.) |
Request
Headers
| Header | Value |
|---|---|
| Accept | application/json |
| Content-Type | multipart/form-data |
Specific Search Parameters
| Parameters | Description |
|---|---|
| video_codec | Returns results with the specified video_codec. |
| audio_codec | Returns results with the specified audio_codec. |
| mime_type | Returns results with the specified mime_type. |
| file_name | Returns results with the specified file_name. |
Retrieve a list of Libsyn assets by filters.
Request
Send a GET request to the /asset endpoint, the show_id search parameter is required:
$ curl https://api.libsyn.com/asset?show_id=[:show_id]
-X GET \
-H 'Authorization:Bearer (Your Access Token)'
-H 'Accept: application/json'
-H 'Content-Type: multipart/form-data'
Response
On success, your app will receive the following response:
{
"_links": {
"self": {
"href": "/asset"
},
"first": {
"href": "/asset?page={page}"
},
"last": {
"href": "/asset?page={page}"
},
"next": {
"href": "/asset?page={page}"
}
},
"_embedded": {
"asset": [
{
"content_id": "(int) - Represents the content id of the asset file.",
"file_name": "(string) - File name of the asset file.",
"show_id": "(int) - Represents the parent content id of the asset file.",
"show_id": "(int) - Represents a valid Libsyn show ID (numeric or string) (may also be known as show slug).",
"url": "(string) - URL address of the asset file.",
"secure_url": "(string) - Secure URL address of the asset file.",
"file_size": "(int) - File size of the asset file.",
"mime_type": "(string) - Mime type of the asset file.",
"creation_date": "(string) - Creation date of the asset file."
}
]
},
"page_count": "(int) - Total number of pages returned in the search request.",
"page_size": "(int) - Total number of items per page.",
"total_items": "(int) - Total number of items returned in the search request."
}
Retrieve information on an individual Libsyn asset file.
Request
Send a GET request to the /asset/[:content_id] endpoint:
$ curl https://api.libsyn.com/asset/[:content_id]
-X GET \
-H 'Authorization:Bearer (Your Access Token)'
-H 'Accept: application/json'
-H 'Content-Type: multipart/form-data'
Response
On success, your app will receive the following response:
{
"_links": {
"self": {
"href": "/asset/[:content_id]"
},
}
"_embedded": {
"asset": {
"content_id": "(int) - Represents the content id of the asset file.",
"file_name": "(string) - File name of the asset file."
"show_id": "(int) - Represents the parent content id of the asset file."
"show_id": "(int) - Represents a valid Libsyn show ID (numeric or string) (may also be known as show slug)."
"url": "(string) - URL address of the asset file."
"secure_url": "(string) - Secure URL address of the asset file."
"file_size": "(int) - File size of the asset file."
"mime_type": "(string) - Mime type of the asset file."
"creation_date": "(string) - Creation date of the asset file."
}
}
}
Update an individual Libsyn asset file.
Request
It is required that the following fields be included in the form data of the body in order to successfully update an existing asset:
| Field | Type | Description |
|---|---|---|
| upload | file | This is a file upload field as a part of the multipart/form-data. |
| show_id | integer | Represents the Libsyn Show associated with the asset file. |
Send a POST request to the /asset/[:content_id] endpoint:
$ curl https://api.libsyn.com/asset/[:content_id]
-X POST \
-H 'Authorization:Bearer (Your Access Token)'
-H 'Accept: application/json'
-H 'Content-Type: multipart/form-data'
-F 'upload=[:file_being_uploaded]'
-F 'show_id=[:show_id]'
Response
On success, your app will receive the following response:
{
"_links": {
"self": {
"href": "/asset/[:content_id]"
}
},
"_embedded": {
"asset": {
"content_id": "(int) - Represents the content id of the asset file.",
"parent_content_id": "(int) - Asset Parent Content Id."
"show_id": "(int) - Represents the parent content id of the asset file."
"url": "(string) - URL address of the asset file."
"secure_url": "(string) - Secure URL address of the asset file."
"file_name": "(string) - File name of the asset file."
"file_size": "(int) - File size of the asset file."
"mime_type": "(string) - Mime type of the asset file."
"creation_date": "(string) - Creation date of the asset file."
}
},
"total_items": "(int) - The total number of items returned in the search request."
}