Language

GET - Enable a Data Debit

https://testing.hubat.net/api/v2/data-debit/locationlocationlocation/enable/userprofilebigger

Propose a data debit with the bundle of data and validity

Headers

Content-Type

application/json

X-Auth-Token

curl --request GET \
  --url https:///api/v2/data-debit/locationlocationlocation/enable/userprofilebigger \
  --header 'content-type: application/json' \
  --header 'x-auth-token: ' \
  --data '{"bundle":{"name":"userprofile","bundle":{"profile":{"endpoints":[{"endpoint":"rumpel/profile"}],"limit":1},"location":{"endpoints":[{"endpoint":"rumpel/locations","mapping":{"longitude":"data.locations.longitude","latitude":"data.locations.latitude"}}],"limit":5}}},"startDate":"2017-05-13T09:32:47+00:00","endDate":"2017-06-13T09:32:47+00:00","rolling":false}'
var data = JSON.stringify({
  "bundle": {
    "name": "userprofile",
    "bundle": {
      "profile": {
        "endpoints": [
          {
            "endpoint": "rumpel/profile"
          }
        ],
        "limit": 1
      },
      "location": {
        "endpoints": [
          {
            "endpoint": "rumpel/locations",
            "mapping": {
              "longitude": "data.locations.longitude",
              "latitude": "data.locations.latitude"
            }
          }
        ],
        "limit": 5
      }
    }
  },
  "startDate": "2017-05-13T09:32:47+00:00",
  "endDate": "2017-06-13T09:32:47+00:00",
  "rolling": false
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https:///api/v2/data-debit/locationlocationlocation/enable/userprofilebigger");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("x-auth-token", "");

xhr.send(data);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https:///api/v2/data-debit/locationlocationlocation/enable/userprofilebigger",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "{\"bundle\":{\"name\":\"userprofile\",\"bundle\":{\"profile\":{\"endpoints\":[{\"endpoint\":\"rumpel/profile\"}],\"limit\":1},\"location\":{\"endpoints\":[{\"endpoint\":\"rumpel/locations\",\"mapping\":{\"longitude\":\"data.locations.longitude\",\"latitude\":\"data.locations.latitude\"}}],\"limit\":5}}},\"startDate\":\"2017-05-13T09:32:47+00:00\",\"endDate\":\"2017-06-13T09:32:47+00:00\",\"rolling\":false}",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json",
    "x-auth-token: "
  ),
));

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

curl_close($curl);

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

url = "https:///api/v2/data-debit/locationlocationlocation/enable/userprofilebigger"

payload = "{\"bundle\":{\"name\":\"userprofile\",\"bundle\":{\"profile\":{\"endpoints\":[{\"endpoint\":\"rumpel/profile\"}],\"limit\":1},\"location\":{\"endpoints\":[{\"endpoint\":\"rumpel/locations\",\"mapping\":{\"longitude\":\"data.locations.longitude\",\"latitude\":\"data.locations.latitude\"}}],\"limit\":5}}},\"startDate\":\"2017-05-13T09:32:47+00:00\",\"endDate\":\"2017-06-13T09:32:47+00:00\",\"rolling\":false}"
headers = {
    'content-type': "application/json",
    'x-auth-token': ""
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
require 'uri'
require 'net/http'

url = URI("https:///api/v2/data-debit/locationlocationlocation/enable/userprofilebigger")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'
request["x-auth-token"] = ''
request.body = "{\"bundle\":{\"name\":\"userprofile\",\"bundle\":{\"profile\":{\"endpoints\":[{\"endpoint\":\"rumpel/profile\"}],\"limit\":1},\"location\":{\"endpoints\":[{\"endpoint\":\"rumpel/locations\",\"mapping\":{\"longitude\":\"data.locations.longitude\",\"latitude\":\"data.locations.latitude\"}}],\"limit\":5}}},\"startDate\":\"2017-05-13T09:32:47+00:00\",\"endDate\":\"2017-06-13T09:32:47+00:00\",\"rolling\":false}"

response = http.request(request)
puts response.read_body