Skip to main content

APIs

Create API metadata​

POST /apis

Code samples


curl -X POST https://localhost:9543/api-portal/api/v0.9/apis \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json' \
-F 'metadata={"name":"Weather API","version":"v1","description":"Weather forecast API","type":"REST","agentVisibility":"VISIBLE", "status":"PUBLISHED","tags":["weather"],"labels":["default"],"endPoints":{ "productionURL":"https://api.example.com/weather", "sandboxURL":"https://sandbox.example.com/weather"},"subscriptionPlans":[{"id":"Gold"}]}'

Creates API metadata from either a full API artifact ZIP, an API metadata YAML file (api.yaml / metadata.yaml / mcp.yaml), or a metadata JSON string. An API definition file is required unless supplied by the artifact ZIP. The YAML spec block accepts: displayName, version, description, type, status, agentVisibility, tags, labels, referenceId, endpoints (sandboxUrl, productionUrl), businessInformation (owners), and subscriptionPlans. The service also stores labels, subscription plan mappings, image metadata, and schema definitions for GraphQL APIs when provided. Via the JSON metadata field, type is required — an omitted type is rejected with 400 (via YAML, an omitted spec.type defaults to REST). MCP servers must be created via POST /api-portal/api/v0.9/mcp-servers instead — a request whose resolved type is MCP is rejected with 400. subscriptionPlans links existing org-level plans to this API by name — it does not create plans. In YAML it is a string array (["Gold", "Silver"]). In the JSON metadata field it is an object array where only id is used ([{"id":"Gold"}]); extra fields such as planId, displayName, or requestCount are ignored.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api:create`, `dp:api:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyobjecttrueAPI metadata upload. Send either artifact, or metadata with definition. For a GraphQL API the definition field carries the SDL schema. (MCP servers are created via /mcp-servers with the dedicated McpServerMultipartBody, not this body.)
» definitionbodystring(binary)falseAPI definition file. For REST/SOAP/etc. this is the OpenAPI/WSDL/AsyncAPI contract; for a GraphQL API it is the SDL schema.
» artifactbodystring(binary)falseFull API ZIP artifact containing metadata and definition files.
» metadatabodystringfalseAPI metadata. Supply it in either of two forms:

Detailed descriptions​

» metadata: API metadata. Supply it in either of two forms:

  • A JSON string field.
  • An uploaded YAML or JSON file — a Kubernetes-style document with kind, metadata.name, and a spec block. Accepted file names are metadata.yaml, .yml, .json, api.yaml, or mcp.yaml.

As a JSON string, these top-level fields are read: name, version, description, type, agentVisibility, status, referenceId, id, tags, labels, owners, endPoints (productionURL, sandboxURL), and subscriptionPlans.

subscriptionPlans is an array of { id } objects. Only id is read, and the plan must already exist in the organization.

The stored handle comes from id. When the API is created from a YAML artifact instead, the handle always comes from metadata.name.

Example responses

201 Response

