Mongodb API for getting application IDs does not return any value


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>](<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>"}' \

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>](<projectId>/apps?product=atlas)

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