Docs Menu
Docs Home
/ /
Atlas App Services
/

Get App Metadata

On this page

  • Find Your App ID
  • Find Your Atlas Project ID

Every App has a unique ID. You use App IDs to specify which app you want to use or modify.

You can find your Project ID in the App Services UI or use the Admin API or App Services CLI to find it programmatically.

1

Log into the MongoDB Atlas UI and then click the App Services tab.

Find your App and click on its summary card to open the App.

An overview of all apps associated with an Atlas Project in the UI
2

Click the Copy App ID button next to the name of your App near the top of the left navigation menu.

Note

The UI displays your App name in the top left. When you click the copy button, the UI copies your App ID, not your App's name, into your clipboard. For example, the UI would display the name "exampleApp" but copy the id "exampleApp-wlkgs".

The location of the copy app id button in the UI

To find an App ID, run appservices apps list and find the App you're interested in the list returned by the command.

Each entry in the list shows an App's project ID as well as two App ID values you may want:

  • The Client App ID, which is a unique string that includes the App name. Use this value to connect to your App through the Data API, or a Realm SDK.

  • The _id value, which is an internal ObjectId hex string. Use this value in place of {appId} in Admin API endpoints.

appservices apps list
Found 3 apps
Client App ID Project ID _id
------------------------------- ------------------------ ------------------------
myapp-abcde 5b2ef33692f119212341b213 64343a2b2107b2523e60fb59
myapp-dev-uvxyz 5b2ef33692f119212341b213 6526d3582b032aff90351070
my-other-app-abcde 5b2ef33692f119212341b213 674c19acef214b9ad99a0bbe

To find an App ID, send a request to the List All Apps API endpoint.

The endpoint returns a list of Apps associated with the Atlas project. Find the App you're interested in and copy its App ID.

There are two App ID values you may want:

  • The _id value, which is an internal ObjectId hex string. Use this value in place of {appId} in Admin API endpoints.

  • The client_app_id, which is a unique string that includes the App name. Use this value to connect to your App through the Data API or a Realm SDK.

curl https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
--header 'Authorization: Bearer <access_token>'
[
{
"_id": "63ea9328dddad2523e60fb59",
"client_app_id": "myapp-abcde",
"group_id": "57879f6cc4b32dbe440bb8c5",
"domain_id": "5886619e46124e4c42fb5dd8",
"name": "myapp",
"location": "US-VA",
"deployment_model": "GLOBAL",
"last_used": 1615153544,
"last_modified": 0,
"product": "standard",
"environment": ""
}
]

Tip

Make sure to replace <access_token> and {groupId} with your own values.

Every App is associated with a single Atlas project. You use the project's unique Project ID value, sometimes referred to as a "Group ID", to identify and work with your App programatically.

You can find your Project ID in the Atlas UI or use the Atlas Admin API or Atlas CLI to find it programmatically.

You can find your Project ID in the App Services Admin UI.

1

In the upper left-hand corner of your Atlas Dashboard, you'll see a drop-down menu that contains the Organizations you can access. Select the Organization that contains the Project you'd like to view.

Menu showing a list of available Organizations
2

Click Projects in the left navigation menu to view the list of project in the Organization. Find your project in the list.

The left navigation menu with the project selection highlighted
3

The right side of the project list view contains an Actions column. Click the ellipses (...) icon to expand the Actions menu, and select Copy Project ID.

Expanded ellipses icon showing the Actions menu and the copy

You can list all Atlas projects that you have access to with the Atlas CLI's projects list command.

The command returns a list of projects in JSON format. Find your project in the list and copy its id value.

Tip

The App Services CLI includes Project IDs when you list Apps. If you want to find the Project ID of an existing App, you can run appservices apps list. To learn more, see Find Your App ID.

atlas projects list
{
"links": [
{
"rel": "self",
"href": "https://cloud.mongodb.com/api/atlas/v1.0/groups?pageNum=1\u0026itemsPerPage=100"
}
],
"results": [
{
"id": "5d0171d479328f10cb4f3037",
"orgId": "629e04e11633f764462ea109",
"name": "MyProject",
"clusterCount": 1,
"created": "2019-06-23T05:08:35Z",
"links": [
{
"rel": "self",
"href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5d0171d479328f10cb4f3037"
}
]
}
],
"totalCount": 1
}

You can list the Atlas projects that have access to with the Atlas Admin API's List All Projects endpoint.

The endpoint returns a list of projects in JSON format. Find your project in the list and copy its id value.

curl https://cloud.mongodb.com/api/atlas/v1.0/groups \
--digest -u <Atlas Public API Key>:<Atlas Private API Key>
{
"links": [
{
"rel": "self",
"href": "https://cloud.mongodb.com/api/atlas/v1.0/groups?pageNum=1\u0026itemsPerPage=100"
}
],
"results": [
{
"id": "5d0171d479328f10cb4f3037",
"orgId": "629e04e11633f764462ea109",
"name": "MyProject",
"clusterCount": 1,
"created": "2019-06-23T05:08:35Z",
"links": [
{
"rel": "self",
"href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5d0171d479328f10cb4f3037"
}
]
}
],
"totalCount": 1
}

Back

Create an App

Next

Update an App