curl --request GET \
--url https://api.comstruct.com/v1/projects \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/projects"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.comstruct.com/v1/projects', 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.comstruct.com/v1/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.comstruct.com/v1/projects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.comstruct.com/v1/projects")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"projects": [
{
"id": "cefa2499-e11d-cada-b423-c3af41ae5232",
"title": "Example Site 1",
"project_number": "23423420",
"description": "Description",
"region": "Bavaria",
"address": {
"address": "Example Street",
"city": "Munich",
"country": "DE",
"house_number": "1",
"zip": "80331"
},
"alternative_project_number": "ALT-23423420",
"legal_entity": {
"id": "11111111-1111-1111-1111-111111111111",
"title": "Example Legal Entity",
"number": "LE-001"
},
"external_id": "EXT-001",
"active": true,
"latitude": 48.1351,
"longitude": 11.582
},
{
"id": "23d12932-2348-345d-b342-2323cd846323",
"title": "23043 - Example Site 2",
"project_number": null,
"description": "Description",
"region": "Berlin",
"address": {
"address": "Sample Avenue",
"city": "Berlin",
"country": "DE",
"house_number": "2",
"zip": "10115"
},
"alternative_project_number": null,
"legal_entity": {
"id": "22222222-2222-2222-2222-222222222222",
"title": "Sample Legal Entity",
"number": "LE-002"
},
"external_id": "EXT-002",
"active": false,
"latitude": null,
"longitude": null
}
]
}Projekte auflisten
Erforderliche Berechtigungen: projects:read
Gibt eine paginierte Liste der Projekte zurück. Jedes Projekt enthält die wichtigsten Stammdaten, einschließlich Projektnummer, Beschreibung, Region, Adresse, Buchungskreis, externer ID, Aktivstatus und alternativer Projektnummer.
curl --request GET \
--url https://api.comstruct.com/v1/projects \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/projects"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.comstruct.com/v1/projects', 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.comstruct.com/v1/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.comstruct.com/v1/projects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.comstruct.com/v1/projects")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"projects": [
{
"id": "cefa2499-e11d-cada-b423-c3af41ae5232",
"title": "Example Site 1",
"project_number": "23423420",
"description": "Description",
"region": "Bavaria",
"address": {
"address": "Example Street",
"city": "Munich",
"country": "DE",
"house_number": "1",
"zip": "80331"
},
"alternative_project_number": "ALT-23423420",
"legal_entity": {
"id": "11111111-1111-1111-1111-111111111111",
"title": "Example Legal Entity",
"number": "LE-001"
},
"external_id": "EXT-001",
"active": true,
"latitude": 48.1351,
"longitude": 11.582
},
{
"id": "23d12932-2348-345d-b342-2323cd846323",
"title": "23043 - Example Site 2",
"project_number": null,
"description": "Description",
"region": "Berlin",
"address": {
"address": "Sample Avenue",
"city": "Berlin",
"country": "DE",
"house_number": "2",
"zip": "10115"
},
"alternative_project_number": null,
"legal_entity": {
"id": "22222222-2222-2222-2222-222222222222",
"title": "Sample Legal Entity",
"number": "LE-002"
},
"external_id": "EXT-002",
"active": false,
"latitude": null,
"longitude": null
}
]
}Autorisierungen
API-Schlüssel zur Authentifizierung. Kontaktieren Sie Ihren Customer Success Manager, um einen API-Schlüssel zu erhalten.
Jeder Endpunkt erfordert spezifische Berechtigungen (Scopes); die erforderlichen Scopes werden pro Endpunkt angezeigt.
Abfrageparameter
Maximale Anzahl der Projekte pro Seite
1 <= x <= 500Anzahl der zu überspringenden Projekte für die Paginierung
x >= 0Antwort
Erfolgreich
Show child attributes
Show child attributes
Gesamtanzahl der Projekte
150
Anzahl der Einträge pro Seite
25
Anzahl der übersprungenen Einträge
0
Ob weitere Seiten verfügbar sind
true
Ob vorherige Seiten verfügbar sind
false
Gesamtanzahl der Seiten
6
Aktuelle Seitennummer (0-basiert)
0