Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DOCSP-35269): Update Realm base URL to new App Services base URL #658

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/data-api/utils.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
client_api_login() {
local app_id="$1"
local provider="$2"
local client_api_base_url="https://realm.mongodb.com/api/client/v2.0/app/$app_id"
local client_api_base_url="https://services.cloud.mongodb.com/api/client/v2.0/app/$app_id"
local client_api_login_url="$client_api_base_url/auth/providers/$provider/login"
case $provider in
"anon-user")
Expand Down
6 changes: 3 additions & 3 deletions source/activity/view-logs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Logging endpoint with no additional parameters:
.. code-block:: javascript
:emphasize-lines: 20

const ADMIN_API_BASE_URL = "https://realm.mongodb.com/api/admin/v3.0";
const ADMIN_API_BASE_URL = "https://services.cloud.mongodb.com/api/admin/v3.0";
exports = async function() {
// Get values that you need for requests
const projectId = "<Atlas Project ID>";
Expand Down Expand Up @@ -209,7 +209,7 @@ fields:
.. code-block:: javascript
:emphasize-lines: 16-17, 23

const ADMIN_API_BASE_URL = "https://realm.mongodb.com/api/admin/v3.0";
const ADMIN_API_BASE_URL = "https://services.cloud.mongodb.com/api/admin/v3.0";
exports = async function() {
// Get values that you need for requests
const projectId = "<Atlas Project ID>";
Expand Down Expand Up @@ -263,7 +263,7 @@ entries.
.. code-block:: javascript
:emphasize-lines: 13-16, 39

const ADMIN_API_BASE_URL = "https://realm.mongodb.com/api/admin/v3.0";
const ADMIN_API_BASE_URL = "https://services.cloud.mongodb.com/api/admin/v3.0";
exports = async function() {
// Get values that you need for requests
const projectId = "<Atlas Project ID>";
Expand Down
4 changes: 2 additions & 2 deletions source/apps/change-deployment-models.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Procedure
.. code-block:: sh

curl -X PUT \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deployment_migration \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deployment_migration \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <AccessToken>' \
-d '{
Expand All @@ -206,7 +206,7 @@ Procedure
.. code-block:: sh

curl -X GET \
https://realm.mongodb.com/api/admin/v3.0/groups/<groupId>/apps/<appId>/deployment_migration \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/<groupId>/apps/<appId>/deployment_migration \
-H 'Authorization: Bearer <AccessToken>'

.. include:: /includes/step-deployment-region-migration-cleanup.rst
Expand Down
2 changes: 1 addition & 1 deletion source/apps/cicd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ in with that profile:
public_api_key: "<MongoDB Atlas Public API Key>"
private_api_key: "<MongoDB Atlas Private API Key>"
atlas_base_url: "https://cloud.mongodb.com"
realm_base_url: "https://realm.mongodb.com"
realm_base_url: "https://services.cloud.mongodb.com"
telemetry_mode: ""

.. code-block:: bash
Expand Down
4 changes: 2 additions & 2 deletions source/apps/create.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Procedure
.. code-block:: shell

curl -X POST \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
--header 'Authorization: Bearer <access_token>' \
--data '{ "name": "<App Name>" }'

Expand All @@ -238,7 +238,7 @@ Procedure
.. code-block:: shell

curl -X POST \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
-H 'Authorization: Bearer <access_token>' \
-d '{
"name": "<App Name>",
Expand Down
2 changes: 1 addition & 1 deletion source/apps/delete.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Procedure

.. code-block:: shell

curl --request DELETE 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}' \
curl --request DELETE 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json'

Expand Down
4 changes: 2 additions & 2 deletions source/apps/environment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Procedure
.. code-block:: bash

curl -X GET \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment_values/{environmentValueId} \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment_values/{environmentValueId} \
-H 'Authorization: Bearer <access_token>' \
-d '{
"name": "myEnvironmentValue",
Expand All @@ -278,6 +278,6 @@ Procedure
.. code-block:: bash

curl -X PUT \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment \
-H 'Authorization: Bearer <access_token>' \
-d '{ "environment": "production" }'
4 changes: 2 additions & 2 deletions source/apps/export.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Procedure
.. code-block:: shell

curl -X GET \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/export \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/export \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
--output ./exported-app.zip
Expand All @@ -179,7 +179,7 @@ Procedure

.. code-block:: text

https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/export?deployment={deploymentId}
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/export?deployment={deploymentId}

If the request is successful, the endpoint returns a ``200``
response that contains a ``.zip`` directory of your
Expand Down
2 changes: 1 addition & 1 deletion source/apps/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ or App Services CLI to find it programmatically.
.. input::
:language: bash

curl https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
curl https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps \
--header 'Authorization: Bearer <access_token>'

.. output::
Expand Down
4 changes: 2 additions & 2 deletions source/apps/rollback.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Procedure
:language: bash

curl -X GET \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deployments \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deployments \
-H 'Authorization: Bearer <access_token>'

.. output::
Expand Down Expand Up @@ -158,5 +158,5 @@ Procedure
.. code-block:: bash

curl -X GET \
https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deployments/{deploymentId}/redeploy \
https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deployments/{deploymentId}/redeploy \
-H 'Authorization: Bearer <access_token>'
8 changes: 4 additions & 4 deletions source/apps/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Procedure

.. code-block:: shell

curl -X POST 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts' \
curl -X POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>'

Expand All @@ -197,7 +197,7 @@ Procedure

.. code-block:: shell

curl -X DELETE 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}' \
curl -X DELETE 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}' \
-H 'Authorization: Bearer <access_token>'

.. step:: Make Changes to Your Application
Expand Down Expand Up @@ -225,7 +225,7 @@ Procedure
.. code-block:: shell

curl -X POST \
'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment' \
'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \

Expand Down Expand Up @@ -332,7 +332,7 @@ drafts with the Admin API.
.. code-block:: bash
:emphasize-lines: 5

curl -X PATCH https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deploy/config \
curl -X PATCH https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/deploy/config \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl "https://realm.mongodb.com/api/admin/v3.0/groups/$PROJECT_ID/apps/$APP_ID/auth_providers" \
curl "https://services.cloud.mongodb.com/api/admin/v3.0/groups/$PROJECT_ID/apps/$APP_ID/auth_providers" \
-X "POST" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
curl "https://realm.mongodb.com/api/admin/v3.0/groups/$PROJECT_ID/apps/$APP_ID/auth_providers" \
curl "https://services.cloud.mongodb.com/api/admin/v3.0/groups/$PROJECT_ID/apps/$APP_ID/auth_providers" \
-X "POST" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
Expand Down
2 changes: 1 addition & 1 deletion source/authentication/google.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ credentials, and configuring the provider to connect with the project.

.. code-block:: none

https://realm.mongodb.com
https://services.cloud.mongodb.com

For :guilabel:`Authorized Redirect URIs`, enter the App Services
authentication callback URL that corresponds to the
Expand Down
2 changes: 1 addition & 1 deletion source/edge-server/configure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Set up and run the Edge Server on the host.

.. code-block:: shell

wget --content-disposition https://realm.mongodb.com/api/client/v2.0/tiered-sync/package/latest
wget --content-disposition https://services.cloud.mongodb.com/api/client/v2.0/tiered-sync/package/latest

Unzip the tar to get the files.

Expand Down
8 changes: 4 additions & 4 deletions source/graphql/authenticate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For example, the following request uses Bearer Authentication:
.. code-block:: shell
:emphasize-lines: 2

curl -X POST 'https://realm.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
curl -X POST 'https://services.cloud.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
--header 'Authorization: Bearer <AccessToken>' \
--header 'Content-Type: application/json' \
--data-raw '{
Expand Down Expand Up @@ -105,7 +105,7 @@ the request's ``email`` and ``password`` headers.
.. code-block:: shell
:emphasize-lines: 2-3

curl -X POST 'https://realm.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
curl -X POST 'https://services.cloud.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
--header 'email: <EmailAddress>' \
--header 'password: <Password>' \
--header 'Content-Type: application/json' \
Expand All @@ -123,7 +123,7 @@ To authenticate a GraphQL request with an :ref:`API Key
.. code-block:: shell
:emphasize-lines: 2

curl -X POST 'https://realm.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
curl -X POST 'https://services.cloud.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
--header 'apiKey: <APIKey>' \
--header 'Content-Type: application/json' \
--data-raw '{
Expand All @@ -142,7 +142,7 @@ request's ``jwtTokenString`` header.
.. code-block:: shell
:emphasize-lines: 2

curl -X POST 'https://realm.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
curl -X POST 'https://services.cloud.mongodb.com/api/client/v2.0/app/<AppID>/graphql' \
--header 'jwtTokenString: <JWT>' \
--header 'Content-Type: application/json' \
--data-raw '{
Expand Down
8 changes: 4 additions & 4 deletions source/graphql/cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Run a Query

.. code-block:: shell

gq https://realm.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
gq https://services.cloud.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
-H 'Authorization: Bearer <Valid Access Token>' \
-q 'query AllMoviesFromYear($year: Int!) { movies(query: { year: $year }) { title year runtime } }' \
-v 'year=2000'
Expand All @@ -47,7 +47,7 @@ Run a Query

.. code-block:: shell

curl https://realm.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
curl https://services.cloud.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
-X POST \
-H 'Authorization: Bearer <Valid Access Token>' \
-d '{ "query": "query AllMoviesFromYear($year: Int!) { movies(query: { year: $year }) { title year runtime } }",
Expand All @@ -63,7 +63,7 @@ Run a Mutation

.. code-block:: shell

gq https://realm.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
gq https://services.cloud.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
-H 'Authorization: Bearer <Valid Access Token>' \
-q 'mutation UpdateMovieTitle($oldTitle: String!, $newTitle: String!) { updateOneMovie(query: { title: $oldTitle } set: { title: $newTitle }) { title year } }'
-v 'oldTitle=The Matrix Reloaded'
Expand All @@ -74,7 +74,7 @@ Run a Mutation

.. code-block:: shell

curl https://realm.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
curl https://services.cloud.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
-X POST \
-H 'Authorization: Bearer <Valid Access Token>' \
-d '{ "query": "mutation UpdateMovieTitle($oldTitle: String!, $newTitle: String!) { updateOneMovie(query: { title: $oldTitle } set: { title: $newTitle }) { title year } }",
Expand Down
2 changes: 1 addition & 1 deletion source/includes/api-authenticate-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ key pair:
.. code-block:: shell

curl -X POST \
https://realm.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login \
https://services.cloud.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
Expand Down
16 changes: 8 additions & 8 deletions source/includes/deployment-region-auth-callback-urls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,46 @@
* - | **Global**
- .. code-block:: text

https://realm.mongodb.com/api/client/v2.0/auth/callback
https://services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Virginia**
| (``us-east-1``)
- .. code-block:: text

https://us-east-1.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://us-east-1.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Oregon**
| (``us-west-2``)
- .. code-block:: text

https://us-west-2.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://us-west-2.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Ireland**
| (``eu-west-1``)
- .. code-block:: text

https://eu-west-1.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://eu-west-1.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Frankfurt**
| (``eu-central-1``)
- .. code-block:: text

https://eu-central-1.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://eu-central-1.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Mumbai**
| (``ap-south-1``)
- .. code-block:: text

https://ap-south-1.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://ap-south-1.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Singapore**
| (``ap-southeast-1``)
- .. code-block:: text

https://ap-southeast-1.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://ap-southeast-1.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback

* - | **Sydney**
| (``ap-southeast-2``)
- .. code-block:: text

https://ap-southeast-2.aws.realm.mongodb.com/api/client/v2.0/auth/callback
https://ap-southeast-2.aws.services.cloud.mongodb.com/api/client/v2.0/auth/callback
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
generator does not copy the custom user data configuration to the new app
correctly. You can fix this as follows: the ``{+cli-bin+} apps create`` command
should have output some JSON about the app you just created. From this JSON,
copy the "url" value (something like ``https://realm.mongodb.com/groups/...``)
copy the "url" value (something like ``https://services.cloud.mongodb.com/groups/...``)
and visit that URL in your browser. Log in if prompted. From the app dashboard,
in the left-hand panel, click :guilabel:`App Users`. Click :guilabel:`Custom
User Data`. Ensure :guilabel:`Enable Custom User Data` is ``ON``. If it was not
Expand Down
2 changes: 1 addition & 1 deletion source/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ run virtually any app or backend service on top of Atlas.

.. code-block:: bash

curl -X POST https://realm.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
curl -X POST https://services.cloud.mongodb.com/api/client/v2.0/app/<Your App ID>/graphql \
-H 'apiKey: <YOUR API KEY>' \
-d {
"query": "query GetMeetingsInDateRange($start: DateTime!, $end: DateTime!) { meetings(query: { start_gte: $start, end_lte: $end }) { _id start end location } }"
Expand Down
Loading
Loading