Live Channels

post
Create a live channel

https://api-v2.acrcloud.com/api/buckets/:bucket_id/channels
Request
Response
Request
Path Parameters
bucket_id
optional
number
The bucket id
Headers
Authentication
required
string
Bearer token
Body Parameters
title
required
string
The channel title
url
required
string
The channel URL for ingesting the fingerprint from local server
user_defined
optional
string
User-defined metadata. JSON format
timeshift
optional
string
If enable the timeshifted fingerprint ingesting. 0 or 1. default is 0
Response
201: Created
Cake successfully retrieved.
{
"data": {
"uid": 1,
"bucket_id": 8894,
"acr_id": "b46ba66d2548b23611c6efabed035182",
"state": 0,
"title": "test",
"url": "udp://192.168.1.10",
"user_defined": {
"city": "New York"
},
"timeshift": 0,
"updated_at": "2020-12-25T05:05:17.000000Z",
"created_at": "2020-12-25T05:05:17.000000Z",
"id": 8,
"bucket_type": "Live"
}
}
Curl
Python
Curl
curl --location --request POST 'https://api-v2.acrcloud.com/api/buckets/8894/channels' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"title":"test", "url":"udp://192.168.1.10", "user_defined":{"city":"New York"}}'
Python
import requests
url = "https://api-v2.acrcloud.com/api/buckets/8894/channels"
payload={
"title":"test",
"url":"udp://192.168.1.10",
"user_defined":{"city":"New York"}
}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer token',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)

get
List the channels

https://api-v2.acrcloud.com/api/buckets/:bucket_id/channels
Request
Response
Request
Path Parameters
bucket_id
required
number
The bucket id
Headers
Authentication
required
string
Bearer token
Query Parameters
search
optional
string
The title name.
page
optional
string
Page number
per_page
optional
string
The results number per page.
optional
string
asc or desc. Default is desc
sort
optional
string
sort by id or status. default is id
Response
200: OK
{
"data": [
{
"id": 8,
"uid": 1,
"bucket_id": 8894,
"acr_id": "b46ba66d2548b23611c6efabed035182",
"channel_id": "",
"state": 1,
"title": "test",
"url": "udp://192.168.1.10",
"user_defined": {
"city": "New York"
},
"timeshift": 0,
"created_at": "2020-12-25T05:05:17.000000Z",
"updated_at": "2020-12-25T05:05:17.000000Z",
"bucket_type": "Live"
},
{
"id": 7,
"uid": 1,
"bucket_id": 8894,
"acr_id": "3482b6e845a0fed8c129108d54ed9e20",
"channel_id": "",
"state": 1,
"title": "123",
"url": "123",
"user_defined": {},
"timeshift": 1,
"created_at": "2020-09-16T03:36:59.000000Z",
"updated_at": "2020-09-16T03:36:59.000000Z",
"bucket_type": "Live"
},
{
"id": 4,
"uid": 1,
"bucket_id": 8894,
"acr_id": "f59e5c0e31a73db957b6c68fcda38c44",
"channel_id": "",
"state": 1,
"title": "channel-4",
"url": "http://127.0.0.1:123",
"user_defined": {},
"timeshift": 1,
"created_at": "2019-06-25T07:46:24.000000Z",
"updated_at": "2020-09-16T03:49:43.000000Z",
"bucket_type": "Live"
},
{
"id": 3,
"uid": 1,
"bucket_id": 8894,
"acr_id": "6cc839537aa40b2854f4e520b7d0d58b",
"channel_id": "",
"state": 1,
"title": "channel-3",
"url": "http://127.0.0.1:123",
"user_defined": {},
"timeshift": 0,
"created_at": "2019-06-25T07:46:21.000000Z",
"updated_at": "2019-11-22T11:51:57.000000Z",
"bucket_type": "Live"
}
],
"links": {
"first": "https://api-v2.acrcloud.com/api/buckets/8894/channels?page=1",
"last": "https://api-v2.acrcloud.com/api/buckets/8894/channels?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api-v2.acrcloud.com/api/buckets/8894/channels",
"per_page": 20,
"to": 4,
"total": 4
}
}
Curl
Curl
curl --location --request GET 'https://api-v2.acrcloud.com/api/buckets/8894/channels' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

put
Update a channel

