Navigation

Get All Organizations

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

https://cloud.mongodb.com/api/atlas/v1.0

GET /orgs

This endpoint does not use HTTP request path parameters.

The following query parameters are optional:

NameTypeDescriptionDefault
pageNumintegerPage number (1-based).1
itemsPerPageintegerNumber of items to return per page, up to a maximum of 500.100
includeCountbooleanSpecifies whether the response returns the totalCount field.true
prettybooleanDisplays response in a prettyprint format.false
envelopebooleanSpecifies whether or not to wrap the response in an envelope.false
namestring

Filters results based on the specified organization name. Performs a case-insensitive search for organizations which exactly match the specified name.

Beaker IconExample

If you specify a name query parameter of org1, Atlas returns organizations named org1 and Org1, but would not return an organization named org123.

None

This endpoint does not use HTTP request body parameters.

The response JSON document includes an array of result objects, an array of link objects, and a count of the total number of result objects retrieved.

NameTypeDescription
resultsobject arrayIncludes one object for each item detailed in the results array section.
linksobject arrayIncludes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
totalCountnumberCount of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated.

Each element in the result array is one organization.

NameTypeDescription
idObjectIdUnique identifier for the organization.
isDeletedbooleanFlag indicating if the organization is deleted.
namestringName of the organization.
linksdocument arrayOne or more links to sub-resources and/or related resources. The relation-types between URL s are explained in the Web Linking Specification.
curl --include --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
"https://cloud.mongodb.com/api/atlas/v1.0/orgs?pretty=true"
{
"links" : [
{
"href" : "https://cloud.mongodb.com/api/atlas/v1.0/orgs",
"rel" : "self"
}
],
"results" : [
{
"id" : "5a2add1cfd9f3cfb17053317",
"isDeleted": false,
"links": [{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/orgs/5a2add1cfd9f3cfb17053317",
"rel": "self"
}],
"name" : "Internal Application Support"
},
{
"id" : "5a2add1cfd9f3cfb17053318",
"isDeleted": false,
"links": [{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/orgs/5a2add1cfd9f3cfb17053318",
"rel": "self"
}],
"name" : "Customer Application Support"
},
{
"id" : "5a2add1cfd9f3cfb17053319",
"isDeleted": false
"links": [{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/orgs/5a2add1cfd9f3cfb17053319",
"rel": "self"
}],
"name" : "Research and Development"
}
],
"totalCount" : 3
}
Give Feedback