Skip to content

Commit 55cc38e

Browse files
author
David Wang
authored
ref(crons): Update URLs for hybrid cloud (#6286)
* ref(crons): Update URLs for hybrid cloud * change to dropdown
1 parent 153531c commit 55cc38e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/docs/product/crons/getting-started.mdx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,24 @@ import requests
5353

5454
headers = {'Authorization': 'DSN ___PUBLIC_DSN___'}
5555
monitor_id = '' # Write your monitor_id here
56+
org_slug = '___ORG_SLUG___' # Write your organization slug here
5657

5758
# Create the check-in
5859
json_data = {'status': 'in_progress'}
59-
response = requests.post(f'https://sentry.io/api/0/monitors/{monitor_id}/checkins/', headers=headers, json=json_data)
60+
response = requests.post(f'https://sentry.io/api/0/organizations/{org_slug}/monitors/{monitor_id}/checkins/', headers=headers, json=json_data)
6061
checkin_id = response.json()['id']
6162

6263
# Execute your scheduled task code here...
6364

6465
# Update the check-in status (required) and duration (optional)
6566
json_data = {'status': 'ok', 'duration': 3000}
66-
response = requests.put(f'https://sentry.io/api/0/monitors/{monitor_id}/checkins/{checkin_id}/', headers=headers, json=json_data)
67+
response = requests.put(f'https://sentry.io/api/0/organizations/{org_slug}/monitors/{monitor_id}/checkins/{checkin_id}/', headers=headers, json=json_data)
6768
```
6869

6970
```bash {tabTitle: curl}
7071
# Create the check-in and save the returned CHECKIN_ID
7172
$ curl -X POST \
72-
'https://sentry.io/api/0/monitors/{MONITOR_ID}/checkins/' \
73+
'https://sentry.io/api/0/organizations/___ORG_SLUG___/monitors/{MONITOR_ID}/checkins/' \
7374
--header 'Authorization: DSN ___PUBLIC_DSN___' \
7475
--header 'Content-Type: application/json' \
7576
--data-raw '{"status": "in_progress"}'
@@ -78,14 +79,18 @@ $ curl -X POST \
7879

7980
# Update the check-in status (required) and duration (optional)
8081
$ curl -X PUT \
81-
'https://sentry.io/api/0/monitors/{MONITOR_ID}/checkins/{CHECKIN_ID}/' \
82+
'https://sentry.io/api/0/organizations/___ORG_SLUG___/monitors/{MONITOR_ID}/checkins/{CHECKIN_ID}/' \
8283
--header 'Authorization: DSN ___PUBLIC_DSN___' \
8384
--header 'Content-Type: application/json' \
8485
--data-raw '{"status": "ok", "duration": 3000}'
8586
```
8687

8788
### Request Parameters
8889

90+
`org_slug`:
91+
92+
: **Required.** Your organization's slug.
93+
8994
`monitor_id`:
9095

9196
: **Required.** Your monitor ID can be found on the monitor details page.

0 commit comments

Comments
 (0)