Get Person
curl --request GET \
--url https://api.example.com/people/{id}import requests
url = "https://api.example.com/people/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/people/{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.example.com/people/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/people/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/people/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/people/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"bio": "<string>",
"image": "<string>"
}People
Get Person
Retrieve a specific person by ID
GET
/
people
/
{id}
Get Person
curl --request GET \
--url https://api.example.com/people/{id}import requests
url = "https://api.example.com/people/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/people/{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.example.com/people/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/people/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/people/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/people/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"bio": "<string>",
"image": "<string>"
}Overview
Returns detailed information about a single person identified by their unique ID.Path Parameters
The unique identifier of the person
Request
curl https://entertheatre.com/api/people/person-001
const personId = 'person-001';
const response = await fetch(`https://entertheatre.com/api/people/${personId}`);
const person = await response.json();
import requests
person_id = 'person-001'
response = requests.get(f'https://entertheatre.com/api/people/{person_id}')
person = response.json()
Response
Unique identifier for the person
Full name of the person
Biography or description
URL to the person’s headshot
Example Response
{
"id": "person-001",
"name": "Elaine Paige",
"bio": "Legendary West End star known for originating roles in Evita and Cats. She has received numerous awards including an Olivier Award and has been called the 'First Lady of British Musical Theatre'.",
"image": "https://rluylvquemmzgljdklby.supabase.co/storage/v1/object/public/people/elaine-paige.jpg"
}
Error Response
{
"error": "Person not found"
}
Status Codes
| Status | Description |
|---|---|
200 | Success - returns person object |
404 | Person not found |
500 | Server error |
⌘I