curl --request GET \
--url https://api.comstruct.com/v1/projects/byExternalId/{external_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/projects/byExternalId/{external_id}"
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/byExternalId/{external_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.comstruct.com/v1/projects/byExternalId/{external_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 => [
"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/byExternalId/{external_id}"
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/byExternalId/{external_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/projects/byExternalId/{external_id}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "EXT-001",
"title": "Example Site",
"project_number": "23423420",
"description": "<string>",
"region": "Bavaria",
"project_region_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"latitude": 48.1351,
"longitude": 11.582,
"alternative_project_number": "<string>",
"status": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"address": "<string>",
"city": "<string>",
"country": "<string>",
"house_number": "<string>",
"zip": "<string>"
},
"legal_entity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"number": "<string>"
},
"project_invites": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"role": "<string>",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}Projekt nach externer ID abrufen
Erforderliche Berechtigungen: projects:read
curl --request GET \
--url https://api.comstruct.com/v1/projects/byExternalId/{external_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.comstruct.com/v1/projects/byExternalId/{external_id}"
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/byExternalId/{external_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.comstruct.com/v1/projects/byExternalId/{external_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 => [
"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/byExternalId/{external_id}"
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/byExternalId/{external_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comstruct.com/v1/projects/byExternalId/{external_id}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "EXT-001",
"title": "Example Site",
"project_number": "23423420",
"description": "<string>",
"region": "Bavaria",
"project_region_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"latitude": 48.1351,
"longitude": 11.582,
"alternative_project_number": "<string>",
"status": "<string>",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"address": "<string>",
"city": "<string>",
"country": "<string>",
"house_number": "<string>",
"zip": "<string>"
},
"legal_entity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"number": "<string>"
},
"project_invites": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"role": "<string>",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}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.
Pfadparameter
Die externe Kennung des Projekts
Antwort
Projekt erfolgreich abgerufen
Die eindeutige Kennung des Projekts
Die externe Kennung des Projekts
"EXT-001"
Der Titel des Projekts
"Example Site"
Die Projektnummer
"23423420"
Eine Beschreibung des Projekts
Die Region, in der sich das Projekt befindet, wird für Filterung verwendet
"Bavaria"
Die ID der verknüpften Projektregion
Steuert, ob das Projekt aktiv ist
Geografische Breite des Projektstandorts
-90 <= x <= 9048.1351
Geografische Länge des Projektstandorts
-180 <= x <= 18011.582
Alternative Projektnummer zur Referenz, z. B. aus SAP
Der Status des Projekts
Die eindeutige Kennung des Kunden
Die Adressdetails des Projekts
Show child attributes
Show child attributes
Der dem Projekt zugeordnete Buchungskreis
Show child attributes
Show child attributes
Dem Projekt zugewiesene Benutzereinladungen
Show child attributes
Show child attributes