Recording REST API v1
The REST API v1 allows you to request information from our servers programmatically and in a standardized manner, using JSON.
All requests are made against https://api.addpipe.com and are authenticated by sending the API key as the value of the X-PIPE-AUTH header.
API Key
The API Key can be found on your Pipe account details page. If you do not already have one, you can generate your initial API Key there.
The key should be kept in a safe place, like any other password. If compromised, the API Key can be regenerated and replaced with a new one.
API Endpoints
/video
Perform actions for (undeleted) recordings from your account.
Parameters:
all, optional.GET /videoandGET /video/allreturn the same response.
Requests available:
GET https://api.addpipe.com/video/all- get all videos from your account.
All recordings are returned in a single response, there is no pagination. Deleted recordings are not included. The fields of each recording are described in Recording fields.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"total_videos": 35,
"videos": [
{
"id": "60372",
"env_id": "1",
"length": "5.00",
"width": "320",
"height": "240",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "0",
"has_mp4": "1",
"has_snapshot": "1",
"has_filmstrip": "0",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2016-03-21 17:39:22",
"last_retry_time": "2016-03-21 17:39:24",
"size": "417346",
"ipv4": "1565594519",
"orig_width": null,
"orig_height": null,
"mrt": null,
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "vs1458574806017_16",
"original_container": "webm",
"source": "DESK",
"payload": "",
"ua": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
"http_referer": "https://addpipe.com",
"camera_name": "Logitech HD Pro Webcam C920",
"microphone_name": "Microphone (HD Pro Webcam C920)",
"has_audio_extracted": "0",
"datetimeAdjusted": "2016-03-21 17:39:22",
"converted": "1",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458574806017_16.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458574806017_16.jpg",
"ftped": "0",
"sftped": "1",
"s3ed": "1",
"dboxed": "1"
},
{
"id": "60373",
"env_id": "1",
"length": "6.00",
"width": "320",
"height": "240",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "0",
"has_mp4": "1",
"has_snapshot": "1",
"has_filmstrip": "0",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2016-03-21 17:42:26",
"last_retry_time": "2016-03-21 18:45:54",
"size": "282309",
"ipv4": "1565594519",
"orig_width": null,
"orig_height": null,
"mrt": null,
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "vs1458574990422_278",
"original_container": "webm",
"source": "DESK",
"payload": "",
"ua": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
"http_referer": "https://addpipe.com",
"camera_name": "Logitech HD Pro Webcam C920",
"microphone_name": "Microphone (HD Pro Webcam C920)",
"has_audio_extracted": "0",
"datetimeAdjusted": "2016-03-21 17:42:26",
"converted": "1",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458574990422_278.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458574990422_278.jpg",
"ftped": "0",
"sftped": "1",
"s3ed": "1",
"dboxed": "1"
},
{
"id": "60382",
"env_id": "1",
"length": "16.00",
"width": "320",
"height": "240",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "0",
"has_mp4": "1",
"has_snapshot": "1",
"has_filmstrip": "0",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2016-03-21 18:39:05",
"last_retry_time": "2016-03-21 18:45:54",
"size": "958462",
"ipv4": "1565594519",
"orig_width": null,
"orig_height": null,
"mrt": null,
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "vs1458578379324_24",
"original_container": "webm",
"source": "DESK",
"payload": "",
"ua": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
"http_referer": "https://addpipe.com",
"camera_name": "Logitech HD Pro Webcam C920",
"microphone_name": "Microphone (HD Pro Webcam C920)",
"has_audio_extracted": "0",
"datetimeAdjusted": "2016-03-21 18:39:05",
"converted": "1",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578379324_24.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578379324_24.jpg",
"ftped": "0",
"sftped": "1",
"s3ed": "1",
"dboxed": "1"
},
{
"id": "60384",
"env_id": "1",
"length": "7.00",
"width": "320",
"height": "240",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "0",
"has_mp4": "1",
"has_snapshot": "1",
"has_filmstrip": "0",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2016-03-21 18:40:20",
"last_retry_time": "2016-03-21 18:45:54",
"size": "600022",
"ipv4": "1565594519",
"orig_width": null,
"orig_height": null,
"mrt": null,
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "vs1458578462703_775",
"original_container": "webm",
"source": "DESK",
"payload": "",
"ua": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
"http_referer": "https://addpipe.com",
"camera_name": "Logitech HD Pro Webcam C920",
"microphone_name": "Microphone (HD Pro Webcam C920)",
"has_audio_extracted": "0",
"datetimeAdjusted": "2016-03-21 18:40:20",
"converted": "1",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578462703_775.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578462703_775.jpg",
"ftped": "0",
"sftped": "1",
"s3ed": "1",
"dboxed": "1"
},
{
"id": "60385",
"env_id": "1",
"length": "7.00",
"width": "320",
"height": "240",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "0",
"has_mp4": "1",
"has_snapshot": "1",
"has_filmstrip": "0",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2016-03-21 18:49:02",
"last_retry_time": "2016-03-21 18:45:54",
"size": "579632",
"ipv4": "1565594519",
"orig_width": null,
"orig_height": null,
"mrt": null,
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "vs1458578985192_39",
"original_container": "webm",
"source": "DESK",
"payload": "",
"ua": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
"http_referer": "https://addpipe.com",
"camera_name": "Logitech HD Pro Webcam C920",
"microphone_name": "Microphone (HD Pro Webcam C920)",
"has_audio_extracted": "0",
"datetimeAdjusted": "2016-03-21 18:49:02",
"converted": "1",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578985192_39.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578985192_39.jpg",
"ftped": "0",
"sftped": "0",
"s3ed": "1",
"dboxed": "1"
},
{
"id": "61071",
"env_id": "1",
"length": "9.00",
"width": "480",
"height": "480",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "0",
"has_mp4": "1",
"has_snapshot": "1",
"has_filmstrip": "0",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2016-03-23 15:48:57",
"last_retry_time": "2016-03-21 18:45:54",
"size": "2348347",
"ipv4": "1565594519",
"orig_width": null,
"orig_height": null,
"mrt": null,
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "mvs556696771",
"original_container": "mov",
"source": "MOB",
"payload": "",
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13E234 Safari/601.1",
"http_referer": "https://addpipe.com",
"camera_name": "mobile_device",
"microphone_name": "mobile_device",
"has_audio_extracted": "0",
"datetimeAdjusted": "2016-03-23 15:48:57",
"converted": "1",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/mvs556696771.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/mvs556696771.jpg",
"ftped": "0",
"sftped": "1",
"s3ed": "1",
"dboxed": "1"
}
]
}
/video/:id
Perform actions for a specific recording.
Parameters:
:id- numerical representation of the recording ID which can be found in your Pipe account, under the Recordings tab.
Requests available:
GET https://api.addpipe.com/video/13360- get specific information for this recording id.
The recording has the same fields as in the /video/all response, plus timezone: the time zone of your account, used to calculate datetimeAdjusted. If the recording does not exist, belongs to another account or was deleted, the response has "message": "No videos found", "total_videos": 0 and an empty videos array, with a 200 status code.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"total_videos": 1,
"videos": [
{
"id": "13360",
"env_id": "1",
"length": "3.00",
"width": "640",
"height": "480",
"hasAudio": "1",
"ytubed": "0",
"rotation": "0",
"not_stored": "0",
"retry_interval": "-1",
"has_original": "1",
"has_mp4": "0",
"has_snapshot": "1",
"has_filmstrip": "1",
"is_screenrecording": "0",
"anonymized": "0",
"region": "eu1",
"datetime": "2020-08-18 17:51:58",
"last_retry_time": "2020-08-18 17:52:05",
"size": "145695",
"ipv4": "1565594519",
"orig_width": "176",
"orig_height": "176",
"mrt": "120",
"audio_only": "0",
"recovered": "0",
"transcoded": "1",
"checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
"checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
"date_anonymized": null,
"name": "vs1458578985192_39",
"original_container": "flv",
"source": "DESK",
"payload": "bc5cq87vt3yv4t94t325af97c9e836e7bd2,1",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36",
"http_referer": "https://site.com/test/test2.php",
"camera_name": "Built-in iSight (05ac:8502)",
"microphone_name": "Default",
"has_audio_extracted": "0",
"converted": "1",
"datetimeAdjusted": "2016-03-23 16:23:19",
"timezone": "Europe/Bucharest",
"pipeS3Link": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578985192_39.mp4",
"snapshotURL": "eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/vs1458578985192_39.jpg",
"ftped": "0",
"sftped": "0",
"s3ed": "0",
"dboxed": "0"
}
]
}
DELETE https://api.addpipe.com/video/167841- deletes the recording with this id
/account
Perform actions on your account.
Requests available:
GET https://api.addpipe.com/account- get basic information about your Pipe account.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"account_details": [
{
"api_requests": "13",
"name": "Gloria Foster",
"email": "myAwesome@Email.com"
}
]
}
/environment
Access environment-related information.
Requests available:
GET https://api.addpipe.com/environment- get basic information regarding all the environments on your account.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"environment_details": [
{
"id": "5167",
"env_id": "1",
"env_code": "1deF5t",
"env_name": "Production",
"do_not_store": "0",
"send_video_email": "1",
"region": "auto-us"
},
{
"id": "14444",
"env_id": "3",
"env_code": "ytvcfr",
"env_name": "Staging",
"do_not_store": "0",
"send_video_email": "1",
"region": "eu1"
},
{
"id": "14678",
"env_id": "4",
"env_code": "65d14v",
"env_name": "Development",
"do_not_store": "0",
"send_video_email": "1",
"region": "eu1"
},
{
"id": "18662",
"env_id": "6",
"env_code": "34dcxx",
"env_name": "US regions",
"do_not_store": "0",
"send_video_email": "1",
"region": "auto-us"
}
]
}
/environment/:id
Get details about a specific environment.
Parameters:
:id- numerical representation of the environment’s uniqueidwhich can be retrieved by using the GET/environmentendpoint (not theenv_id).
Requests available:
GET https://api.addpipe.com/environment/1537- get basic information for an individual environment.
JSON response
{
"status":"OK",
"status_code":200,
"message":"Request successful",
"request_method":"GET",
"environment_details":[
{
"id":"1537",
"env_id":"7",
"env_code": "j2HCiP",
"env_name":"test-rtc",
"do_not_store":"1",
"send_video_email":"0",
"region": "auto-us"
}
]
}
/webhook
Access webhook-related information.
Requests available:
GET https://api.addpipe.com/webhook- get basic information regarding all the webhooks on your account.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"webhook_details": [
{
"id": "3157",
"webhook": "https://webhook.site/b7495225-4ad8-495e-8140-d74fda5be972",
"webhook_recorded": "1",
"webhook_transcoded": "0",
"webhook_converted": "1",
"webhook_copied_pipe_s3": "1",
"webhook_copied_s3": "0",
"webhook_copied_ftp": "0",
"webhook_copied_dbox": "0",
"env_id": "1",
"active": "1"
},
{
"id": "3487",
"webhook": "https://hooks.zapier.com/hooks/catch/123456/oz1amxx/",
"webhook_recorded": "0",
"webhook_transcoded": "0",
"webhook_converted": "0",
"webhook_copied_pipe_s3": "1",
"webhook_copied_s3": "0",
"webhook_copied_ftp": "0",
"webhook_copied_dbox": "0",
"env_id": "4",
"active": "1"
}
]
}
/webhook/:id
Perform actions for a specific webhook.
Parameters:
:id- the numeric webhook id which can be retrieved by using the GET/webhookendpoint.
Requests available:
PUT https://api.addpipe.com/webhook/69- update a specific webhook by following the below JSON scheme
For PUT requests, make sure you send at least one of the following name/value pairs:
{
"webhook": "http://your-fancy-website.com/webhook",
"webhook_recorded": "0",
"webhook_transcoded": "1",
"webhook_converted": "1",
"webhook_copied_pipe_s3":"0",
"webhook_copied_s3": "0",
"webhook_copied_ftp": "0",
"webhook_copied_dbox": "0",
"active":"1"
}
/amazon
Perform actions on your Amazon S3 related information stored with Pipe.
Requests available:
GET https://api.addpipe.com/amazon- get basic information about your Amazon S3 credentials for all environments on your account.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"amazon_details": [
{
"id":"69",
"amz_bucket": "my-pipe-recordings",
"amz_bucket_region": "us-east-1",
"amz_acl": "public-read",
"env_id":"1"
}
]
}
/amazon/:id
Perform actions for a specific Amazon S3 credentials set.
Parameters:
:id- numerical representation of the Amazon S3 credentials ID which can be retrieved by using the GET/amazonendpoint.
Requests available:
PUT https://api.addpipe.com/amazon/69- update a set of Amazon S3 credentials following the below JSON scheme
For PUT requests, make sure you send at least one of the following name/value pairs:
{
"amz_key": "YourAmazonKey",
"amz_secret": "YourAmazonSecret",
"amz_bucket": "TheBucket",
"amz_bucket_region": "us-east-1"
}
/ftp
Perform actions on your FTP(S)/SFTP-related information stored with Pipe.
Requests available:
GET https://api.addpipe.com/ftp- get information regarding your SFTP or FTP(S) credentials.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"ftp_details": [
{
"id":"69",
"ftp_host": "",
"ftp_port": "21",
"ftp_username": "",
"ftp_dir": "",
"sftp_host": "",
"sftp_port": "22",
"sftp_username": "",
"sftp_dir": "",
"env_id":"1"
}
]
}
/ftp/:id
Perform actions for a specific set of SFTP or FTP(S) credentials.
Parameters:
:id- the numerical id for the set of SFTP or FTP(S) credentials. It can be retrieved by using the GET/ftpendpoint.
Requests available:
PUT https://api.addpipe.com/ftp/69- update a set of SFTP or FTP(S) credentials following the below JSON scheme
For PUT requests, make sure you send at least one of the following name/value pairs:
{
"ftp_host": "FtpHost",
"ftp_port": "21",
"ftp_username": "FtpUsername",
"ftp_password": "FtpPass",
"ftp_dir": "/dir/to/saved_videos",
"sftp_host": "SftpHost",
"sftp_port": "22",
"sftp_username": "SftpUser",
"sftp_password": "SftpPass",
"sftp_dir": "/dir/to/saved_videos"
}
/dropbox
Perform actions on your Dropbox-related information stored with Pipe.
Requests available:
GET https://api.addpipe.com/dropbox- get basic information about all the Dropbox credentials on your account.
JSON response
{
"status": "OK",
"status_code": 200,
"message": "Request successful",
"request_method": "GET",
"dropbox_details": [
{
"id": "5163",
"dbox_folder": "",
"env_id": "1"
},
{
"id": "5976",
"dbox_folder": "",
"env_id": "2"
}
]
}
/dropbox/:id
Perform actions for a specific set of Dropbox credentials.
Parameters:
:id- the numeric id for the Dropbox credentials set, it can be obtained through GET/dropboxendpoint.
Requests available:
PUT https://api.addpipe.com/dropbox/69- update a set of Dropbox credentials following the below JSON scheme
For PUT requests, make sure you send at least one of the following name/value pairs:
{
"dbox_token": "YourDropboxAccessToken",
"dbox_folder": "YourDropboxFolder"
}
Recording fields
All values in a recording are returned as strings, including numbers, or as null.
These fields can be null: size, checksum_md5, checksum_sha1, ipv4, ua, http_referer, camera_name, microphone_name, orig_width, orig_height, mrt, transcoded and date_anonymized.
Fields with a fixed set of values:
| Field | Values |
|---|---|
source | DESK - recorded in a desktop browserMOB_MRAPI - recorded in a mobile browserDESK_UP - uploaded from a desktop browserMOB - recorded or uploaded through the mobile device’s native file pickerSDK_ANDROID, SDK_IOS - submitted through the Android or iOS SDKPOST_API - submitted through another upload method |
region | the region where the recording is stored, for example eu1, eu2, eu3, us1, us2 or ca1 |
original_container | the container of the original file, for example webm, mp4, mov, mp3, m4a or avi |
ftped, sftped, s3ed, dboxed | 0 - no copy was attempted or the copy is in progress1 - copied successfully to your FTP(S), SFTP, Amazon S3 or Dropbox storage2 - the copy failed, it will be retried |
retry_interval | -1 when no retry is scheduled, otherwise the number of minutes to wait before the next retry (2, 5, 10, … up to 1440) |
converted | 1 if the recording was converted to MP4, 0 otherwise |
transcoded | 1 if the recording was re-encoded during conversion, 0 if the original streams were copied without re-encoding, null for older recordings and for recordings that were not converted |
hasAudio | 1 if the recording has an audio track, 0 if it does not, -1 if the recording could not be processed |
has_audio_extracted | 1 if the audio track was also saved to a separate file |
is_screenrecording | 1 for screen recordings |
audio_only | 1 for audio-only recordings |
rotation | 0, 90, 180 or 270 |
Storage links
pipeS3Link and snapshotURL are built from the recording’s name. They are returned even when the file does not exist, so check has_mp4 and has_snapshot before using them:
pipeS3Linkalways ends in.mp4, including for audio-only recordings.snapshotURLis empty for audio-only recordings.- Both are empty when the recording was not stored (
"not_stored": "1"). - When a recording failed to convert (
"converted": "0"),pipeS3LinkandsnapshotURLcan be missing the storage host, for example/2123b9efed932689c4081a749a877413/vs1458574806017_16.mp4.
Code Examples
PHP
GET the info on a particular recording
$headers = array(
'x-pipe-auth: YOUR-PIPE-API-KEY'
);
// init curl object
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.addpipe.com/video/YOUR-RECORDING-ID');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$content = curl_exec($ch);
echo $content;
DELETE a recording
$headers = array(
'x-pipe-auth: YOUR-PIPE-API-KEY'
);
// init curl object
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.addpipe.com/video/YOUR-RECORDING-ID');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$content = curl_exec($ch);
echo $content;
JavaScript
PUT a new set of Amazon S3 credentials
var data = JSON.stringify({
"amz_key": "",
"amz_secret": "",
"amz_bucket": "",
"amz_bucket_region": ""
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PUT", "https://api.addpipe.com/amazon/YOUR-AMAZON-S3-CREDENTIALS-ID");
xhr.setRequestHeader("x-pipe-auth", "Your-Pipe-Api-Key");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("cache-control", "no-cache");
xhr.send(data);
GO
PUT a new set of Amazon S3 credentials
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.addpipe.com/amazon/YOUR-AMAZON-S3-CREDENTIALS-ID"
payload := strings.NewReader("{\n \"amz_key\": \"\",\n \"amz_secret\": \"\",\n \"amz_bucket\": \"\",\n \"amz_bucket_region\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-pipe-auth", "Your-Pipe-Api-Key")
req.Header.Add("content-type", "application/json")
req.Header.Add("cache-control", "no-cache")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Python
PUT a new set of Amazon S3 credentials
import http.client
conn = http.client.HTTPSConnection("api.addpipe.com")
payload = "{\n \"amz_key\": \"\",\n \"amz_secret\": \"\",\n \"amz_bucket\": \"\",\n \"amz_bucket_region\": \"\"\n}"
headers = {
'x-pipe-auth': "Your-Pipe-Api-Key",
'content-type': "application/json",
'cache-control': "no-cache"
}
conn.request("PUT", "/amazon/YOUR-AMAZON-S3-CREDENTIALS-ID", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Ruby
PUT a new set of Amazon S3 credentials
require 'uri'
require 'net/http'
url = URI("https://api.addpipe.com/amazon/YOUR-AMAZON-S3-CREDENTIALS-ID")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["x-pipe-auth"] = 'Your-Pipe-Api-Key'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\n \"amz_key\": \"\",\n \"amz_secret\": \"\",\n \"amz_bucket\": \"\",\n \"amz_bucket_region\": \"\"\n}"
response = http.request(request)
puts response.read_body
Bash (Wget)
PUT a new set of Amazon S3 credentials
wget --quiet \
--method PUT \
--header 'x-pipe-auth: Your-Pipe-Api-Key' \
--header 'content-type: application/json' \
--header 'cache-control: no-cache' \
--body-data '{\n "amz_key": "",\n "amz_secret": "",\n "amz_bucket": "",\n "amz_bucket_region": ""\n}' \
--output-document \
- https://api.addpipe.com/amazon/YOUR-AMAZON-S3-CREDENTIALS-ID
Bash (cURL)
PUT a new set of Amazon S3 credentials
curl --request PUT \
--url https://api.addpipe.com/amazon/YOUR-AMAZON-S3-CREDENTIALS-ID \
--header 'cache-control: no-cache' \
--header 'content-type: application/json' \
--header 'x-pipe-auth: Your-Pipe-Api-Key' \
--data '{\n "amz_key": "",\n "amz_secret": "",\n "amz_bucket": "",\n "amz_bucket_region": ""\n}'