Skip to main content

Catalog API

The Catalog API manages entities (services, libraries, components, etc.) and their relations and sources. All catalog endpoints require authentication and the entity:read permission (or entity:create / entity:update / entity:delete for mutations).

Base path: /api/v1/catalog.


List entities​

GET /api/v1/catalog/entities

Returns a paginated list of entities with optional filters.

Auth​

entity:read

Query parameters​

ParameterTypeDefaultDescription
kindstringβ€”Filter by entity kind (e.g. service, library, component)
ownerstringβ€”Filter by owner (e.g. github.com/my-org)
tagstringβ€”Filter by tag
lifecyclestringβ€”Filter by lifecycle (experimental, production, deprecated)
qstringβ€”Full-text search over entity metadata
offsetnumber0Pagination offset
limitnumber20Page size (1–100)

Response​

200 OK

{
"data": [
{
"id": "uuid",
"kind": "service",
"namespace": "default",
"name": "my-service",
"owner_ref": "github.com/my-org",
"lifecycle": "production",
"tags": ["api", "backend"],
"links": [{ "title": "Repo", "url": "https://github.com/my-org/my-service" }],
"scm": {},
"spec": {},
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
}
],
"pagination": { "offset": 0, "limit": 20, "total": 1 }
}

Errors​

StatusCondition
400Invalid query (e.g. invalid enum for kind or lifecycle)
401Not authenticated
403Missing entity:read

Example​

curl -s -b cookies.txt "https://forgeportal.example.com/api/v1/catalog/entities?kind=service&limit=10&offset=0"

Get entity by ID​

GET /api/v1/catalog/entities/:id

Returns a single entity with its relations and sources. Relations are included in the same response (no separate relations endpoint).

Auth​

entity:read

Path parameters​

NameTypeDescription
idstringEntity UUID

Response​

200 OK

{
"data": {
"entity": {
"id": "uuid",
"kind": "service",
"namespace": "default",
"name": "my-service",
"owner_ref": "github.com/my-org",
"lifecycle": "production",
"tags": [],
"links": [],
"scm": {},
"spec": {},
"created_at": "2025-01-15T10:00:00.000Z",
"updated_at": "2025-01-15T10:00:00.000Z"
},
"relations": [
{
"id": "rel-uuid",
"from_entity_id": "uuid",
"type": "dependsOn",
"to_entity_id": "other-uuid",
"created_at": "2025-01-15T10:00:00.000Z"
}
],
"sources": [
{
"id": "src-uuid",
"entity_id": "uuid",
"provider": "github",
"owner": "my-org",
"repo": "my-service",
"created_at": "2025-01-15T10:00:00.000Z"
}
]
}
}

Relation types: dependsOn, ownedBy, partOf, providesApi, consumesApi.

Errors​

StatusCondition
404Entity not found
401Not authenticated
403Missing entity:read

Example​

curl -s -b cookies.txt "https://forgeportal.example.com/api/v1/catalog/entities/550e8400-e29b-41d4-a716-446655440000"

Create entity​

POST /api/v1/catalog/entities

Creates a new entity. Relations can be set at creation time.

Auth​

entity:create

Request body​

FieldTypeRequiredDescription
kindstringyesOne of: service, library, website, api, component, resource, system, domain, group, user, template
namespacestringnoDefault default
namestringyes1–255 chars
owner_refstringnoOwner reference (e.g. team or SCM org)
lifecyclestringnoexperimental, production, deprecated
tagsstring[]noArray of tags
linksarrayno[{ "title": string, "url": string (URL) }]
scmobjectno{ owner?, repo? } for SCM identifiers
specobjectnoArbitrary spec key-value
relationsarrayno[{ "type": RelationType, "target_entity_id": "uuid" }]

Response​

201 Created

{
"data": {
"entity": { ... },
"relations": [ ... ],
"sources": [ ... ]
}
}

Errors​

StatusCondition
400Validation failed (invalid kind, name, links, relations)
401Not authenticated
403Missing entity:create

Example​

curl -s -b cookies.txt -X POST "https://forgeportal.example.com/api/v1/catalog/entities" \
-H "Content-Type: application/json" \
-d '{
"kind": "service",
"name": "my-api",
"tags": ["rest"],
"relations": [{ "type": "dependsOn", "target_entity_id": "550e8400-e29b-41d4-a716-446655440000" }]
}'

Update entity​

PUT /api/v1/catalog/entities/:id

Updates an existing entity. Only provided fields are updated. kind, namespace, and name cannot be changed. Requires ownership for non–platform-admin users (when ownership is enforced).

Auth​

entity:update and (when applicable) ownership of the entity.

Path parameters​

NameTypeDescription
idstringEntity UUID

Request body​

Same fields as create, all optional; kind, namespace, name are omitted. Partial updates supported.

Response​

200 OK

{
"data": {
"entity": { ... },
"relations": [ ... ],
"sources": [ ... ]
}
}

Errors​

StatusCondition
400Validation failed
404Entity not found
409Conflict (e.g. duplicate)
401Not authenticated
403Missing entity:update or not owner

Example​

curl -s -b cookies.txt -X PUT "https://forgeportal.example.com/api/v1/catalog/entities/550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-d '{ "lifecycle": "production", "tags": ["api", "v2"] }'

Delete entity​

DELETE /api/v1/catalog/entities/:id

Deletes an entity and its relations/sources.

Auth​

entity:delete

Path parameters​

NameTypeDescription
idstringEntity UUID

Response​

204 No Content β€” no body.

Errors​

StatusCondition
404Entity not found
401Not authenticated
403Missing entity:delete

Example​

curl -s -b cookies.txt -X DELETE "https://forgeportal.example.com/api/v1/catalog/entities/550e8400-e29b-41d4-a716-446655440000"