Skip to content

Commit 5703e9a

Browse files
authored
DOCSP-38469 Add OpenAPI Docs (#116)
* DOCSP-38469 Add OpenAPI Docs * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * rename spec file * update spec file * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1 parent bd3885a commit 5703e9a

File tree

5 files changed

+1077
-1
lines changed

5 files changed

+1077
-1
lines changed

snooty.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ toc_landing_pages = [
3636
"code-generation/query-converter",
3737
"diagrams/manage-diagrams",
3838
"getting-started",
39-
"jobs/prerequisites"
39+
"jobs/prerequisites",
40+
"api-docs"
4041
]
4142

4243
[constants]
4344
ddl = ":abbr:`DDL (Data Definition Language)`"
4445
job = "sync job" #this will be updated to migration job in the near future.
4546
job_plural = "sync jobs" #this will be updated to migration jobs in the near future.
47+
migrator-api = "REST API Documentation"
48+
migrator-api-endpoints = "Endpoints"

source/api-docs.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.. _rm-rest-api:
2+
3+
============================
4+
Relational Migrator REST API
5+
============================
6+
7+
.. facet::
8+
:name: genre
9+
:values: tutorial
10+
11+
.. meta::
12+
:description: Learn about the MongoDB Relational Migrator REST API and how to use it.
13+
:keywords: data migration, rest api, open api
14+
15+
.. contents:: On this page
16+
:local:
17+
:backlinks: none
18+
:depth: 1
19+
:class: singlecol
20+
21+
The Relational Migrator REST API provides you with programmatic access
22+
to Relation Migrator with HTTPS endpoints. The REST API is a
23+
Relational Migrator service between your application and your source and
24+
destination databases that you can send requests to manage your sync jobs.
25+
26+
You don't need to install any additional extensions or packages to use
27+
the Relational Migrator REST API. The functionality is part of the
28+
Relational Migrator product. The REST API runs on the same port that
29+
you access the application on (either ``8278``, ``8080``, or ``443``).
30+
31+
How the REST API Works
32+
----------------------
33+
34+
The Relational Migrator REST API:
35+
36+
- Runs on the client computer or server that the Relation Migrator
37+
application is installed on.
38+
- The Rest API is controlled by the host adapter binding.
39+
- The Relational Migrator REST API **does not** currently support
40+
authentication.
41+
42+
When to Use REST API
43+
--------------------
44+
45+
Use the Relational Migrator REST API when:
46+
47+
- You want to use a task scheduler such as
48+
`CRON <https://en.wikipedia.org/wiki/Cron>`__ and define dynamic
49+
:ref:`table filters <rm-table-filters>` within a project. For example,
50+
using a table filter with
51+
``WHERE DATEDIFF(CURDATE(), last_modified) <= 1`` to batch migrate
52+
data on a cadence from your relational database to MongoDB.
53+
54+
- You want to programmatically create Relational Migrator sync jobs
55+
dynamically. For example, using connection strings from
56+
multiple databases without manually configuring them in the GUI.
57+
58+
- You generally prefer scripting your workflows instead of using a GUI.
59+
60+
Learn More
61+
----------
62+
63+
For Relational Migrator REST API endpoints, example
64+
requests, and responses, see :ref:`Endpoints <rm-api-resources-spec>`.
65+
66+
.. toctree::
67+
:titlesonly:
68+
69+
{+migrator-api-endpoints+} </api-docs/rest-api-spec>

source/api-docs/rest-api-spec.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. _rm-api-resources-spec:
2+
3+
:template: openapi
4+
:title: MongoDB Relational Migrator Administration API Specification
5+
6+
.. facet::
7+
:name: programming_language
8+
:values: json
9+
10+
.. meta::
11+
:keywords: code example
12+
13+
.. openapi:: /rm-openapi-latest.json

source/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,5 @@ Explore libraries and tools for MongoDB.
153153
/jobs/sync-jobs
154154
/connection-strings/connection-strings
155155
/code-generation
156+
{+migrator-api+} <api-docs>
156157
/release-notes

0 commit comments

Comments
 (0)