Monitors
Examples
Check out on Github.
Add
1 |
POST /v1/monitor-streams |
Name | Type | Description |
---|---|---|
url | string | required |
stream_name | string | required |
project_name | string | required |
region | string | ap-northeast-1: monitor the stream in Asian server. us-west-2: monitor the stream in American server. eu-west-1:monitor the stream in European server. local: monitor the stream in local server |
realtime | integer | 1 or 0 |
record | integer | 1 or 0 |
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Status: 201 created Location → https://api.acrcloud.com/v1/monitors/1241 X-Rate-Limit-Limit → 100 X-Rate-Limit-Remaining → 99 X-Rate-Limit-Reset → 0 { "url": "http://209.15.226.17:9018/stream", "state": 1, "interval": 2, "rec_length": 8, "rec_timeout": 5, "stream_name": "helloword", "id": 1241, "realtime": 0, "record": 0 } |
Update
1 |
PUT /v1/monitor-streams/:id |
Name | Type | Description | ||
---|---|---|---|---|
stream_name | strinig | the stream name | ||
url | string | the stream url | ||
region | string | ap-northeast-1: we will monitor the stream in Asian server. us-west-2: monitor the stream in American server. eu-west-1:monitor the stream in European server. | ||
realtime | integer | 0 or 1 | ||
record | integer | 0 or 1 |
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Status: 201 created Location → https://api.acrcloud.com/v1/monitors/1241 X-Rate-Limit-Limit → 100 X-Rate-Limit-Remaining → 99 X-Rate-Limit-Reset → 0 { "url": "http://209.15.226.17:9018/stream", "state": 1, "interval": 2, "rec_length": 8, "rec_timeout": 5, "stream_name": "helloword", "id": 1241, "region":"ap-northeast-1", "realtime": 0, "record": 0 } |
Get All
1 |
GET /v1/monitor-streams |
Name | Type | Description |
---|---|---|
project_name | string | required |
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
Status: 200 OK X-Rate-Limit-Limit → 100 X-Rate-Limit-Remaining → 99 X-Rate-Limit-Reset → 0 { "items": [ { "id": 1222, "url": "http://29.15.226.11/stream", "state": "running", "interval": 2, "rec_length": 8, "rec_timeout": 5, "stream_name": "Alger Ch 3", }, { "id": 1223, "url": "http://209.15.226.17:9018/stream", "state": "running", "interval": 2, "rec_length": 8, "rec_timeout": 5, "stream_name": "Alger Ch 3", } ], "_links": { "self": { "href": "https://apiacrcloud.localhost.com/v1/monitors?access_key=85d8e734f66d0e89a33b5f523ec0a8f1&page=1" } }, "_meta": { "totalCount": 2, "pageCount": 1, "currentPage": 1, "perPage": 20 } } |
Get One
1 |
GET /v1/monitor-streams/:id |
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Status: 200 OK X-Rate-Limit-Limit → 100 X-Rate-Limit-Remaining → 99 X-Rate-Limit-Reset → 0 { "id": 1240, "url": "http://209.15.226.27/stream", "state": "running", "interval": 2, "rec_length": 8, "rec_timeout": 5, "stream_name": "helloword" } |
Delete
1 |
DELETE /v1/monitor-streams/:id |
Response
1 2 3 4 |
Status: 204 no content X-Rate-Limit-Limit → 100 X-Rate-Limit-Remaining → 99 X-Rate-Limit-Reset → 0 |
Pause/Restart
1 |
PUT /v1/monitor-streams/:id/:action (action in [pause,restart]) |
Response
1 2 3 4 5 6 7 |
Status: 200 OK X-Rate-Limit-Limit → 100 X-Rate-Limit-Remaining → 99 X-Rate-Limit-Reset → 0 { "message": "success" } |