Update a live input
PUT/accounts/{account_id}/stream/live_inputs/{live_input_identifier}
Updates a specified live input.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Path Parameters
Body ParametersJSON
deleteRecordingAfterDays: optional number
Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a null value to remove an existing scheduled deletion.
minimum30
Update a live input
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/stream/live_inputs/$LIVE_INPUT_IDENTIFIER \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"deleteRecordingAfterDays": 45,
"enabled": true,
"meta": {
"name": "test stream 1"
},
"recording": {
"hideLiveViewerCount": false,
"mode": "off",
"requireSignedURLs": false,
"timeoutSeconds": 0
}
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"created": "2014-01-02T02:20:00Z",
"deleteRecordingAfterDays": 45,
"enabled": true,
"meta": {
"name": "test stream 1"
},
"modified": "2014-01-02T02:20:00Z",
"recording": {
"allowedOrigins": [
"example.com"
],
"hideLiveViewerCount": false,
"mode": "off",
"requireSignedURLs": false,
"timeoutSeconds": 0
},
"rtmps": {
"streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"url": "rtmps://live.cloudflare.com:443/live/"
},
"rtmpsPlayback": {
"streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"url": "rtmps://live.cloudflare.com:443/live/"
},
"srt": {
"passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"streamId": "f256e6ea9341d51eea64c9454659e576",
"url": "srt://live.cloudflare.com:778"
},
"srtPlayback": {
"passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"streamId": "f256e6ea9341d51eea64c9454659e576",
"url": "rtmps://live.cloudflare.com:443/live/"
},
"status": "connected",
"uid": "66be4bf738797e01e1fca35a7bdecdcd",
"webRTC": {
"url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/publish"
},
"webRTCPlayback": {
"url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/play"
}
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"created": "2014-01-02T02:20:00Z",
"deleteRecordingAfterDays": 45,
"enabled": true,
"meta": {
"name": "test stream 1"
},
"modified": "2014-01-02T02:20:00Z",
"recording": {
"allowedOrigins": [
"example.com"
],
"hideLiveViewerCount": false,
"mode": "off",
"requireSignedURLs": false,
"timeoutSeconds": 0
},
"rtmps": {
"streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"url": "rtmps://live.cloudflare.com:443/live/"
},
"rtmpsPlayback": {
"streamKey": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"url": "rtmps://live.cloudflare.com:443/live/"
},
"srt": {
"passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"streamId": "f256e6ea9341d51eea64c9454659e576",
"url": "srt://live.cloudflare.com:778"
},
"srtPlayback": {
"passphrase": "2fb3cb9f17e68a2568d6ebed8d5505eak3ceaf8c9b1f395e1b76b79332497cada",
"streamId": "f256e6ea9341d51eea64c9454659e576",
"url": "rtmps://live.cloudflare.com:443/live/"
},
"status": "connected",
"uid": "66be4bf738797e01e1fca35a7bdecdcd",
"webRTC": {
"url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/publish"
},
"webRTCPlayback": {
"url": "https://customer-m033z5x00ks6nunl.cloudflarestream.com/b236bde30eb07b9d01318940e5fc3edake34a3efb3896e18f2dc277ce6cc993ad/webRTC/play"
}
}
}