Stitch Administration API¶
On this page
- API Authentication
- Project & Application IDs
- Example
- Resources
- Base URL
- Stitch Administrator APIs
- API Key APIs
- Secrets APIs
- Application-level APIs
- Auth Provider APIs
- Email APIs
- Functions APIs
- Logging APIs
- Notifications APIs
- Rules APIs
- Security APIs
- Services APIs
- Users APIs
- Values APIs
- Incoming Webhook APIs
- Event Trigger APIs
- Static File Hosting APIs
- Application Deployment APIs
- Dependency APIs
MongoDB Stitch provides an API for programmatically performing administrative tasks outside of the Stitch UI. This includes tasks such as modifying authentication providers, creating rules, and defining functions. The admin API is not for Stitch client applications: tasks like authenticating users, calling functions, and interacting with services should be done using the client SDK for production client uses.
API Authentication¶
Every request to the Stitch Admin API must include a valid and current
authorization token from the MongoDB Cloud API as a bearer token in the
Authorization
header. You will need a valid programmatic API
key for MongoDB Atlas to
get a token.
Once you have an API key pair, call the authentication endpoint:
If authentication succeeds, MongoDB Stitch returns an access token as part of the JSON response document:
The access_token
represents a limited-time authorization to interact
with the Admin API. To authenticate a request, include the token in a
Bearer token Authorization
header.
Project & Application IDs¶
Note
The terms Project ID and Group ID are interchangeable.
MongoDB Stitch APIs frequently require two parameters: your Atlas Project/Group ID, and your MongoDB Stitch Application ID.
Project ID¶
To find your Project ID, go to your Atlas administration console, click Settings in the left-hand navigation bar, and look under the Project ID heading.
Application ID¶
To find your Application ID, make a request to the Stitch GET /groups/{groupId}/apps API endpoint.
This request has the following format, referencing the access_token
described in API Authentication:
This will return a list of objects describing each Stitch
application in the provided group. The _id
field contains the
Application ID.
Example¶
Pagination with the Logging API¶
The Logging endpoint returns up to 100 log entries per page. If the
query matches more than 100 entries, the result will be paginated.
Such a result will contain two pieces of information that you will need to request
the next page of entries for the same query: the nextEndDate
and nextSkip
fields.
Paginated results always contain the nextEndDate
field. A paginated
result will also contain the nextSkip
field if the timestamp of the
first entry on the next page is identical to the timestamp of the last
entry on the current page.
To request the first page of up to 100 log entries, use the endpoint as usual:
To request the next page of up to 100 log entries, pass the values of nextEndDate
and nextSkip
as the end_date
and skip
parameters, respectively:
Repeat this step to get more pages until the response does not have a nextEndDate
field.
This signifies that you have reached the last page.
For more information, see GET /groups/{groupId}/apps/{appId}/logs.
Draft and Deploy a Group of Changes¶
You can deploy a group of application changes together by creating and deploying a draft. To create and deploy a set of draft changes:
Create a New Draft¶
A draft represents a group of application changes that you can deploy
or discard as a single unit. To create a draft, send a POST
request to the drafts endpoint:
One Draft Per User
Each user can only create a single draft at a time, either through
the UI or the Admin API. If you already have an existing draft, you
can discard the changes associated with it by sending a DELETE
request to the draft’s endpoint:
Make Changes to Your Application¶
Once you’ve created a draft, make all of the changes that you want to include in the draft. Stitch adds any application changes that you make to the draft so that you can deploy them together.
Deploy the Draft¶
After you’ve made all the changes that you want to include in the
deployment, deploy the draft by sending a POST
request to that
draft’s deployment endpoint:
Resources¶
- Base URL
- Stitch Administrator APIs
- API Key APIs
- Secrets APIs
- Application-level APIs
- Auth Provider APIs
- Email APIs
- Functions APIs
- Logging APIs
- Notifications APIs
- Rules APIs
- Security APIs
- Services APIs
- Users APIs
- Values APIs
- Incoming Webhook APIs
- Event Trigger APIs
- Static File Hosting APIs
- Application Deployment APIs
- Dependency APIs
Base URL¶
The root API resource and starting point for the MongoDB Stitch API.
Stitch Administrator APIs¶
Enumerate available Stitch administration authentication providers.
Responses
200
: Successfully enumerated available authentication providers.
Field | Type | Description |
---|---|---|
[] |
array of objects | An array of authentication providers. |
[]._id |
string | |
[].name |
string | |
[].type |
string | Possible Values:
|
[].disabled |
boolean |
Authenticate as a Stitch administrator. Use GET /auth/providers to list the available authentication providers.
Path Parameters
Name | Type | Description |
---|---|---|
provider
|
string | The authentication provider to use. Possible Values:
|
Request Body
Field | Type | Description |
---|---|---|
username |
string | |
apiKey |
string |
Responses
200
: Authentication was successful.
Field | Type | Description |
---|---|---|
access_token |
string | An access token you may provide in the
Authorization header of API requests.
API Authentication demonstrates how to
use this token. |
refresh_token |
string | A refresh token you may provide in the Authorization
header of POST /auth/session to obtain a new
access_token for the current user session. |
user_id |
string | The unique _id value of the MongoDB Cloud user. |
device_id |
string |
Get information about the currently logged in user.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The profile was successfully retrieved.
Field | Type | Description |
---|---|---|
user_id |
string | |
domain_id |
string | |
identities |
array | |
identities.[]._id |
string | |
identities.[].name |
string | |
identities.[].type |
string | Possible Values:
|
identities.[].disabled |
boolean | |
data |
object | |
data.email |
string | |
data.name |
string | |
type |
string | Possible Values:
|
roles |
array | |
roles.[].role_name |
string | |
roles.[].group_id |
string | An Atlas Project/Group ID. |
Delete a Stitch access token.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Obtain a Stitch access token.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the refresh_token field of
the POST /auth/providers/{provider}/login API endpoint. |
Responses
201
: Successfully created.
Field | Type | Description |
---|---|---|
access_token |
string |
Get information about the underlying Atlas mongod.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
An empty object.
Responses
200
: The build information was successfully retrieved.
Field | Type | Description |
---|---|---|
version |
string | Human-readable version information about the mongod
instance. This string will take the format
<major>.<minor>.<patch> . |
gitVersion |
string | The commit identifier that identifies the state of the code use to build the mongod. |
versionArray |
array | An array that conveys version information about the mongod instance. See version for a more readable version of this string. |
javascriptEngine |
string | A string that reports the JavaScript engine used in the
mongod instance. By default, this is mozjs after version
3.2 , and previously V8 . |
bits |
string | A number that reflects the target processor architecture of the mongod binary. |
debug |
boolean | A boolean that reflects whether or not the mongod
instance was built with debugging options. |
maxBsonObjectSize |
integer | A number that reports the Maximum BSON Document Size |
API Key APIs¶
List API keys associated with a Stitch application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The API keys were successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string | |
[].disabled |
boolean |
Create a new API key.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The API key to create.
Field | Type | Description |
---|---|---|
name |
string |
Responses
201
: The API key was successfully created.
Field | Type | Description |
---|---|---|
_id |
string | |
key |
string | |
name |
string | |
disabled |
string |
Retrieve information about an API key.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
apiKeyId
|
string | API Key ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The API key was successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string | |
disabled |
string |
Delete an API key.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
apiKeyId
|
string | API Key ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The API key was successfully deleted.
Enable an API key.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
apiKeyId
|
string | API Key ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The API key was successfully enabled.
Disable an API key.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
apiKeyId
|
string | API Key ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The API key was successfully disabled.
Secrets APIs¶
List Secrets associated with a Stitch application.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The Secrets were successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string |
Create a new Secret.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The Secret to create.
Field | Type | Description |
---|---|---|
name |
string | |
value |
string |
Responses
201
: The Secret was successfully created.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string |
Modify a Secret associated with a Stitch application.
Path Parameters
Name | Type | Description |
---|---|---|
secretId
|
string | Secret ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The modified value of the Secret.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string | |
value |
string |
Responses
200
: The Secret was successfully modified.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string | |
[].value |
string |
Application-level APIs¶
List all Stitch applications within an Atlas project/group.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
Query Parameters
Name | Type | Description |
---|---|---|
product
|
string | The MongoDB product for which applications should be listed. Valid values:
|
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | The application’s unique internal ID. |
[].client_app_id |
string | The application’s public App ID. |
[].name |
string | The name of the application. |
[].location |
string | The application’s deployment region. |
[].deployment_model |
string | The application’s deployment model. |
[].domain_id |
string | |
[].group_id |
string | An Atlas Project/Group ID. |
Create a new Stitch application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
Query Parameters
Name | Type | Description |
---|---|---|
defaults
|
boolean | Whether or not to create a default application. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The application to create.
Field | Type | Description |
---|---|---|
name |
string |
Responses
201
: The application was successfully created.
Retrieve an application definition.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The application was successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | The application’s unique internal ID. |
client_app_id |
string | The application’s public App ID. |
name |
string | The name of the application. |
location |
string | The application’s deployment region. |
deployment_model |
string | The application’s deployment model. |
domain_id |
string | |
group_id |
string | An Atlas Project/Group ID. |
Delete an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The application was successfully deleted.
Export an application as a zip file.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The application was successfully exported.
Auth Provider APIs¶
List authentication providers within a Stitch application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string | |
[].type |
string | Possible Values:
|
[].disabled |
boolean |
Create an authentication provider.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
Field | Type | Description |
---|---|---|
name |
string | |
type |
string | Possible Values:
|
disabled |
boolean | |
config |
object |
Responses
201
: Successfully created.
Retrieve information about one of an application’s authentication providers
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
providerId
|
string | Provider ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string | |
type |
string | Possible Values:
|
disabled |
boolean | |
config |
object |
Delete an authentication provider.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
providerId
|
string | Provider ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Update an authentication provider.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
providerId
|
string | Provider ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string | |
type |
string | Possible Values:
|
disabled |
boolean | |
config |
object |
Responses
204
: Successfully updated.
Disable an authentication provider.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
providerId
|
string | Provider ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully disabled.
Enable an authentication provider.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
providerId
|
string | Provider ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully enabled.
Email APIs¶
Send a confirmation email.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
email
|
string | Email address |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully sent.
Confirm a pending user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
email
|
string | Email address |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully confirmed.
Re-runs a pending user’s confirmation workflow.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
email
|
string | Email address |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
202
: Successfully re-ran confirmation workflow.
400
: User is already confirmed or Email/Password authentication is not enabled.
404
: User does not exist.
Functions APIs¶
Execute a function for testing.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
201
: Successfully executed.
Execute a function’s source code for testing.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Query Parameters
Name | Type | Description |
---|---|---|
user_id
|
string | The user as which to execute the function. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The source to execute.
Field | Type | Description |
---|---|---|
eval_source |
string | |
source |
string |
Responses
200
: Successfully executed.
Field | Type | Description |
---|---|---|
error |
object | |
logs |
any | |
result |
object | |
stats |
object |
List functions.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string |
Create a new function.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The function to create
Field | Type | Description |
---|---|---|
can_evaluate |
object | A JSON expression that evaluates to true if the Function
is allowed to run in response to an incoming request. |
name |
string | A unique name for the Function. |
private |
boolean | If true , the function is hidden from client
applications. You can still call a private function from
JSON expressions and other functions, including incoming
webhooks and triggers. |
source |
string | The stringified source code for the function. The code must be valid ES6. |
Responses
201
: The function was successfully created.
Field | Type | Description |
---|---|---|
can_evaluate |
object | A JSON expression that evaluates to true if the Function
is allowed to run in response to an incoming request. |
name |
string | A unique name for the Function. |
private |
boolean | If true , the function is hidden from client
applications. You can still call a private function from
JSON expressions and other functions, including incoming
webhooks and triggers. |
source |
string | The stringified source code for the function. The code must be valid ES6. |
Retrieve a function.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
functionId
|
string | Function ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The function was successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | |
can_evaluate |
object | A JSON expression that evaluates to true if the Function
is allowed to run in response to an incoming request. |
name |
string | A unique name for the Function. |
private |
boolean | If true , the function is hidden from client
applications. You can still call a private function from
JSON expressions and other functions, including incoming
webhooks and triggers. |
source |
string | The stringified source code for the function. The code must be valid ES6. |
Delete a function.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
functionId
|
string | Function ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The function was successfully deleted.
Update a function.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
functionId
|
string | Function ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The function was successfully updated.
Field | Type | Description |
---|---|---|
can_evaluate |
object | A JSON expression that evaluates to true if the Function
is allowed to run in response to an incoming request. |
name |
string | A unique name for the Function. |
private |
boolean | If true , the function is hidden from client
applications. You can still call a private function from
JSON expressions and other functions, including incoming
webhooks and triggers. |
source |
string | The stringified source code for the function. The code must be valid ES6. |
Logging APIs¶
Retrieve Stitch logs.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Query Parameters
Name | Type | Description |
---|---|---|
co_id
|
string | Return only log messages associated with the given request ID. |
errors_only
|
boolean | Whether to only return errors. |
user_id
|
string | Return only log messages associated with the given user_id . |
start_date
|
string | The date and time in ISO 8601 at which to begin returning results, exclusive. |
end_date
|
string | The date and time in ISO 8601 at which to cease returning results, inclusive. |
skip
|
integer | The offset number of matching log entries to skip before including them in the response. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Field | Type | Description |
---|---|---|
logs |
array | |
logs.[]._id |
string | |
logs.[].co_id |
string | |
logs.[].domain_id |
string | |
logs.[].app_id |
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
logs.[].group_id |
string | An Atlas Project/Group ID. |
logs.[].request_url |
string | |
logs.[].request_method |
string | |
logs.[].started |
string | |
logs.[].completed |
string | |
logs.[].error |
string | |
logs.[].error_code |
string | |
logs.[].status |
integer | |
nextEndDate |
string | The end date and time of the next page of log entries in ISO 8601 format. Stitch paginates the result sets of queries that match more than 100 log entries and includes this field in paginated responses. To get the next page of up to 100 entries, pass this value as the end_date parameter in a subsequent request. |
nextSkip |
integer | The offset into the next page of log entries in ISO 8601 format. Stitch paginates the result sets of queries that match more than 100 log entries and includes this field in paginated responses where the first entry on the next page has the same timestamp as the last entry on this page. To get the next page of up to 100 entries, pass this value, if it is present, as the skip parameter in a subsequent request. |
Notifications APIs¶
List push notifications.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Query Parameters
Name | Type | Description |
---|---|---|
state
|
string | Only list notifications with the given state. Possible Values:
|
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].appID |
string | |
[].label |
string | |
[].message |
string | |
[].topic |
string | |
[].created |
string | |
[].sent |
string | |
[].state |
string | Possible Values:
|
Create a push notification.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The notification to create.
Field | Type | Description |
---|---|---|
label |
string | |
message |
string | |
topic |
string | |
state |
string | Possible Values:
|
Responses
201
: Successfully created.
Retrieve a push notification message.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
messageId
|
string | Message ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | |
appID |
string | |
label |
string | |
message |
string | |
topic |
string | |
created |
string | |
sent |
string | |
state |
string | Possible Values:
|
Delete a push notification message.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
messageId
|
string | Message ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Update a push notification message.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
messageId
|
string | Message ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully updated.
Field | Type | Description |
---|---|---|
_id |
string | |
appID |
string | |
label |
string | |
message |
string | |
topic |
string | |
created |
string | |
sent |
string | |
state |
string | Possible Values:
|
Set a push notification’s type.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
messageId
|
string | Message ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully set.
Send a push notification.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
messageId
|
string | Message ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully sent.
Rules APIs¶
List rules.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[].name |
string | |
[].actions |
array | |
[].when |
object |
Create a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The rule to create.
Field | Type | Description |
---|---|---|
name |
string | |
actions |
array | |
when |
object |
Responses
201
: Successfully created.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string |
409
: There is already a rule with the given name
.
Retrieve a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
ruleId
|
string | Rule ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Field | Type | Description |
---|---|---|
name |
string | |
actions |
array | |
when |
object |
Delete a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
ruleId
|
string | Rule ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Update a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
ruleId
|
string | Rule ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The new state of the rule.
Field | Type | Description |
---|---|---|
name |
string | |
actions |
array | |
when |
object |
Responses
200
: Successfully updated.
Security APIs¶
List the allowed HTTP origins from which Stitch should allow requests.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of strings |
Set the allowed HTTP origins from which Stitch should allow requests.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
A list of HTTP origins.
Field | Type | Description |
---|---|---|
[] |
array of strings |
Responses
204
: The allowed HTTP origins were successfully set.
Services APIs¶
List all services within an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed services.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string | |
[].type |
string | |
[].version |
integer |
Create a service.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
201
: Successfully created the service.
Field | Type | Description |
---|---|---|
name |
string | |
type |
string | |
config |
object |
409
: There is already a service with the given name
.
Retrieve a service.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The service was successfully deleted.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string | |
type |
string | |
version |
integer |
Delete a service.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The service was successfully deleted.
Update a service.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully updated.
Run a command associated with a service.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
commandName
|
string | Command name |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully executed.
Retrieve a service’s configuration.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Update a service’s configuration.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully updated.
List rules.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[].name |
string | |
[].actions |
array | |
[].when |
object |
Create a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The rule to create.
Field | Type | Description |
---|---|---|
name |
string | |
actions |
array | |
when |
object |
Responses
201
: Successfully created.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string |
409
: There is already a rule with the given name
.
Retrieve a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
ruleId
|
string | Rule ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Field | Type | Description |
---|---|---|
name |
string | |
actions |
array | |
when |
object |
Delete a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
ruleId
|
string | Rule ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Update a rule.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
ruleId
|
string | Rule ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The new state of the rule.
Field | Type | Description |
---|---|---|
name |
string | |
actions |
array | |
when |
object |
Responses
200
: Successfully updated.
Sample a subset of documents in a collection to generate a JSON schema.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
Field | Type | Description |
---|---|---|
database_name |
string | The name of the database that contains the collection. |
collection_name |
string | The name of the collection to sample and generate a schema for. |
limit |
integer | The maximum number of documents to include in the sample. |
Responses
200
: Successfully generated schema
Field | Type | Description |
---|---|---|
schema |
object | The generated JSON schema |
List webhooks.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed incoming webhooks.
Field | Type | Description |
---|---|---|
name |
string | |
function_source |
string | |
respond_result |
boolean | |
options |
object | |
options.secret |
string | |
options.secretAsQueryParam |
boolean |
Create a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The webhook to create.
Field | Type | Description |
---|---|---|
name |
string | |
function_source |
string | |
respond_result |
boolean | |
options |
object | |
options.secret |
string | |
options.secretAsQueryParam |
boolean |
Responses
201
: Successfully created.
Retrieve a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
incomingWebhookId
|
string | Incoming webhook ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Delete a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
incomingWebhookId
|
string | Incoming webhook ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Update a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
incomingWebhookId
|
string | Incoming webhook ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The updated state of the webhook.
Field | Type | Description |
---|---|---|
name |
string | |
function_source |
string | |
respond_result |
boolean | |
options |
object | |
options.secret |
string | |
options.secretAsQueryParam |
boolean |
Responses
200
: Successfully updated.
Users APIs¶
List users.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].identities |
array | |
[].type |
string | |
[].creation_date |
integer | |
[].last_authentication_date |
integer | |
[].disabled |
boolean | |
[].data |
object |
Create a user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The user to create
Field | Type | Description |
---|---|---|
email |
string | |
password |
string |
Responses
201
: Successfully created.
Field | Type | Description |
---|---|---|
_id |
string | |
identities |
array | |
type |
string | |
creation_date |
integer | |
last_authentication_date |
integer | |
disabled |
boolean | |
data |
object |
Retrieve a user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
uid
|
string | UID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | |
identities |
array | |
type |
string | |
creation_date |
integer | |
last_authentication_date |
integer | |
disabled |
boolean | |
data |
object |
Delete a user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
uid
|
string | UID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
List a user’s devices.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
uid
|
string | UID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects |
Revoke all of a user’s sessions.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
uid
|
string | UID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully revoked.
Enable a user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
uid
|
string | UID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully enabled.
Disable a user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
uid
|
string | UID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully disabled.
Delete a pending user.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
email
|
string | Email address |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Values APIs¶
List all values defined in an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: values were successfully enumerated.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | |
[].name |
string | |
[].private |
boolean |
Define a Value in an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The value to create.
Field | Type | Description |
---|---|---|
name |
string | |
private |
boolean | |
value |
any |
Responses
201
: The value was successfully defined.
Field | Type | Description |
---|---|---|
name |
string | |
private |
boolean | |
value |
any |
Retrieve a value definition from an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
valueId
|
string | Value ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved the value.
Field | Type | Description |
---|---|---|
_id |
string | |
name |
string | |
private |
boolean | |
value |
any |
Delete a value defined in an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
valueId
|
string | Value ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted the value.
Update a value definition in an application.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
valueId
|
string | Value ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully updated the value.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[].name |
string | |
[].private |
boolean | |
[].value |
any |
Incoming Webhook APIs¶
List webhooks.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed incoming webhooks.
Field | Type | Description |
---|---|---|
name |
string | |
function_source |
string | |
respond_result |
boolean | |
options |
object | |
options.secret |
string | |
options.secretAsQueryParam |
boolean |
Create a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The webhook to create.
Field | Type | Description |
---|---|---|
name |
string | |
function_source |
string | |
respond_result |
boolean | |
options |
object | |
options.secret |
string | |
options.secretAsQueryParam |
boolean |
Responses
201
: Successfully created.
Retrieve a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
incomingWebhookId
|
string | Incoming webhook ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved.
Delete a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
incomingWebhookId
|
string | Incoming webhook ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: Successfully deleted.
Update a webhook.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
serviceId
|
string | Service ID |
incomingWebhookId
|
string | Incoming webhook ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The updated state of the webhook.
Field | Type | Description |
---|---|---|
name |
string | |
function_source |
string | |
respond_result |
boolean | |
options |
object | |
options.secret |
string | |
options.secretAsQueryParam |
boolean |
Responses
200
: Successfully updated.
Event Trigger APIs¶
Create a trigger.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The trigger to create.
Field | Type | Description |
---|---|---|
name |
string | The name of the trigger. |
type |
string | The type of the trigger. Possible Values:
|
function_id |
string | The ID of the function associated with the trigger. |
disabled |
boolean | Default:
false If true, the trigger is disabled.
|
config |
object | An object that defines configuration values for the trigger. |
config.operation_types |
array of strings |
Valid values:
|
config.operation_type |
string | Required for Authentication Triggers
The authentication operation type to listen for.
Valid values:
|
config.providers |
string | Only Available for Authentication Triggers
A list of one or more authentication provider id values. The trigger
will only listen for authentication events produced by
these providers.
|
config.database |
string | Required for Database Triggers
The name of the MongoDB database that contains the watched collection.
|
config.collection |
string | Required for Database Triggers
The name of the MongoDB collection that the trigger watches for change events.
The collection must be part of the specified database.
|
config.service_id |
string | Required for Database Triggers
The ID of the MongoDB Service associated with the trigger.
|
config.match |
object | Only Available for Database Triggers
A $match
expression document that Stitch includes in
the underlying change stream pipeline for the trigger.
This is useful when you want to filter change events
beyond their operation type. The trigger will only
fire if the expression evaluates to true for a given
change event.
|
config.full_document |
boolean | Only Available for Database Triggers
If true, indicates that
UPDATE change events should include the most current
majority-committed version of the
modified document in the fullDocument field. |
config.schedule |
string | Only Available for Scheduled Triggers
A cron expression that defines the trigger schedule.
|
event_processors |
object | An object where each field name is an event processor ID and each
value is an object that configures its corresponding event
processor.
|
Responses
201
: Successfully created.
Field | Type | Description |
---|---|---|
_id |
string | The unique ID of the trigger. |
name |
string | The name of the trigger. |
type |
string | The type of the trigger. |
function_id |
string | The ID of the function associated with the trigger. |
function_name |
string | The name of the function associated with the trigger. |
disabled |
boolean | If true, the trigger is disabled and will not fire. |
List all triggers.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed triggers.
Field | Type | Description |
---|---|---|
_id |
string | The unique ID of the trigger. |
name |
string | The name of the trigger. |
type |
string | The type of the trigger. |
function_id |
string | The ID of the function associated with the trigger. |
function_name |
string | The name of the function associated with the trigger. |
disabled |
boolean | If true, the trigger is disabled and will not fire. |
Update a trigger.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
triggerId
|
string | The ObjectID of the trigger. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The trigger to update.
Field | Type | Description |
---|---|---|
name |
string | The name of the trigger. |
type |
string | The type of the trigger. Possible Values:
|
function_id |
string | The ID of the function associated with the trigger. |
disabled |
boolean | Default:
false If true, the trigger is disabled.
|
config |
object | An object that defines configuration values for the trigger. |
config.operation_types |
array of strings |
Valid values:
|
config.operation_type |
string | Required for Authentication Triggers
The authentication operation type to listen for.
Valid values:
|
config.providers |
string | Only Available for Authentication Triggers
A list of one or more authentication provider id values. The trigger
will only listen for authentication events produced by
these providers.
|
config.database |
string | Required for Database Triggers
The name of the MongoDB database that contains the watched collection.
|
config.collection |
string | Required for Database Triggers
The name of the MongoDB collection that the trigger watches for change events.
The collection must be part of the specified database.
|
config.service_id |
string | Required for Database Triggers
The ID of the MongoDB Service associated with the trigger.
|
config.match |
object | Only Available for Database Triggers
A $match
expression document that Stitch includes in
the underlying change stream pipeline for the trigger.
This is useful when you want to filter change events
beyond their operation type. The trigger will only
fire if the expression evaluates to true for a given
change event.
|
config.full_document |
boolean | Only Available for Database Triggers
If true, indicates that
UPDATE change events should include the most current
majority-committed version of the
modified document in the fullDocument field. |
config.schedule |
string | Only Available for Scheduled Triggers
A cron expression that defines the trigger schedule.
|
event_processors |
object | An object where each field name is an event processor ID and each
value is an object that configures its corresponding event
processor.
|
Responses
204
: Successfully updated the trigger.
409
: Encountered an error while updating the trigger.
Field | Type | Description |
---|---|---|
error |
string | A message that describes the error. |
error_code |
string | The error type. |
Retrieve the configuration for a specific trigger.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
triggerId
|
string | The ObjectID of the trigger. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved trigger.
Field | Type | Description |
---|---|---|
_id |
string | The unique ID of the trigger. |
name |
string | The name of the trigger. |
type |
string | The type of the trigger. |
function_id |
string | The ID of the function associated with the trigger. |
function_name |
string | The name of the function associated with the trigger. |
disabled |
boolean | If true, the trigger is disabled and will not fire. |
Delete a trigger.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
triggerId
|
string | The ObjectID of the trigger. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully deleted the trigger.
Resume a suspended trigger.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
triggerId
|
string | The ObjectID of the trigger. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
An empty object.
Responses
204
: Successfully resumed the trigger.
404
: Trigger not found.
Field | Type | Description |
---|---|---|
error |
string | A description of the error that Stitch encountered. |
Static File Hosting APIs¶
List all hosted assets.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed hosted files.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[].appId |
string | The unique App ID of the Stitch application that is hosting the file. |
[].last_modified |
integer | The time at which the hosted asset was last modified in Unix time (number of seconds since January 1, 1970 at 00:00 UTC). |
[].url |
string | The full URL of the hosted asset. |
[].path |
string | The resource path of the hosted asset |
[].size |
integer | The size of the hosted asset in bytes |
[].attrs |
array | An array of documents that each describe a metadata attribute that applies to the asset. |
[].attrs.[].name |
string | The metadata attribute name. |
[].attrs.[].value |
string | The metadata attribute value. |
[].hash |
string | The MD5 checksum hash for the hosted asset |
Move or copy a hosted asset to a new resource path.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The hosted asset file and its metadata. (Must use Content-Type: multipart/mixed
)
Field | Type | Description |
---|---|---|
move_from |
string | The current resource path of the asset to move.
Must be used with move_to . |
move_to |
string | The resource path to which the asset will move.
Must be used with move_from . |
copy_from |
string | The current resource path of the asset to copy.
Must be used with copy_to . |
copy_to |
string | The resource path to which the asset will be copied.
Must be used with copy_from . |
Responses
204
: Successfully moved/copied the hosted asset.
Retrieve metadata for a specific hosted asset
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Query Parameters
Name | Type | Description |
---|---|---|
path
|
string | The resource path of a hosted asset. |
prefix
|
string | Return only those assets where the resource path begins with the specified prefix. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully retrieved metadata for the hosted file.
Field | Type | Description |
---|---|---|
appId |
string | The unique App ID of the Stitch application that is hosting the file. |
last_modified |
integer | The time at which the hosted asset was last modified in Unix time (number of seconds since January 1, 1970 at 00:00 UTC). |
url |
string | The full URL of the hosted asset. |
path |
string | The resource path of the hosted asset |
size |
integer | The size of the hosted asset in bytes |
attrs |
array | An array of documents that each describe a metadata attribute that applies to the asset. |
attrs.[].name |
string | The metadata attribute name. |
attrs.[].value |
string | The metadata attribute value. |
hash |
string | The MD5 checksum hash for the hosted asset |
404
: Asset not found.
Field | Type | Description |
---|---|---|
error |
string |
Upload or replace an asset at a specific resource path.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Query Parameters
Name | Type | Description |
---|---|---|
path
|
string | The resource path of a hosted asset. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The hosted asset file and its metadata. (Must use Content-Type: multipart/mixed
)
Field | Type | Description |
---|---|---|
meta |
object | An asset metadata document (encoded as JSON). |
file |
string | The asset file to upload (encoded as binary). |
Responses
204
: Successfully added/replaced the hosted asset.
400
: Bad Request.
Field | Type | Description |
---|---|---|
error |
object | |
error.error |
string | A message that describes the error. |
error.error_code |
string | The error type. |
Update the metadata attributes of a hosted asset at a specific resource path.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Query Parameters
Name | Type | Description |
---|---|---|
path
|
string | The resource path of a hosted asset. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Request Body
The new metadata attributes for the hosted asset. These attributes replace all existing attributes for the file.
Field | Type | Description |
---|---|---|
attributes |
array | |
attributes.[].name |
string | The metadata attribute name. |
attributes.[].value |
string | The metadata attribute value. |
Responses
204
: Successfully updated the hosted asset.
400
: Bad Request.
Application Deployment APIs¶
Return the 100 most recent application deployments.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
[] |
array of objects | |
[]._id |
string | The unique ID of the deployment. |
[].app_id |
string | The unique _id value of the Stitch app. |
[].draft_id |
string | The unique _id value of the deployment draft associated with the deployment, if applicable. |
[].user_id |
string | The unique _id value of the MongoDB Cloud user that deployed the draft. |
[].deployed_at |
integer | The time at which the deployment was made. Represented as the number of seconds since January 1, 1970. |
[].origin |
string | The deployment method used to create the deployment. |
[].commit |
string | The commit hash of the deployment (Automatic GitHub Deployment) |
[].status |
string | A message that indicates whether or not the deployment was successful. |
[].status_error_message |
string | The error message of the error that caused the deployment to fail, if applicable. |
[].diff_url |
string | A link to the diff of changes in the deployment (Automatic GitHub Deployment) |
Return the current application deployment draft, if applicable.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully listed.
Field | Type | Description |
---|---|---|
_id |
string | The unique ID of the draft. |
user_id |
string | The unique _id value of the MongoDB Cloud user that created the draft. |
app |
object | |
app._id |
string | The application’s unique internal ID. |
app.client_app_id |
string | The application’s public App ID. |
app.name |
string | The name of the application. |
app.location |
string | The application’s deployment region. |
app.deployment_model |
string | The application’s deployment model. |
app.domain_id |
string | |
app.group_id |
string | An Atlas Project/Group ID. |
Create a new application deployment draft, if none exists.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully created draft.
Field | Type | Description |
---|---|---|
_id |
string | The unique ID of the draft. |
user_id |
string | The unique _id value of the MongoDB Cloud user that created the draft. |
app |
object | |
app._id |
string | The application’s unique internal ID. |
app.client_app_id |
string | The application’s public App ID. |
app.name |
string | The name of the application. |
app.location |
string | The application’s deployment region. |
app.deployment_model |
string | The application’s deployment model. |
app.domain_id |
string | |
app.group_id |
string | An Atlas Project/Group ID. |
409
: Draft already exists
Field | Type | Description |
---|---|---|
error |
string | A message that describes the error. |
error_code |
string | The error type. |
Discard the specified application deployment draft.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
draftId
|
string | Draft ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
204
: The draft was successfully discarded.
Deploy the specified application deployment draft.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
draftId
|
string | Draft ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
201
: The draft was successfully deployed.
Field | Type | Description |
---|---|---|
_id |
string | The application’s unique internal ID. |
client_app_id |
string | The application’s public App ID. |
name |
string | The name of the application. |
location |
string | The application’s deployment region. |
deployment_model |
string | The application’s deployment model. |
domain_id |
string | |
group_id |
string | An Atlas Project/Group ID. |
Return a diff between the currently deployed application and the specified draft.
Path Parameters
Name | Type | Description |
---|---|---|
groupId
|
string | An Atlas Project/Group ID. |
appId
|
string | The ObjectID of your application. Project & Application IDs demonstrates how to find this value. |
draftId
|
string | Draft ID |
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: Successfully diffed draft.
Field | Type | Description |
---|---|---|
diffs |
array | A list where each item is the line-by-line diff for a specific configuration file. |
hosting_files_diff |
object | The filenames of hosted files that have been added, removed, or modified. |
hosting_files_diff.added |
array | |
hosting_files_diff.deleted |
array | |
hosting_files_diff.modified |
array |
Dependency APIs¶
List external dependencies uploaded to the Stitch application.
Header Parameters
Name | Type | Description |
---|---|---|
Authorization
|
string | The authorization token provided in the access_token field of
the POST /auth/providers/{provider}/login and
POST /auth/session API endpoints. |
Responses
200
: The function was successfully retrieved.
Field | Type | Description |
---|---|---|
_id |
string | The dependency collection’s unique internal ID. |
location |
string | The application’s deployment region. |
user_id |
string | The unique _id value of the MongoDB Cloud user that
uploaded the dependency collection. |
last_modified |
integer | The time at which the dependencies were uploaded in Unix time (number of seconds since January 1, 1970 at 00:00 UTC). |
dependencies_list |
array | An array of documents that each describe a dependency uploaded to the application. |
dependencies_list.[].name |
string | The name of the uploaded dependency. |
dependencies_list.[].version |
string | The version of the uploaded dependency. |