Mongodb API for getting application IDs does not return any value

Hi,

I’m trying to get app_id in order to deploy trigger function in terraform (mongodbatlas_event_trigger). Getting app_id in terraform isn’t available right now.
I’m using curl command to check the API calls:

curl --request GET --header "Authrorization: Bearer <TOKEN>" [<URL>](https://realm.mongodb.com/api/admin/v3.0/groups/<project_id>/apps)

as advice here:

Used Token was provided using the following API calls:

curl --request POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{"username": " <Public API Key>", "apiKey": "<Private API Key>"}' \
  https://realm.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login

This URL, however, does not return any value - the response is an empty array.

This is not access issue because I get information with realm cli, using the same private key (realm-cli apps list).

Please help.

I was able to get the right response (thanks to Atlas support).

In order to get Atlas Triggers there is an optional product query parameter we have to pass to the adminListApplications endpoint.

The correct API calls is:

curl --request GET --header "Authrorization: Bearer <TOKEN>" [<URL>](https://realm.mongodb.com/api/admin/v3.0/groups/<projectId>/apps?product=atlas)
2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.