Get Project Relationships
GET
/api/v1/projects/{id}/relationships
Get all relationships for a specific project, organized by type. This endpoint provides a structured view of how a project connects to entities, people, DLTs, regulations, standards, DID methods, and other projects.
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Project ID (minimum: 1) |
Example Request
bash
# Get relationships for project ID 118
curl -X GET "https://www.weboftrust.org/api/v1/projects/118/relationships" \
-H "X-API-Key: YOUR_API_KEY"
Response
Success Response (200 OK)
Response Headers
| Header | Value | Description |
|---|---|---|
X-License |
CC-BY-4.0 | License identifier |
X-Attribution |
Web of Trust Map - Key State Capital | Required attribution |
Cache-Control |
public, max-age=60, s-maxage=300, stale-while-revalidate=600 | Caching directives |
Response Schema
typescript
interface ProjectRelationships {
project: {
id: number;
title: string;
type: "DID Project" | "Consortium";
};
entities: Array<{
type: "Managing" | "Funding" | "Affiliation" | "Member";
entity: {
id: number;
name: string;
type: string[]; // ["Public"] or ["Private"]
website?: object;
country?: { // Entity headquarters country
id: number;
name: string;
code: string;
};
};
source?: string;
archived_source?: string;
}>;
persons: Array<{
type: string; // Usually "Person of Interest"
person: {
id: number;
name: string;
};
role?: string;
on_behalf_of?: {
id: number;
name: string;
};
source?: string;
}>;
dlt_instances: Array<{
type: string; // Usually "DLTinstancesupport"
dlt_instance: {
id: number;
name: string;
website?: object;
};
source?: string;
archived_source?: string;
}>;
regulations: Array<{
type: string; // Usually "followsRegulation"
regulation: {
id: number;
title: string;
country?: { // Regulation's country
id: number;
name: string;
code: string;
};
};
source?: string;
}>;
standards: Array<{
type: "Follows" | "Management";
standard: {
id: number;
title: string;
};
source?: string;
archived_source?: string;
}>;
did_methods: Array<{
type: string; // Usually "Follows"
did_method: {
id: number;
name: string;
specification_url?: string;
};
source?: string;
archived_source?: string;
}>;
projects: {
outgoing: Array<{ // Projects this project relates to
type: string;
target_project: {
id: number;
title: string;
website?: object;
};
source?: string;
}>;
incoming: Array<{ // Projects that relate to this project
type: string;
source_project: {
id: number;
title: string;
website?: object;
};
source?: string;
}>;
};
summary: {
totalRelationships: number;
byType: {
entities: number;
standards: number;
dlt_instances: number;
regulations: number;
did_methods: number;
// ... other counts
};
};
}
Example Response
json
{
"project": {
"id": 118,
"title": "TradeTrust",
"type": "DID Project"
},
"entities": [
{
"type": "Managing",
"entity": {
"id": 36,
"name": "Infocomm Media Development Authority",
"type": ["Public"],
"website": {
"Url": "https://www.imda.gov.sg/",
"Description": "https://www.imda.gov.sg/"
},
"country": {
"id": 167,
"name": "Singapore",
"code": "SG"
}
},
"source": "https://www.imda.gov.sg/news-and-events/2019/05/tradetrust-launch",
"archived_source": "https://archive.ph/abc123"
},
{
"type": "Affiliation",
"entity": {
"id": 2918,
"name": "Standard Chartered PLC",
"type": ["Private"],
"website": {
"Url": "https://www.sc.com/",
"Description": "https://www.sc.com/"
},
"country": {
"id": 197,
"name": "United Kingdom",
"code": "GB"
}
},
"source": "https://www.sc.com/en/media/press-release/standard-chartered-joins-tradetrust/",
"archived_source": null
}
],
"persons": [],
"dlt_instances": [
{
"type": "DLTinstancesupport",
"dlt_instance": {
"id": 2,
"name": "Ethereum",
"website": {
"Url": "https://ethereum.org",
"Description": "Ethereum blockchain"
}
},
"source": "https://archive.ph/QD2fF#selection-1831.0-1818.14",
"archived_source": null
}
],
"regulations": [],
"standards": [
{
"type": "Follows",
"standard": {
"id": 12,
"title": "W3C Verifiable Credentials Data Model"
},
"source": "https://archive.li/UpHV3#52%",
"archived_source": null
}
],
"did_methods": [],
"projects": {
"outgoing": [],
"incoming": []
},
"summary": {
"totalRelationships": 85,
"byType": {
"entities": 35,
"standards": 10,
"dlt_instances": 2,
"regulations": 0,
"did_methods": 0
}
}
}
Relationship Types
Entity Relationships
- Managing: Entity manages or oversees the project
- Funding: Entity provides funding for the project
- Affiliation: Entity is affiliated with the project
- Member: Entity is a member (typically for consortia)
Standard Relationships
- Follows: Project implements or follows the standard
- Management: Project manages or maintains the standard
Project-to-Project Relationships
- outgoing: Relationships where this project connects to other projects
- incoming: Relationships where other projects connect to this project
- Common types include: Member, Parent, Child, Interoperability
Error Responses
400 Bad Request
Invalid ID parameter
json
{
"error": {
"code": "invalid_parameter",
"message": "Invalid project ID"
}
}
404 Not Found
Project not found
json
{
"error": {
"code": "not_found",
"message": "Project not found"
}
}
Use Cases
- Network Analysis: Build relationship graphs to understand project ecosystems
- Compliance Tracking: Identify which regulations and standards a project follows
- Technology Stack: Discover the DLT instances and DID methods used
- Partnership Discovery: Find connected entities and organizations
- Consortium Mapping: Understand parent-child relationships in consortia
Summary Statistics
The summary object provides quick counts of relationships by type. This is useful for:
- Understanding the project's complexity and connectivity
- Comparing projects by their relationship patterns
- Filtering projects by minimum relationship thresholds
- Calculating network centrality metrics
Related Endpoints
- GET /projects/{id} - Get full project details including relationships
- GET /graph/links - Get all relationships in the entire network
- GET /entities/{id} - Get details about related entities