Docs Menu

Return One Serverless Instance

On this page

  • Required Roles
  • Request
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Example Request
  • Example Response
  • Response Header
  • Response Body
Note

Serverless instances are in a preview release and do not support some Atlas features at this time.

To learn more, see Serverless Instance Limitations.

Returns one serverless instance in the specified project.

Your API Key must have the Project Read Only role to successfully call this resource.

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

GET /groups/{groupId}/serverless/{instanceName}
Name
Type
Necessity
Description
groupId
string
Required
Unique 24-hexadecimal digit string that identifies the project that contains your serverless instance.
instanceName
string
Required
Human-readable label that identifies your serverless instance.

This endpoint might use any of the HTTP request query parameters available to all Atlas Administration API resources. All of these are optional.

Name
Type
Necessity
Description
Default
pretty
boolean
Optional
Flag indicating whether the response body should be in a prettyprint format.
false
envelope
boolean
Optional

Flag indicating if Atlas should wrap the response in a JSON envelope.

This option may be needed for some API clients. These clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query.

For endpoints that return one result, the response body includes:

status
HTTP response code
envelope
Expected response body
false

This endpoint doesn't use HTTP request body parameters.

Name
Type
Description
connectionStrings
object
Set of connection strings that your applications use to connect to this serverless instance. This resource returns this object after the serverless instance finishes deploying, not during the serverless instance deployment.
connectionStrings.standardSrv
string
Public mongodb+srv:// connection string that you can use to connect to this serverless instance.
createDate
string
Timestamp that indicates when MongoDB Cloud created the serverless instance. The timestamp displays in the ISO 8601 date and time format in UTC.
groupId
string
Unique 24-hexadecimal digit string that identifies the project that contains the serverless instance.
id
string
Unique 24-hexadecimal digit string that identifies the serverless instance.
mongoDBVersion
string
Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
name
string
Human-readable label that identifies the serverless instance.
providerSettings
object
Group of settings that configure the provisioned MongoDB database.
providerSettings.backingProviderName
string
Cloud service provider on which MongoDB Cloud provisioned the serverless instance.
providerSettings.providerName
string
Cloud service provider that applies to the provisioned the serverless instance.
providerSettings.regionName
string
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
stateName
string
Stage of deployment of this serverless instance when the resource made its request.
curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \
--header 'Content-Type: application/json' \
--include \
--request GET 'https://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/serverless/{instanceName}?pretty=true'
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
1{
2 "connectionStrings" : {
3 "standardSrv" : "mongodb+srv://instanceName1.example.com"
4 },
5 "createDate" : "2021-06-25T21:31:10Z",
6 "groupId" : "{groupId}",
7 "id" : "{instance1}",
8 "links" : [ {
9 "href" : "http://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/serverless/{instanceName1}",
10 "rel" : "self"
11 }, {
12 "href" : "http://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/serverless/{instanceName1}/backup/restoreJobs",
13 "rel" : "http://cloud.mongodb.com/restoreJobs"
14 }, {
15 "href" : "http://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/serverless/{instanceName1}/backup/snapshots",
16 "rel" : "http://cloud.mongodb.com/snapshots"
17 } ],
18 "mongoDBVersion" : "5.0.0",
19 "name" : "{instanceName1}",
20 "providerSettings" : {
21 "providerName" : "SERVERLESS",
22 "backingProviderName" : "AWS",
23 "regionName" : "US_EAST_1"
24 },
25 "stateName" : "IDLE"
26}
Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.