API Links

Create or update an API Link

Changed on

Create or update a Link attached to an API

put/organizations/{orgId}/environments/{envId}/apis/{apiHrid}/links

Request

  • Base URL
    https://eu.cloudgate.gravitee.io/apim/automation
  • URL
    https://eu.cloudgate.gravitee.io/apim/automation/organizations/{orgId}/environments/{envId}/apis/{apiHrid}/links
  • Auth
    • HTTP bearer
    • or HTTP basic
    • or HTTP bearer

Path parameters

orgIdstring required
Example:dedd0e0f-b3e9-4d2f-89cd-b2a9de7cb145

organization ID

envIdstring required
Example:a44e0d1b-9fa9-4d64-8b76-3634623a2e27

environment ID

apiHridstring required
Example:my_demo_api

Human-readable ID of api

Query parameters

dryRunboolean
Example:true

For modifying requests, this parameter allow you to test the result of an endpoint without actually persisting the state of the underlying spec.

Request body

hridstring required

A unique human readable id identifying this resource

namestring required

Display name of the link

hrefstring required

The URL this link points to

locationstring

The path in the navigation hierarchy where this link should appear. Resolved against the portal's navigation for a portal-attached link, and against the API's own navigation for an API-attached link — the same path string therefore denotes a different tree depending on which endpoint was used.

orderinteger

Display order relative to siblings at the same location

visibility'PUBLIC' | 'PRIVATE'

Whether the navigation entry is visible to anonymous portal visitors. Optional in the Automation API for backward compatibility with clients that predate this field — when omitted, the entry inherits from its parent (root entries default to PUBLIC). A PUBLIC child under a PRIVATE parent is rejected.

Example request

{
  "hrid": "demo_api",
  "name": "External Docs",
  "href": "https://docs.example.com",
  "location": "/projects/alpha"
}

Response

State of the successfully created/updated Link

hridstring required

A unique human readable id identifying this resource

namestring required

Display name of the link

hrefstring required

The URL this link points to

locationstring

The path in the navigation hierarchy where this link should appear. Resolved against the portal's navigation for a portal-attached link, and against the API's own navigation for an API-attached link — the same path string therefore denotes a different tree depending on which endpoint was used.

orderinteger

Display order relative to siblings at the same location

visibility'PUBLIC' | 'PRIVATE'

Whether the navigation entry is visible to anonymous portal visitors. Optional in the Automation API for backward compatibility with clients that predate this field — when omitted, the entry inherits from its parent (root entries default to PUBLIC). A PUBLIC child under a PRIVATE parent is rejected.

idstring

Resource UUID.

environmentIdstring

The environment ID.

organizationIdstring

The organization ID.

portalHridstring

The HRID of the portal this link belongs to (when attached to a portal).

apiHridstring

The HRID of the API this link belongs to (when attached to an API).

Example response

{
  "hrid": "demo_api",
  "name": "External Docs",
  "href": "https://docs.example.com",
  "location": "/projects/alpha"
}

Changes