Skip to main content
POST
/
api
/
v2
/
billing
/
adrExportConfig
Configure ADR Export Settings
curl --request POST \
  --url 'https://api.vida.dev/api/v2/billing/adrExportConfig?token=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deliveryProtocol": "sftp",
  "rotationMinutes": "somekey",
  "host": "sftp.domain.com",
  "port": 2202,
  "username": "someuser",
  "password": "somepassword",
  "path": "/path/"
}
'
import requests

url = "https://api.vida.dev/api/v2/billing/adrExportConfig?token="

payload = {
    "deliveryProtocol": "sftp",
    "rotationMinutes": "somekey",
    "host": "sftp.domain.com",
    "port": 2202,
    "username": "someuser",
    "password": "somepassword",
    "path": "/path/"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    deliveryProtocol: 'sftp',
    rotationMinutes: 'somekey',
    host: 'sftp.domain.com',
    port: 2202,
    username: 'someuser',
    password: 'somepassword',
    path: '/path/'
  })
};

fetch('https://api.vida.dev/api/v2/billing/adrExportConfig?token=', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.vida.dev/api/v2/billing/adrExportConfig?token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'deliveryProtocol' => 'sftp',
    'rotationMinutes' => 'somekey',
    'host' => 'sftp.domain.com',
    'port' => 2202,
    'username' => 'someuser',
    'password' => 'somepassword',
    'path' => '/path/'
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.vida.dev/api/v2/billing/adrExportConfig?token="

	payload := strings.NewReader("{\n  \"deliveryProtocol\": \"sftp\",\n  \"rotationMinutes\": \"somekey\",\n  \"host\": \"sftp.domain.com\",\n  \"port\": 2202,\n  \"username\": \"someuser\",\n  \"password\": \"somepassword\",\n  \"path\": \"/path/\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.vida.dev/api/v2/billing/adrExportConfig?token=")
  .header("Content-Type", "application/json")
  .body("{\n  \"deliveryProtocol\": \"sftp\",\n  \"rotationMinutes\": \"somekey\",\n  \"host\": \"sftp.domain.com\",\n  \"port\": 2202,\n  \"username\": \"someuser\",\n  \"password\": \"somepassword\",\n  \"path\": \"/path/\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.vida.dev/api/v2/billing/adrExportConfig?token=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"deliveryProtocol\": \"sftp\",\n  \"rotationMinutes\": \"somekey\",\n  \"host\": \"sftp.domain.com\",\n  \"port\": 2202,\n  \"username\": \"someuser\",\n  \"password\": \"somepassword\",\n  \"path\": \"/path/\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "Success"
}

Authorizations

token
string
query
required

Vida API Token

Body

application/json
deliveryProtocol
string
required

SFTP, FTPS, or FTP

Example:

"sftp"

rotationMinutes
string
default:60
required

How many minutes of records should be contained in each file

Example:

"somekey"

host
string
required

hostname or IP address where to ship the ADR files to

Example:

"sftp.domain.com"

port
integer
required

Port for the SFTP or FTP service

Example:

2202

username
string
required

username for the sftp or ftp account

Example:

"someuser"

password
string
required

password for the sftp or ftp account

Example:

"somepassword"

path
string

Folder path to deposit the files to. Defaults to the users home directory

Example:

"/path/"

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Success"