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. May be included or omitted from the request.

Requests available:

  • GET https://api.addpipe.com/video/all - get all videos from your account.
JSON response
{
  "status": "OK",
  "message": "Request successful",
  "request_method": "GET",
  "total_videos": 35,
  "videos": [
    {
      "id":"60372",
      "name":"vs1458574806017_16",
      "original_container": "webm",
      "length":"5.00",
      "datetime":"2016-03-21 17:39:22",
      "ipv4": "1565594519",
      "orig_width": null,
      "orig_height": null,
      "mrt": null,
      "ua":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
      "http_referer":"https://addpipe.com",
      "converted":"1",
      "size":"417346",
      "original_container":"flv",
      "width":"320",
      "height":"240",
      "hasAudio":"1",
      "source":"DESK",
      "ftped":"0",
      "s3ed":"1",
      "sftped":"1",
      "dboxed":"1",
      "ytubed":"0",
      "rotation":"0",
      "payload":"",
      "camera_name":"Logitech HD Pro Webcam C920",
      "microphone_name":"Microphone (HD Pro Webcam C920)",
      "not_stored":"0",
      "retry_interval": "-1",
      "has_original": "0",
      "has_mp4": "1",
      "has_snapshot": "1",
      "has_filmstrip": "0",
      "anonymized": "0",
      "env_id": "1",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "date_anonymized": null,
      "region": "us1",
      "datetimeAdjusted":"2016-03-21 17:39:22",
      "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"
    },
    {
      "id":"60373",
      "name":"vs1458574990422_278",
      "original_container": "webm",
      "length":"6.00",
      "datetime":"2016-03-21 17:42:26",
      "last_retry_time": "2016-03-21 18:45:54",
      "ipv4": "1565594519",
      "orig_width": null,
      "orig_height": null,
      "mrt": null,
      "ua":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
      "http_referer":"https://addpipe.com",
      "converted":"1",
      "size":"282309",
      "original_container":"flv",
      "width":"320",
      "height":"240",
      "hasAudio":"1",
      "source":"DESK",
      "ftped":"0",
      "s3ed":"1",
      "sftped":"1",
      "dboxed":"1",
      "ytubed":"0",
      "rotation":"0",
      "payload":"",
      "camera_name":"Logitech HD Pro Webcam C920",
      "microphone_name":"Microphone (HD Pro Webcam C920)",
      "not_stored":"0",
      "retry_interval": "-1",
      "has_original": "0",
      "has_mp4": "1",
      "has_snapshot": "1",
      "has_filmstrip": "0",
      "anonymized": "0",
      "env_id": "1",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "date_anonymized": null,
      "region": "us1",
      "datetimeAdjusted":"2016-03-21 17:42:26",
      "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"
    },
    {
      "id":"60382",
      "name":"vs1458578379324_24",
      "original_container": "webm",
      "length":"16.00",
      "datetime":"2016-03-21 18:39:05",
      "last_retry_time": "2016-03-21 18:45:54",
      "ipv4": "1565594519",
      "orig_width": null,
      "orig_height": null,
      "mrt": null,
      "ua":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
      "http_referer":"https://addpipe.com",
      "converted":"1",
      "size":"958462",
      "original_container":"flv",
      "width":"320",
      "height":"240",
      "hasAudio":"1",
      "source":"DESK",
      "ftped":"0",
      "s3ed":"1",
      "sftped":"1",
      "dboxed":"1",
      "ytubed":"0",
      "rotation":"0",
      "payload":"",
      "camera_name":"Logitech HD Pro Webcam C920",
      "microphone_name":"Microphone (HD Pro Webcam C920)",
      "not_stored":"0",
      "retry_interval": "-1",
      "has_original": "0",
      "has_mp4": "1",
      "has_snapshot": "1",
      "has_filmstrip": "0",
      "anonymized": "0",
      "env_id": "1",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "date_anonymized": null,
      "region": "us1",
      "datetimeAdjusted":"2016-03-21 18:39:05",
      "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"
    },
    {
      "id":"60384",
      "name":"vs1458578462703_775",
      "original_container": "webm",
      "length":"7.00",
      "datetime":"2016-03-21 18:40:20",
      "last_retry_time": "2016-03-21 18:45:54",
      "ipv4": "1565594519",
      "orig_width": null,
      "orig_height": null,
      "mrt": null,
      "ua":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
      "http_referer":"https://addpipe.com",
      "converted":"1",
      "size":"600022",
      "original_container":"flv",
      "width":"320",
      "height":"240",
      "hasAudio":"1",
      "source":"DESK",
      "ftped":"0",
      "s3ed":"1",
      "sftped":"1",
      "dboxed":"1",
      "ytubed":"0",
      "rotation":"0",
      "payload":"",
      "camera_name":"Logitech HD Pro Webcam C920",
      "microphone_name":"Microphone (HD Pro Webcam C920)",
      "not_stored":"0",
      "retry_interval": "-1",
      "has_original": "0",
      "has_mp4": "1",
      "has_snapshot": "1",
      "has_filmstrip": "0",
      "anonymized": "0",
      "env_id": "1",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "date_anonymized": null,
      "region": "us1",
      "datetimeAdjusted":"2016-03-21 18:40:20",
      "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"
    },
    {
      "id":"60385",
      "name":"vs1458578985192_39",
      "original_container": "webm",
      "length":"7.00",
      "datetime":"2016-03-21 18:49:02",
      "last_retry_time": "2016-03-21 18:45:54",
      "ipv4": "1565594519",
      "orig_width": null,
      "orig_height": null,
      "mrt": null,
      "ua":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
      "http_referer":"https://addpipe.com",
      "converted":"1",
      "size":"579632",
      "original_container":"flv",
      "width":"320",
      "height":"240",
      "hasAudio":"1",
      "source":"DESK",
      "ftped":"0",
      "s3ed":"1",
      "sftped":"0",
      "dboxed":"1",
      "ytubed":"0",
      "rotation":"0",
      "payload":"",
      "camera_name":"Logitech HD Pro Webcam C920",
      "microphone_name":"Microphone (HD Pro Webcam C920)",
      "not_stored":"0",
      "retry_interval": "-1",
      "has_original": "0",
      "has_mp4": "1",
      "has_snapshot": "1",
      "has_filmstrip": "0",
      "anonymized": "0",
      "env_id": "1",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "date_anonymized": null,
      "region": "us1",
      "datetimeAdjusted":"2016-03-21 18:49:02",
      "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"
    },
    {
      "id":"61071",
      "name":"mvs556696771",
      "original_container": "webm",
      "length":"9.00",
      "datetime":"2016-03-23 15:48:57",
      "last_retry_time": "2016-03-21 18:45:54",
      "ipv4": "1565594519",
      "orig_width": null,
      "orig_height": null,
      "mrt": null,
      "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",
      "converted":"1",
      "size":"2348347",
      "original_container":".mov",
      "width":"480",
      "height":"480",
      "hasAudio":"1",
      "source":"MOB",
      "ftped":"0",
      "s3ed":"1",
      "sftped":"1",
      "dboxed":"1",
      "ytubed":"0",
      "rotation":"0",
      "payload":"",
      "camera_name":"mobile_device",
      "microphone_name":"mobile_device",
      "not_stored":"0",
      "retry_interval": "-1",
      "has_original": "0",
      "has_mp4": "1",
      "has_snapshot": "1",
      "has_filmstrip": "0",
      "anonymized": "0",
      "env_id": "1",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "date_anonymized": null,
      "region": "us1",
      "datetimeAdjusted":"2016-03-23 15:48:57",
      "pipeS3Link":"eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/mvs556696771.mp4",
      "snapshotURL":"eu1-addpipe.s3.eu-central-1.amazonaws.com/2123b9efed932689c4081a749a877413/mvs556696771.jpg"
    }
  ]
}

