get a person content
curl --request GET \
--url https://api.home.datanumia.com/api/v2/persons/{person-id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.home.datanumia.com/api/v2/persons/{person-id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.home.datanumia.com/api/v2/persons/{person-id}', 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.home.datanumia.com/api/v2/persons/{person-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/persons/{person-id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/persons/{person-id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/persons/{person-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ts": "2017-07-21T17:32:28Z",
"ids": {
"personId": "personId1",
"personCustomerId": "person-45634"
},
"content": {
"title": "Mme",
"firstName": "Jane",
"lastName": "Doe",
"address": {
"streetNumberAndName": "4 bis place des vosges",
"streetAdditionalInfo": "BP 90137 44701",
"locationAdditionalInfo": "Batiment B",
"zipCode": "92400",
"city": "Courbevoie",
"country": "France"
},
"mobile": "+33638854792",
"email": "api@datanumia.com"
},
"_links": {
"self": {
"href": "https://<DATANUMIA_ROOT_URL>/persons/{person-id}"
}
},
"_embedded": {
"sites": [
{
"self": {
"href": "https://<DATANUMIA_ROOT_URL>/sites/{site-id}"
}
}
]
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "INVALID_AUTHORIZATION_HEADER_VALUE",
"errorDescription": "The Authorization header is invalid"
}{
"errorCode": "ACCESS_DENIED",
"errorDescription": "The Authorization token does not have permission to the resource"
}{
"errorCode": "PERSON_NOT_FOUND",
"errorDescription": "The person xxxx does not exist"
}This response has no body data.persons
get a person content
This API operation retrieve an existing person.
GET
/
persons
/
{person-id}
get a person content
curl --request GET \
--url https://api.home.datanumia.com/api/v2/persons/{person-id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.home.datanumia.com/api/v2/persons/{person-id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.home.datanumia.com/api/v2/persons/{person-id}', 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.home.datanumia.com/api/v2/persons/{person-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/persons/{person-id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/persons/{person-id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/persons/{person-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ts": "2017-07-21T17:32:28Z",
"ids": {
"personId": "personId1",
"personCustomerId": "person-45634"
},
"content": {
"title": "Mme",
"firstName": "Jane",
"lastName": "Doe",
"address": {
"streetNumberAndName": "4 bis place des vosges",
"streetAdditionalInfo": "BP 90137 44701",
"locationAdditionalInfo": "Batiment B",
"zipCode": "92400",
"city": "Courbevoie",
"country": "France"
},
"mobile": "+33638854792",
"email": "api@datanumia.com"
},
"_links": {
"self": {
"href": "https://<DATANUMIA_ROOT_URL>/persons/{person-id}"
}
},
"_embedded": {
"sites": [
{
"self": {
"href": "https://<DATANUMIA_ROOT_URL>/sites/{site-id}"
}
}
]
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "INVALID_AUTHORIZATION_HEADER_VALUE",
"errorDescription": "The Authorization header is invalid"
}{
"errorCode": "ACCESS_DENIED",
"errorDescription": "The Authorization token does not have permission to the resource"
}{
"errorCode": "PERSON_NOT_FOUND",
"errorDescription": "The person xxxx does not exist"
}This response has no body data.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
id of the person
Response
get person detail in success
description: | The last modification date of the object as defined by RFC 3339, section 5.6 using the following format: full-date'T'partial-time'Z'
Example:
"2017-07-21T17:32:28Z"
Show child attributes
Show child attributes
Data contained within a Person object
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes