# discover-portal-apis Discover APIs published in an API Experience Hub portal as a portal consumer. Use when an end user needs to browse the catalog, search assets by keyword or filter, open an API's detail page, read its terms and conditions, or fetch rendered documentation pages and resources. - **APIs:** [api-experience-hub-consumer](https://dev-portal.mulesoft.com/apis/api-experience-hub-consumer.md)- **Skill Source:** [SKILL.md](https://dev-portal.mulesoft.com/skills/discover-portal-apis/SKILL.md) ## Steps ### Step 1: Step 1: List Published Assets in the Portal **API:** `urn:api:api-experience-hub-consumer`**Operation:** `listAssetsCommunityAsset` **Inputs:** - `targetOrganizationId` — Anypoint organization ID hosting the portal - `targetPortalId` — Portal ID the user is browsing **Outputs:** - `assets` (`$.assets[*]`) — Assets published in the portal - `groupId` (`$.assets[*].groupId`) — Exchange groupId of an asset, used by detail-level operations - `assetId` (`$.assets[*].assetId`) — Exchange assetId of an asset - `minorVersion` (`$.assets[*].minorVersion`) — Minor version visible to the consumer ### Step 2: Step 2: Search for Specific Assets **API:** `urn:api:api-experience-hub-consumer`**Operation:** `searchCommunityAssets` **Inputs:** - `targetOrganizationId` — Anypoint organization ID hosting the portal - `targetPortalId` — Portal ID the user is browsing - `searchRequest` — Search criteria (free-text query, categories, tags, paging) **Outputs:** - `matchingAssets` (`$.assets[*]`) — Assets matching the search query ### Step 3: Step 3: Open an Asset's Detail Page **API:** `urn:api:api-experience-hub-consumer`**Operation:** `getAssetDetails` **Inputs:** - `targetOrganizationId` — Anypoint organization ID hosting the portal - `targetPortalId` — Portal ID the user is browsing - `groupId` — Exchange groupId of the asset - `assetId` — Exchange assetId of the asset - `minorVersion` — Minor version to open **Outputs:** - `assetDetails` (`$`) — Full asset metadata, including instances and tiers available to request ### Step 4: Step 4: Read Terms and Conditions **API:** `urn:api:api-experience-hub-consumer`**Operation:** `getTermsAndConditions` **Inputs:** - `targetOrganizationId` — Anypoint organization ID hosting the portal - `targetPortalId` — Portal ID the user is browsing - `groupId` — Exchange groupId of the asset - `assetId` — Exchange assetId of the asset - `minorVersion` — Minor version whose terms to fetch **Outputs:** - `termsContent` (`$.content`) — Markdown/HTML content of the terms and conditions ### Step 5: Step 5: Fetch Documentation Pages **API:** `urn:api:api-experience-hub-consumer`**Operation:** `getAssetPages` **Inputs:** - `targetOrganizationId` — Anypoint organization ID hosting the portal - `targetPortalId` — Portal ID the user is browsing - `groupId` — Exchange groupId of the asset - `assetId` — Exchange assetId of the asset - `minorVersion` — Minor version to fetch pages for - `pagePath` — Optional documentation page path (leave empty to list all pages) **Outputs:** - `pageContent` (`$`) — The requested documentation page (or list of pages) ### Step 6: Step 6: Fetch Asset Resources (Optional) **API:** `urn:api:api-experience-hub-consumer`**Operation:** `getAssetResource` **Inputs:** - `targetOrganizationId` — Anypoint organization ID hosting the portal - `targetPortalId` — Portal ID the user is browsing - `groupId` — Exchange groupId of the asset - `assetId` — Exchange assetId of the asset - `minorVersion` — Minor version to fetch the resource from - `resourceId` — Resource ID obtained from the asset detail response **Outputs:** - `resourceContent` (`$`) — The binary/text resource content