Skip to main content
GET
/
projects
/
byExternalId
/
{external_id}
Projekt nach externer ID abrufen
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,
  "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"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

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.

Path Parameters

external_id
string
required

Die externe Kennung des Projekts

Response

Projekt erfolgreich abgerufen

id
string<uuid>

Die eindeutige Kennung des Projekts

external_id
string

Die externe Kennung des Projekts

Example:

"EXT-001"

title
string

Der Titel des Projekts

Example:

"Example Site"

project_number
string | null

Die Projektnummer

Example:

"23423420"

description
string

Eine Beschreibung des Projekts

region
string

Die Region, in der sich das Projekt befindet, wird für Filterung verwendet

Example:

"Bavaria"

project_region_id
string<uuid> | null

Die ID der verknüpften Projektregion

active
boolean | null

Steuert, ob das Projekt aktiv ist

alternative_project_number
string | null

Alternative Projektnummer zur Referenz, z. B. aus SAP

status
string

Der Status des Projekts

customer_id
string<uuid>

Die eindeutige Kennung des Kunden

address
object

Die Adressdetails des Projekts

Der dem Projekt zugeordnete Buchungskreis

project_invites
object[]

Dem Projekt zugewiesene Benutzereinladungen