Introduction
This article will explain how to manage your APIv2 apps on the App47 portal.
App47 APIv2 Apps
The Apps end point allows you create, update, list, view, and delete applications in your account. You must have the proper permissions in your account in order to use this end point with your member token.
To use this API you must have the following permissions
Action | Required permission |
---|---|
List apps | At least read permission |
Show app | At least read permission on the specific app |
Edit app | At least edit permission on the specific app |
Create App | Add App permission set to true |
Delete App | Manage permission on the specific app |
For more information on how to configure your APIv2 calls, please consult the APIv2 Overview.
Parameters
When fetching, creating or updating information about apps, the flow parameters are available through the API:
Parameter Name | Input | Output | Type(s) | Description |
---|---|---|---|---|
all_users | Yes | Yes | All | If this app should be available to all users in your account |
apple_external_id | Yes | Yes | Public Apps | The iTunes external ID to use when specifying a public app with a link to the iTunes public app store |
app_screenshots_upload_ids | Yes | No | All but Public apps | An array of Uploaded File Ids for the App's screen shots |
created | No | Yes | All | The timestamp when the app was created |
description | Yes | Yes | All but Public apps | The description of the app, as it will appear in the app store. |
display_order | Yes | Yes | All | The manual display order to list the app in the app store. Lower numbers appear first, if the same number is is found, then by app name |
featured | Yes | Yes | All | If this app should be listed in the featured app section of the app store |
featured_image_upload_file_id | Yes | No | All but Public apps | The Uploaded File Id for the App's featured image |
google_external_id | Yes | Yes | Public Apps | The google external id, e.x. com.evernote, to use when specifying a public app with a link to the Google Play Android store |
group_ids | Yes | Yes | All | The list of groups this app is associated with, to update this list, please see the end points (TBD and TBD) |
icon_url | No | Yes | All | The URL for the icon representing this app in the app store |
id | No | Yes | All | The unique identifier within the system for the application |
image_upload_file_id | Yes | No | All but Public apps | The Uploaded File Id for the app's icon |
name | Yes | Yes | All | The name of the application |
notify_users_on_build_activation | Yes | Yes | Private Apps | Turn notifications of users when builds are activated on or off for this application |
rating | No | Yes | All | The current rating of the app in the app store |
short_description | Yes | Yes | Private Apps | A short description for the app in the app store to appear on the app details page |
tag_ids | Yes | Yes | All | The list of categories (tags) associated with this app. To update this list please see the end points (TBD and TBD) |
test_user_ids | Yes | Yes | All | The list of test users who have access to test builds for this app. This is only required for Android and Windows builds. To update this list, please see the end points (TBD and TBD) |
type | No | Yes | All | The type of app, possible values are private, public, web and b2b |
modified | No | Yes | All | The time stamp when the app was last updated |
uri | Yes | Yes | Web | The URI (or URL) for the HTML5 application defined by this web app |
user_ids | Yes | Yes | All | The list of users who have direct access (not via group) to this app. To update this list, please see the end points (TBD and TBD) |
vendor | Yes | Yes | All but Public apps | The name of the vendor for the application |
version | Yes | Yes | Web | The current version of the web app to show in the app store |
windows_external_url | Yes | Yes | Public Apps | The URL for the app in the windows app store |
List Apps
In order to list applications in your account, you must have at least read access.
End Point
GET https://cirrus.app47.com/api/v2/apps
Example:
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps
Input Parameters
Parameter | Description | Required? | Example(s)/Allowed Values |
---|---|---|---|
type | App type to return | No | Valid values are private, public, web and b2b |
search_term | Search phrase to filter the app list | No | Any text |
skip | The number of records to skip over | No | Integer greater than zero |
Example, to list only private apps:
curl -H"Access-Token: <<your token>>" https://webui.app47.net/api/v2/apps?type=private
Expected Output
If valid, it will return a result with:
-
Success set to true
-
Skip - the number of records that were skipped (The API will return sets of 100 records)
-
Total - The total number of records in your account
-
Count - The total number of records returned in this response
-
List - List of applications you have access to and match the input parameters
-
A md5 hash of the “results” element
-
HTTP result code 200
{ "results": { "skip": 0, "total": 0, "count": 0, "list": [], "success":true }, "md5":"896d94e5e2f4eb6b6bfa19144c7794e5" }
If invalid, it will return a result with:
-
Success set to false
-
A message indicating the error
-
A md5 has of the “results” element
-
HTTP result code that is *not* 200
{ "results": { "message":"Invalid app type (blah)", "success":false }, "md5":"896d94e5e2f4eb6b6bfa19144c7794e5" }
Show a Specific App
Showing a specific app in your account is done by App ID. The App ID can be found on your portal, in the My Apps section, or on the previous call to list all apps.
End Point
GET https://cirrus.app47.com/api/v2/apps/«app_id»
Example:
curl -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<app_id>>
Input Parameters
Parameter | Description | Required? | Example(s)/Allowed Values |
---|---|---|---|
app_id | The ID of the Application | Yes | A valid app id in your account that you have permission to view |
Expected Output
{ "results": { "app": { "id":"544fa14538d6b81f6b00003d", "created":"2014-10-28T13:59:34Z", "modified":"2015-08-03T15:43:35Z", "name":"ABC", "icon_url":"https://s3.amazonaws.com/a47_staging/internal_apps/images/544fa14538d6b81f6b00003d/original.png?1414504775", "description":"", "type":"Private", "vendor":"", "all_users":false, "featured":true, "rating":0.0, "group_ids":[], "user_ids":["554ca979256f5365c600000d","54737b75256f530420000006"], "test_user_ids":[], "tag_ids":[], "notify_users_on_build_activation":true, "short_description":"" }, "success":true }, "md5":"7232f70a2678e2b4ba959fd853488ab1" }
Update an App
Updating a specific app in your account is done by App ID. The App ID can be found on your portal, in the My Apps section, or on the previous call to list all apps. You may only update apps you have at least Edit privileges too.
Parameters that are allowed during update can be found in the table above where the “Input” column contains a “Yes” in the row and the type of app you are updating is listed in “Type(s)” column.
End Point
PUT https://cirrus.app47.com/api/v2/apps/«app_id»
Example:
curl -X PUT -H"Access-Token: <<your token>>" -H"Content-Type: application/json" -d '{"app": { "name": "Updated Name" } }' https://cirrus.app47.com/api/v2/apps/<<app_id>>
Expected Output
{ "results": { "app": { "id":"544fa14538d6b81f6b00003d", "created":"2014-10-28T13:59:34Z", "modified":"2015-10-19T10:44:22Z", "name":"Updated Name", "icon_url":"https://s3.amazonaws.com/a47_staging/internal_apps/images/544fa14538d6b81f6b00003d/original.png?1414504775", "description":"", "type":"Private", "vendor":"", "all_users":false, "featured":true, "rating":0.0, "group_ids":[], "user_ids":["554ca979256f5365c600000d","54737b75256f530420000006"], "test_user_ids":[], "tag_ids":[], "notify_users_on_build_activation":true, "short_description":"" }, "success":true }, "md5":"7232f70a2678e2b4ba959fd853488ab1" }
Updating a Public App
When updating a public app, you must specify at least one (or all) of the following parameters.
-
apple_external_id - The unique identifier for your application in the iTunes app store.
-
google_external_id - The app identifier located in your AndroidManifest.xml and listed in the Google Play App Store.
-
windows_external_url - The url to app on the windows app store.
Example:
curl -X PUT -H"Access-Token: <<your token>>" -H"Content-Type: application/json" -d '{"app": { "name": "Updated Name" } }' https://cirrus.app47.com/api/v2/apps/<<app_id>>
Create an app
You may only create apps if your member has the permission to create new apps in your account.
Parameters that are allowed during creation can be found in the table above where the “Input” column contains a “Yes” in the row and the type of app you are creating is listed in “Type(s)” column.
When creating an app, you must specify the “type”, being one o
End Point
POST https://cirrus.app47.com/api/v2/apps
Example:
curl -X POST -H"Access-Token: <<your token>>" -H"Content-Type: application/json" -d '{"app": { "name": "New Name", "type": "private" } }' https://cirrus.app47.com/api/v2/apps
Expected Output
{ "results": { "app": { "id":"544fa14538d6b81f6b00003d", "created":"2014-10-28T13:59:34Z", "modified":"2015-10-19T10:44:22Z", "name":"New Name", "icon_url":"https://cirrus.app47.com/assets/app.png", "description":"", "type":"Private", "vendor":"", "all_users":false, "featured":true, "rating":0.0, "group_ids":[], "user_ids":[], "test_user_ids":[], "tag_ids":[], "notify_users_on_build_activation":true, "short_description":"" }, "success":true }, "md5":"7232f70a2678e2b4ba959fd853488ab1" }
Creating a Public App
When creating a public app, you must specify at least one (or all) of the following parameters in addition to setting the type=public.
-
apple_external_id - The unique identifier for your application in the iTunes app store.
-
google_external_id - The app identifier located in your AndroidManifest.xml and listed in the Google Play App Store.
-
windows_external_url - The url to app on the windows app store.
Example:
curl -X POST -H"Access-Token: <<your token>>" -H"Content-Type: application/json" -d '{"app": { "google_external_id": "com.evernote", "type": "public" } }' https://cirrus.app47.com/api/v2/apps
Delete an app
You may only delete apps if your member has the Admin permission on the requested app.
End Point
DELETE https://cirrus.app47.com/api/v2/apps/«app_id»
Example:
curl -X DELETE -H"Access-Token: <<your token>>" https://cirrus.app47.com/api/v2/apps/<<app_id>>
Expected Output
{ "results": { "message":"App was deleted", "success":true }, "md5":"f3d0a22e47ce6158551f483e07b16fe1" }
Comments
0 comments
Please sign in to leave a comment.