Docs Menu

Load Sample Dataset Request into Cluster

On this page

  • Syntax
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response Elements
  • Example Request
  • Example Response
Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

The Atlas Administration 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 Get Started with the Atlas Administration API.

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

POST /groups/{GROUP-ID}/sampleDatasetLoad/{CLUSTER-NAME}
Path Element
Type
Necessity
Description
GROUP-ID
string
Required
Unique 24-hexadecimal digit string that identifies the project containing the cluster.
CLUSTER-NAME
string
Required
Label that identifies the cluster into which you load the sample dataset.

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
clusterName
string
Label that identifies the cluster into which you loaded the sample dataset.
completeDate
string
Timestamp in ISO 8601 date and time format in UTC when the dataset load job completed.
createDate
string
Timestamp in ISO 8601 date and time format in UTC when you created the dataset load job.
errorMessage
string
Description of any issue that arose in loading the data. This endpoint returns null if state has a value other than FAILED.
id
string
Unique 24-hexadecimal string that identifies this sample dataset.
state
string

Condition in which the loading dataset currently exists.

Allowable values include WORKING, COMPLETED, and FAILED

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" \
--digest \
--header "Content-Type: application/json" \
--include \
--request POST "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/sampleDatasetLoad/{CLUSTER-NAME}?pretty=true"
1{
2 "_id": "{SAMPLE-DATASET-ID}",
3 "clusterName": "{CLUSTER-NAME}",
4 "completeDate": null,
5 "createDate": "2021-03-26T16:30:47Z",
6 "errorMessage": null,
7 "state": "WORKING"
8}
Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

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