{
"id": "weather-api-v1",
"refId": "cp-api-12345",
"name": "Weather API",
"title": "Weather Forecast API",
"version": "v1",
"status": "PUBLISHED",
"description": "Weather forecast API.",
"type": "REST",
"agentVisibility": "VISIBLE",
"tags": [
"weather"
],
"labels": [
"default"
],
"endPoints": {
"productionURL": "https://api.example.com/weather",
"sandboxURL": "https://sandbox.example.com/weather"
},
"subscriptionPlans": [
{
"id": "Gold"
}
]
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
201CreatedCreated API metadata payload returned by the service.ApiMetadataCreateResponse
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Response Headers​

StatusHeaderTypeFormatDescription
201LocationstringuriURL of the created API metadata resource.

List API metadata​

GET /apis

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/apis \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Lists API metadata for an organization. The service supports exact filters by API name, version, and tags, free-text search with query, and view filtering. Unknown query parameters are rejected. MCP-typed records are never returned here — use GET /api-portal/api/v0.9/mcp-servers.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api:read`, `dp:api:manage`

Parameters​

NameInTypeRequiredDescription
queryquerystringfalseFree-text API metadata search term.
namequerystringfalseExact API name filter.
versionquerystringfalseExact API version filter.
tagsquerystringfalseComma-separated tag names. Matches APIs tagged with any of the given names.
viewquerystringfalseAPI Portal view name used to filter visible APIs.
limitqueryintegerfalseMaximum number of records to return.
offsetqueryintegerfalseNumber of records to skip before returning results.

Example responses

200 Response

{
"list": [
{
"id": "weather-api-v1",
"refId": "cp-api-12345",
"name": "Weather API",
"version": "v1",
"status": "PUBLISHED",
"description": "Weather forecast API.",
"type": "REST",
"agentVisibility": "VISIBLE",
"labels": [
"default"
],
"endPoints": {
"sandboxURL": "https://sandbox.example.com/weather",
"productionURL": "https://api.example.com/weather"
}
}
],
"count": 1,
"pagination": {
"total": 1,
"limit": 20,
"offset": 0
}
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKList of API metadata DTOs.Inline
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
» list[allOf]falsenonenone

allOf

NameTypeRequiredRestrictionsDescription
»» anonymousApiInfoResponsefalsenoneFields are returned at the root of ApiMetadataResponse / ApiMetadataCreateResponse (not nested under an apiInfo key) — this schema exists only to share the field set between the two via allOf.
»»» namestringfalsenonenone
»»» titlestring¦nullfalsenonenone
»»» remotes[object]falsenonenone
»»» versionstringfalsenonenone
»»» statusstringfalsenoneAPI lifecycle status.
»»» descriptionstringfalsenonenone
»»» typestringfalsenoneThe stored/returned type constant (src/utils/constants.js API_TYPE) — distinct from the request-time keyword accepted on create/update (see type in ApiMetadataMultipartBody: REST, SOAP, MCP, WS, WEBSUB, GRAPHQL). REST maps to RestApi and WEBSUB maps to WebSubApi; the rest are returned unchanged.
»»» referenceIdstring¦nullfalsenoneExternal reference ID. Present when the API was created from a YAML artifact whose spec block sets referenceId — the create response echoes the parsed YAML back.
»»» agentVisibilitystringfalsenonenone
»»» addedLabels[string]falsenonenone
»»» removedLabels[string]falsenonenone
»»» ownersApiOwnersResponsefalsenonenone
»»»» technicalOwnerstringfalsenonenone
»»»» businessOwnerstringfalsenonenone
»»»» businessOwnerEmailstringfalsenonenone
»»»» technicalOwnerEmailstringfalsenonenone
»»» apiImageMetadataApiImageMetadataResponsefalsenonenone
»»»» additionalPropertiesstringfalsenonenone
»»» tags[string]falsenonenone
»»» labels[string]falsenonenone

and

NameTypeRequiredRestrictionsDescription
»» anonymousobjectfalsenonenone
»»» idstringfalsenoneThe API's handle (unique per org). Not the internal database uuid.
»»» refIdstring¦nullfalsenonePlatform API (Control Plane) reference ID for this API. Used for MCP registry visibility filtering and included in outbound webhook event payloads. Null/absent for APIs that exist only in the API Portal and are not registered with the Platform API — e.g. MCP servers published via the registry.
»»» dataSourcestring¦nullfalsenoneIndicates which content matched the search term: METADATA if the match was in the API's own metadata, or a content type (e.g. a value from the API Content type field) if the match was inside an uploaded content file. Only computed by getAllApiMetadataForOrganization when both the query search parameter is supplied and the database is PostgreSQL — absent on SQLite (the dev default) and absent from every other operation (get/create/update single API).
»»» planIdstringfalsenonenone
»»» endPointsApiEndpointsResponsefalsenonenone
»»»» sandboxURLstringfalsenonenone
»»»» productionURLstringfalsenonenone
»»» subscriptionPlans[SubscriptionPlanResponse]falsenonenone
»»»» idstringfalsenoneThe plan's handle (unique per org). Not the internal database uuid.
»»»» displayNamestringfalsenonenone
»»»» descriptionstringfalsenonenone
»»»» limits[object]falsenoneRate/quota limits enforced for this plan. Empty when the plan is unlimited.
»»»»» limitTypestringfalsenonenone
»»»»» limitCountanyfalsenoneReturned as a string when the stored count exceeds the safe integer range, otherwise a number. Unlimited plans have no limit entries — the limits array is empty.

oneOf

NameTypeRequiredRestrictionsDescription
»»»»»» anonymousintegerfalsenonenone

xor

NameTypeRequiredRestrictionsDescription
»»»»»» anonymousstringfalsenonenone

continued

NameTypeRequiredRestrictionsDescription
»»»»» timeUnitstring¦nullfalsenonenone
»»»»» timeAmountintegerfalsenonenone
»»»» refIdstring¦nullfalsenonePlatform API subscription plan UUID associated with this plan.
»»»» orgIdstringfalsenonenone
»»»» createdBystringfalsenoneIdentity of the user who created this subscription plan, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses and list items.
»»»» updatedBystringfalsenoneIdentity of the user who last updated this subscription plan, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses only, omitted on list items.
»»»» createdAtstring(date-time)falsenonenone
»»»» updatedAtstring(date-time)falsenonenone
»»» createdBystringfalsenoneIdentity of the user who created this API, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses and list items.
»»» updatedBystringfalsenoneIdentity of the user who last updated this API, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses only, omitted on list items.
»»» createdAtstring(date-time)falsenonenone
»»» updatedAtstring(date-time)falsenonenone
» countintegerfalsenoneNumber of items returned in this page.
» paginationPaginationfalsenoneStandard pagination metadata returned with collection responses.
»» totalintegertruenoneTotal number of records matching the query.
»» limitintegertruenoneMaximum number of records returned in this response.
»» offsetintegertruenoneNumber of records skipped before this page.

Enumerated Values​

PropertyValue
statusPUBLISHED
statusDEPRECATED
typeRestApi
typeSOAP
typeMcp
typeWS
typeWebSubApi
typeGRAPHQL
agentVisibilityVISIBLE
agentVisibilityHIDDEN
limitTypeREQUEST_COUNT
limitTypeEVENT_COUNT
limitTypeBANDWIDTH
limitTypeTOTAL_TOKEN_COUNT
timeUnitMINUTE
timeUnitHOUR
timeUnitDAY
timeUnitMONTH
timeUnitnull

Enumerated Values​

PropertyValue
statuserror

Get API metadata​

GET /apis/{apiId}

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/apis/{apiId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves a single API metadata record by API ID.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api:read`, `dp:api:manage`

Parameters​

NameInTypeRequiredDescription
apiIdpathstringtrueThe API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers.

Example responses

200 Response

{
"id": "weather-api-v1",
"refId": "cp-api-12345",
"name": "Weather API",
"title": "Weather Forecast API",
"remotes": [],
"version": "v1",
"status": "PUBLISHED",
"description": "Weather forecast API.",
"type": "REST",
"agentVisibility": "VISIBLE",
"labels": [
"default"
],
"endPoints": {
"sandboxURL": "https://sandbox.example.com/weather",
"productionURL": "https://api.example.com/weather"
},
"subscriptionPlans": [
{
"id": "Gold"
}
],
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2026-05-07T08:30:00Z",
"updatedAt": "2026-05-07T08:30:00Z"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

"string"

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKAPI metadata DTO returned by the service.ApiMetadataResponse
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundPlain text success response.string
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Update API metadata​

PUT /apis/{apiId}

Code samples


curl -X PUT https://localhost:9543/api-portal/api/v0.9/apis/{apiId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json' \
-F 'metadata={"name":"Weather API","version":"v1","description":"Weather forecast API","type":"REST","agentVisibility":"VISIBLE", "status":"PUBLISHED","tags":["weather"],"labels":["default"],"endPoints":{ "productionURL":"https://api.example.com/weather", "sandboxURL":"https://sandbox.example.com/weather"},"subscriptionPlans":[{"id":"Gold"}]}'

Updates API metadata and its stored definition. Accepts the same YAML spec fields and metadata JSON format as the create operation. The update flow can also adjust label mappings, subscription plan mappings, schema definitions, and image metadata. Status changes to unpublished are rejected when active subscriptions exist. type is required (see the create operation) and is immutable — it must match the API's existing type; a different value is rejected with 409.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api:update`, `dp:api:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyobjecttrueAPI metadata upload. Send either artifact, or metadata with definition. For a GraphQL API the definition field carries the SDL schema. (MCP servers are created via /mcp-servers with the dedicated McpServerMultipartBody, not this body.)
» definitionbodystring(binary)falseAPI definition file. For REST/SOAP/etc. this is the OpenAPI/WSDL/AsyncAPI contract; for a GraphQL API it is the SDL schema.
» artifactbodystring(binary)falseFull API ZIP artifact containing metadata and definition files.
» metadatabodystringfalseAPI metadata. Supply it in either of two forms:
apiIdpathstringtrueThe API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers.

Detailed descriptions​

» metadata: API metadata. Supply it in either of two forms:

  • A JSON string field.
  • An uploaded YAML or JSON file — a Kubernetes-style document with kind, metadata.name, and a spec block. Accepted file names are metadata.yaml, .yml, .json, api.yaml, or mcp.yaml.

As a JSON string, these top-level fields are read: name, version, description, type, agentVisibility, status, referenceId, id, tags, labels, owners, endPoints (productionURL, sandboxURL), and subscriptionPlans.

subscriptionPlans is an array of { id } objects. Only id is read, and the plan must already exist in the organization.

The stored handle comes from id. When the API is created from a YAML artifact instead, the handle always comes from metadata.name.

Example responses

200 Response

{
"id": "weather-api-v1",
"refId": "cp-api-12345",
"name": "Weather API",
"title": "Weather Forecast API",
"remotes": [],
"version": "v1",
"status": "PUBLISHED",
"description": "Weather forecast API.",
"type": "REST",
"agentVisibility": "VISIBLE",
"labels": [
"default"
],
"endPoints": {
"sandboxURL": "https://sandbox.example.com/weather",
"productionURL": "https://api.example.com/weather"
},
"subscriptionPlans": [
{
"id": "Gold"
}
],
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2026-05-07T08:30:00Z",
"updatedAt": "2026-05-07T08:30:00Z"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKAPI metadata DTO returned by the service.ApiMetadataResponse
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Delete API metadata​

DELETE /apis/{apiId}

Code samples


curl -X DELETE https://localhost:9543/api-portal/api/v0.9/apis/{apiId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: text/plain'

Deletes API metadata when the API has no active subscriptions.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api:delete`, `dp:api:manage`

Parameters​

NameInTypeRequiredDescription
apiIdpathstringtrueThe API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers.

Example responses

200 Response

"string"

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKPlain text success response.string
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Was this page helpful?