/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.
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",
      "size": "145695",
      "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",
      "anonymized": "0",
      "datetime": "2020-08-18 17:51:58",
      "last_retry_time": "2020-08-18 17:52:05",
      "orig_width": "176",
      "orig_height": "176",
      "mrt": "120",
      "audio_only": "0",
      "recovered": "0",
      "transcoded": "1",
      "date_anonymized": null,
      "name": "vs1458578985192_39",
      "original_container": "flv",
      "source": "DESK",
      "payload": "bc5cq87vt3yv4t94t325af97c9e836e7bd2,1",
      "region": "us1",
      "ipv4": "1565594519",
      "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",
      "checksum_md5": "311dbcd10a590c79cce3d3ccb8733560",
      "checksum_sha1": "b8fb07eb4b18e891800535278f8493ce045d4f3c",
      "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",
      "s3ed": "0",
      "sftped": "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 unique id which can be retrieved by using the GET /environment endpoint (not the env_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 /webhook endpoint.

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 /amazon endpoint.

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 /ftp endpoint.

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 /dropbox endpoint.

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"
}

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");
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"

    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.HTTPConnection("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", "/account", 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")

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)

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

Bash (cURL)

PUT a new set of Amazon S3 credentials

curl --request PUT \
  --url https://api.addpipe.com/amazon \
  --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}'