You can explore the App Center API Service with swagger, and here is the link to the documentation.
How to acquire an API token from App Center and make calls to the App Center API
Navigate to https://appcenter.ms and login with your account information.
On the bottom left corner, click your username and select Account Settings.
In the middle panel, select API Tokens from the menu list.
On the top right corner, click New API token.
In the text field, enter a descriptive name for your token.
Select the type of access for your API token. See below section for more details.
At the bottom of the panel, click Add new API token.
This will generate a pop up with your API token. Copy and store it in a secure location for later use. For security reasons, you will not be able to see or generate the same token again after you click the Close button.
Click the Close button.
Navigate to App Center's swagger page to explore our APIs.
On the upper right corner, click on the Authorize button.
Under the APIToken section, paste the API token value that you just copied into the text field titled Value and click Authorize.
If it shows "Authorized" and a Logout-Button, authorization was successful. On the top right corner of the pop up, click the "X" to exit the pop up.
You are now able to use any App Center API and see the response. Enjoy!
Types of access for API token:
1. Full Access
A full access API token has all the permissions that the associated user has for that app. For example, if the user does not have manager or developer permissions for an app, the user cannot run a test (which requires developer or manager permissions) even though the user is using a full access API token.
2. Read Only
A read only API token has viewer access permissions. For example, with a read only API token, the user can perform actions such as reading data from crashes, analytics, and getting basic app information. Users cannot perform actions such as changing the app settings, triggering a build, creating an export configuration etc.
Running your first API call
This section shows you how to use App Center's swagger page by using the API call GET /v0.1/user
. This API call returns the user's profile data.
Complete steps 1-14 in the first section.
Navigate to App Center's swagger page to explore our APIs.
Under Account, click on
GET /v0.1/user
.On the left-hand corner, click the Try it out button.
Click the Execute button under the Parameters section.
Awesome! You can now see the response under the Responses section.
How to find your app name and owner name
Some of App Center's API and CLI require an app name and owner name as parameters. An example is the API call to remove the user from the app, DELETE /v0.1/apps/{owner_name}/{app_name}/users/{user_email}
.
You can find the app name and owner name from your App Center app URL, or using the App Center CLI.
Here are the steps to do so:
From App Center app URL
Navigate to https://appcenter.ms
Navigate to your app
When you look at your app's URL, it is in the format of https://appcenter.ms/users/{owner-name}/apps/{app-name}.
Owners can be user or org. For example, my personal app has the URL https://appcenter.ms/users/amandachew/apps/DiceOut-01; the {owner-name} is amandachew and my {app-name} is DiceOut-01. An app owned by an org has the URL https://appcenter.ms/orgs/CrystalGeyser/apps/MacOS-app; the {owner-name} is CrystalGeyser and the {app-name} is MacOS-app.
From App Center CLI
Prerequisites
App Center CLI requires Node.js version 8 or higher.
Open your terminal window in Mac or Linux, or command prompt in Windows.
Run
npm install -g appcenter-cli
.Run
appcenter apps list
. You will see a list of apps with the format{owner-name}
/{app-name}
.
Please refer to App Center CLI for the full documentation and list of commands.
For more details, please read the full documentation. Happy coding!