Add Consumer Endpoint for an API Instance using API Manager REST API.
This is useful when API Instances are generated using REST APIs for CI/CD. The Consumer Endpoint field option is available only after creating the API Instance.
Refer the article "How to Retrieve the Id of the Policies Applied to an API Instance" and follow the steps until Step 4 "Retrieve the API ID"
Step 5: Add the Consumer Endpointcurl -X PATCH \
-H "Authorization: Bearer <AUTH_TOKEN>" \
-H 'content-type: application/json' \
"https://anypoint.mulesoft.com/apimanager/api/v1/organizations/<Organization_ID>/environments/<Environment_ID>/apis/<API_ID>" \
-d '{"endpointUri":"<ENDPOINT_INCL_PROTOCOL>"}'
Example for <ENDPOINT_INCL_PROTOCOL> is http://www.xxx.com.au{
"audit": {
"created": {},
"updated": {
"date": "2020-10-21T02:38:32.502Z"
}
},
"endpoint": {
"apiGatewayVersion": "4.3.0",
"apiId": 16421437,
"audit": {
"created": {
"date": "2020-10-14T22:59:26.313Z"
},
"updated": {
"date": "2020-10-14T23:08:18.965Z"
}
},
"deploymentType": "CH",
"id": 1120997,
"isCloudHub": null,
"lastActiveDate": null,
"masterOrganizationId": "ddd-b32f-4c34-b757-dddd",
"muleVersion4OrAbove": true,
"organizationId": "dd-b32f-4c34-b757-ddd",
"policiesVersion": null,
"proxyRegistrationUri": null,
"proxyUri": null,
"referencesUserDomain": null,
"responseTimeout": null,
"type": "raml",
"uri": "http://apitestproject.cloudhub.io",
"wsdlConfig": null
},
"endpointUri": "http://www.xxx.com.au",
"environmentId": "yyy-2df0-42c0-acb3-yyy",
"id": 16421437,
"masterOrganizationId": "ddd-b32f-4c34-b757-dddd",
"organizationId": "ddd-b32f-4c34-b757-dddd"
}
001115948

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.