Updating App Endpoints with the API
Use the API to update the service name or description for an app endpoint. To update endpoint visibility use the PUT /v1/subscriptions/{subscriptionLocator}/apps/{appId}
method. See Updating App Attributes with the API for more information.
Considerations for updating app endpoints:
- Only REST endpoints can be updated.
- Endpoint descriptions can be set to an empty value.
- Changing the service name and description of an endpoint does not change the API specification.
- If you replace an app, the service name and description of the source app are honored.
To update app endpoints, you need the following:
- Subscription Locator — The Subscription Locator of the Organization you want to access. To find Subscription Locators for your organizations use the
GET /v1/userinfo
method to return a list of all of the organizations for your OAuth Token with their Subscription Locators. You can use 0 as the Subscription Locator for the organization that owns the OAuth token. - App ID — ID of the app to be accessed, which can be retrieved using the
GET /v1/subscriptions/{subscriptionLocator}/apps
method. - Endpoint ID - ID of the app endpoint you want to update. Call the
GET /v1/subscriptions/{subscriptionLocator}/apps/{appId}/endpoints
method to find the value of theendpointId
field for a specific app. - Service Name - Based on the API specification's
info.title
. Provide an existing or new Service Name. Call theGET /v1/subscriptions/{subscriptionLocator}/apps/{appId}/endpoints
method to find the value of the existingserviceName
field. - Description - Based on the API specification's
info.description
. If thedescription
field is not included in the request, current values in the description field are erased.
- Use the
PUT /v1/subscriptions/{subscriptionLocator}/apps/{appId}/endpoints/{endpointId}
method to update the service name or description of an existing app endpoint and push the changes to the cloud. - Include the attributes you want to change in the model. Attributes include service name and description.
To change only the service name without affecting the description, include the service name attribute and the description attribute set to a value of "string".
{
"description": "string"
}To set the description field to an empty value either exclude it from the request, or include the service name attribute and the description attribute set to a value of "".
{
"description": ""
} - Use the
GET /v1/subscriptions/{subscriptionLocator}/apps/{appId}/endpoints
method to view the endpoint details for the selected app and confirm your changes.
Role Requirements
- Admins can update the endpoint service name and description for any app in their organization.
- Users can update the endpoint service name and description for app they own.
- Read-only users cannot update any endpoints.