https://api-v2.acrcloud.com/api/buckets/:bucket_id/channels/:id
Request
Response
Request
Path Parameters
bucket_id
required
string
bucket id
id
required
string
channel id
Headers
Authentication
optional
string
Bearer token
Body Parameters
title
optional
string
The channel title
url
optional
string
The channel URL for ingesting fingerprints on your local server
user_defined
optional
string
User-define
timeshift
optional
string
If enable the timeshifted fingerprint ingestring. 0 or 1.
Response
200: OK
{
"data": {
"uid": 1,
"bucket_id": 8894,
"acr_id": "b46ba66d2548b23611c6efabed035182",
"state": 0,
"title": "test",
"url": "udp://192.168.1.10",
"user_defined": {
"city": "New York"
},
"timeshift": 0,
"updated_at": "2020-12-25T05:05:17.000000Z",
"created_at": "2020-12-25T05:05:17.000000Z",
"id": 8,
"bucket_type": "Live"
}
}
Curl
Curl
curl --location --request PUT 'https://api-v2.acrcloud.com/api/buckets/8884/channels/8' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"title":"test"}'

delete
Delete ingesting channels

https://api-v2.acrcloud.com/api/buckets/:bucket_id/channels/:ids
Request
Response
Request
Path Parameters
bucket_id
optional
string
The bucket id
ids
optional
string
One or multiple ids, separated by ','
Headers
Authentication
optional
string
Bearer token
Response
204: No Content
Curl
Curl
curl --location --request DELETE 'https://api-v2.acrcloud.com/api/buckets/8894/channels/8' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

post
Import channels

https://api-v2.acrcloud.com/api/buckets/:bucket_id/rec-channels
Import channels to LiveRec bucket.
Request
Response
Request
Path Parameters
bucket_id
required
string
Bucket id
Headers
Authentication
required
string
Bearer token
Body Parameters
ids
required
string
One or multiple channels ids. Separated by ','
Response
200: OK
{
"data": [
{
"id": 5,
"acr_id": "a25b69e996f6f220ddb7a0c4a53a11c1",
"title": "channel-5",
"state": 0,
"bucket_id": 8885,
"original_bucket_id": 8882,
"created_at": "2020-12-25 07:39:29",
"updated_at": "2020-12-25 07:39:29",
"bucket_type": "LiveRec",
"user_defined": {}
},
{
"id": 6,
"acr_id": "08e491a33c5c1bb7418ce49254fc35ed",
"title": "adf",
"state": 0,
"bucket_id": 8885,
"original_bucket_id": 8882,
"created_at": "2020-12-25 07:39:29",
"updated_at": "2020-12-25 07:39:29",
"bucket_type": "LiveRec",
"user_defined": {
"channel_name": "abc",
"channel_type": "def"
}
}
]
}
Curl
Curl
curl --location --request POST 'https://api-v2.acrcloud.com/api/buckets/8885/rec-channels' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"ids":[5,6]}'

delete
Delete rec channels

https://api-v2.acrcloud.com/api/buckets/:bucket_id/rec-channels/:ids
Request
Response
Request
Path Parameters
bucket_id
required
number
The bucket id
ids
required
string
One or multiple channel ids. Separated by ','
Headers
Authentication
required
string
Bearer token
Response
204: No Content
Curl
Curl
curl --location --request DELETE 'https://api-v2.acrcloud.com/api/buckets/8895/rec-channels/5,6' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'

post
Create timeshift channels

https://api-v2.acrcloud.com/api/buckets/:bucket_id/timeshift-channels
Request
Response
Request
Path Parameters
bucket_id
required
number
The bucket id
Headers
Authentication
required
string
Bearer token
Body Parameters
time
required
number
The timeshift fingerprints keep-alive time (In hours). The default is 1 hour.
id
required
number
The live channel id
Response
200: OK
{
"data": {
"id": 5,
"title": "channel-5",
"state": 0,
"bucket_id": 8893,
"acr_id": "a25b69e996f6f220ddb7a0c4a53a11c1",
"time": 24,
"original_bucket_id": 8882,
"created_at": "2020-12-25 07:57:52",
"updated_at": "2020-12-25 07:57:52",
"bucket_type": "LiveTimeshift",
"user_defined": {}
}
}
Curl
Curl
curl --location --request POST 'https://api-v2.acrcloud.com/api/buckets/8893/timeshift-channels' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"id":5, "time":24}'

delete
Delete timeshift channels

https://api-v2.acrcloud.com/api/buckets/:bucket_id/timeshift-channels/:ids
Request
Response
Request
Path Parameters
ids
required
string
One or multiple channel ids, Separated by ','
bucket_id
required
number
The bucket id
Headers
Authentication
required
string
Bearer token
Response
200: OK