Loading...
Loading...
Request access to a published API in an API Experience Hub portal by creating a contract between one of your applications and a specific API instance/tier. Use when a portal consumer needs to discover available tiers and grant types, create a contract, review existing contracts, or change an SLA tier on an active contract.
npx skill4agent add mulesoft/mulesoft-dx request-api-accesstargetOrganizationIdportalIdapplicationIdmanage-portal-applicationsgroupIdassetIdminorVersioninstanceIddiscover-portal-apistargetOrganizationIdportalIdgroupIdassetIdminorVersioninstanceIdapi: urn:api:api-experience-hub-consumer
operationId: getTiers
inputs:
targetOrganizationId:
userProvided: true
description: Anypoint organization ID hosting the portal
portalId:
userProvided: true
description: Portal ID the user belongs to
groupId:
userProvided: true
description: Exchange groupId of the target asset
assetId:
userProvided: true
description: Exchange assetId of the target asset
minorVersion:
userProvided: true
description: Minor version the consumer wants access to
instanceId:
userProvided: true
description: API instance ID (environment) to contract against
outputs:
- name: tiers
path: $.tiers[*]
labels: $.tiers[*].name
description: SLA tiers offered on this instance
- name: tierId
path: $.tiers[*].id
description: Tier ID passed to the create-contract callclient_credentialsauthorization_codetargetOrganizationIdportalIdinstanceIdapi: urn:api:api-experience-hub-consumer
operationId: getGrantTypesByInstanceId
inputs:
targetOrganizationId:
from:
variable: targetOrganizationId
description: Anypoint organization ID hosting the portal
portalId:
from:
variable: portalId
description: Portal ID
instanceId:
from:
variable: instanceId
description: API instance ID
outputs:
- name: instanceGrantTypes
path: $.grantTypes[*]
description: Grant types the instance supportstargetOrganizationIdportalIdapplicationIdapi: urn:api:api-experience-hub-consumer
operationId: getGrantTypesByApplicationId
inputs:
targetOrganizationId:
from:
variable: targetOrganizationId
description: Anypoint organization ID hosting the portal
portalId:
from:
variable: portalId
description: Portal ID
applicationId:
userProvided: true
description: ID of the application that will hold the contract
outputs:
- name: applicationGrantTypes
path: $.grantTypes[*]
description: Grant types the application can usetargetOrganizationIdportalIdgroupIdassetIdminorVersionapplicationIdtierIdapi: urn:api:api-experience-hub-consumer
operationId: createContract
inputs:
targetOrganizationId:
from:
variable: targetOrganizationId
description: Anypoint organization ID hosting the portal
portalId:
from:
variable: portalId
description: Portal ID
groupId:
from:
variable: groupId
description: Exchange groupId of the target asset
assetId:
from:
variable: assetId
description: Exchange assetId of the target asset
minorVersion:
from:
variable: minorVersion
description: Minor version for the contract
contractRequest:
userProvided: true
description: Contract payload (application, tier, optional custom fields)
example:
applicationId: a1b2c3d4-0000-0000-0000-000000000000
tierId: 12345
acceptedTerms: true
outputs:
- name: contractId
path: $.id
description: The newly created contract ID (may be PENDING until approved)
- name: contractStatus
path: $.status
description: Current status — typically APPROVED or PENDINGPENDINGAPPROVEDtargetOrganizationIdportalIdapplicationIdapi: urn:api:api-experience-hub-consumer
operationId: getContractsByApplicationId
inputs:
targetOrganizationId:
from:
variable: targetOrganizationId
description: Anypoint organization ID hosting the portal
portalId:
from:
variable: portalId
description: Portal ID
applicationId:
from:
variable: applicationId
description: Application to audit
outputs:
- name: applicationContracts
path: $.contracts[*]
labels: $.contracts[*].assetName
description: Contracts held by this application
- name: contractIds
path: $.contracts[*].id
description: Contract IDs for deeper inspectiontargetOrganizationIdportalIdapplicationIdcontractIdapi: urn:api:api-experience-hub-consumer
operationId: getContract
inputs:
targetOrganizationId:
from:
variable: targetOrganizationId
description: Anypoint organization ID hosting the portal
portalId:
from:
variable: portalId
description: Portal ID
applicationId:
from:
variable: applicationId
description: Application holding the contract
contractId:
from:
variable: contractIds
description: Specific contract ID
outputs:
- name: contractDetails
path: $
description: Full contract details (status, tier, associated asset/instance)targetOrganizationIdportalIdapplicationIdcontractIdtierIdapi: urn:api:api-experience-hub-consumer
operationId: assignSlaTierToContract
inputs:
targetOrganizationId:
from:
variable: targetOrganizationId
description: Anypoint organization ID hosting the portal
portalId:
from:
variable: portalId
description: Portal ID
applicationId:
from:
variable: applicationId
description: Application holding the contract
contractId:
from:
variable: contractIds
description: Contract whose tier is changing
tierId:
from:
variable: tierId
description: New SLA tier ID
outputs:
- name: updatedContractId
path: $.id
description: Contract ID confirmed with the new tier appliedclientIdclientSecretmanage-portal-applications