Retrieving an App by AppId

Retrieving an app returns a single, specific, live app using the Get App API method. This API will return an app that has been approved by the administrator and is most suitable for displaying apps to end users.

It’s important to note that this API method can also return apps that are currently suspended. In any case, the returned app’s “status.value” will indicate the app’s current status.

Results can be returned with additional user-specific data in the app by providing the userId. When the userId is provided, app ownership details are automatically added to the app results; statistics are gathered on usage and app restrictions are enforced. Always supply the userId when an logged-in user requests an app.

An example of retrieving a single app with id “5565322ae4b0a70b13a4563b”:

curl --user {marketplaceId}:{secret} https://market.openchannel.io/v2/apps/5565322ae4b0a70b13a4563b? 
  userId=abc

Retrieving an App by SafeName

Often, it is helpful to retrieve an app using a human readable name that can be used to identify the app. Retrieving an app returns a single, specific, live app using the Get By SafeName API Method. This allows URLs on the marketplace to contain clean, SEO optimized words instead of a string of characters like the appId.

For example, instead of displaying an app’s details from the URL: http://mystore.com/apps/5565322ae4b0a70b13a4563b it is possible to use safeName to display the URL as¬†http://mystore.com/apps/my-app-name.

An example of retrieving a single app with safeName “my-app-name”:

curl --user {marketplaceId}:{secret} https://market.openchannel.io/v2/apps/bySafeName/my-app-name? 
  userId=abc

The app.safeName field is actually an array of URL safe aliases that can be used to identify this app even after name changes. This means that a safeName will still work even after the app’s name has been changed but the most recent name alias is always at position 0.