Skip to content

Commit 595b3a3

Browse files
committed
Revert to public API endpoints
1 parent 649781f commit 595b3a3

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

sites/platform/src/development/email-observability.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ To get an access token:
3737
Retrieve a log of email events for a project:
3838

3939
```bash
40-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/messages/get/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
40+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/messages/get/{{< variable "PROJECT_ID" >}}" \
4141
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
4242
-H "accept: application/json" | jq '.'
4343
```
4444

4545
Example filtering by a specific month:
4646

4747
```bash
48-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/messages/get/platformsh-auth/{{< variable "PROJECT_ID" >}}?from_date={{< variable "FROM_DATE" "YYYY-MM-DD" >}}&to_date={{< variable "TO_DATE" "YYYY-MM-DD" >}}&limit=50" \
48+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/messages/get/{{< variable "PROJECT_ID" >}}?from_date={{< variable "FROM_DATE" "YYYY-MM-DD" >}}&to_date={{< variable "TO_DATE" "YYYY-MM-DD" >}}&limit=50" \
4949
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
5050
-H "accept: application/json" | jq '.'
5151
```
@@ -64,7 +64,7 @@ curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/messages/get/platformsh-auth/{{
6464
Retrieve events for one or more specific email addresses:
6565

6666
```bash
67-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/messages/email/platformsh-auth/{{< variable "PROJECT_ID" >}}?email=user@example.com&email=other@example.com" \
67+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/messages/email/{{< variable "PROJECT_ID" >}}?email=user@example.com&email=other@example.com" \
6868
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
6969
-H "accept: application/json" | jq '.'
7070
```
@@ -76,7 +76,7 @@ Retrieve events of a specific type by passing `event_type` as a path segment in
7676
Example filtering by `bounce` events:
7777

7878
```bash
79-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/messages/bounce/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
79+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/messages/bounce/{{< variable "PROJECT_ID" >}}" \
8080
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
8181
-H "accept: application/json" | jq '.'
8282
```
@@ -94,15 +94,15 @@ The `limit`, `offset`, `from_date`, and `to_date` parameters from the [previous
9494
Retrieve aggregated daily delivery statistics for a project. This endpoint provides high-level metrics compatible with common visualization tools.
9595

9696
```bash
97-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/stats/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
97+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/stats/{{< variable "PROJECT_ID" >}}" \
9898
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
9999
-H "accept: application/json" | jq '.'
100100
```
101101

102102
Example narrowing the range to a specific month:
103103

104104
```bash
105-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/stats/platformsh-auth/{{< variable "PROJECT_ID" >}}?start_date={{< variable "START_DATE" "YYYY-MM-DD" >}}&end_date={{< variable "END_DATE" "YYYY-MM-DD" >}}" \
105+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/stats/{{< variable "PROJECT_ID" >}}?start_date={{< variable "START_DATE" "YYYY-MM-DD" >}}&end_date={{< variable "END_DATE" "YYYY-MM-DD" >}}" \
106106
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
107107
-H "accept: application/json" | jq '.'
108108
```
@@ -126,7 +126,7 @@ The bounce list contains addresses that have hard-bounced. The system automatica
126126
#### List bounced addresses
127127

128128
```bash
129-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/bouncelist/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
129+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/bouncelist/{{< variable "PROJECT_ID" >}}" \
130130
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
131131
-H "accept: application/json" | jq '.'
132132
```
@@ -140,7 +140,7 @@ curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/bouncelist/platformsh-auth/{{<
140140
Only remove an address after confirming it is now valid. Returns `204 No Content` on success.
141141

142142
```bash
143-
curl -X DELETE "https://sendgrid.pltfrm.sh/api/v1/sendgrid/bouncelist/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
143+
curl -X DELETE "https://platform.sendgrid.pltfrm.sh/api/v1/self/bouncelist/{{< variable "PROJECT_ID" >}}" \
144144
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
145145
-H "content-type: application/json" \
146146
-d '{"email": "user@example.com"}'
@@ -153,7 +153,7 @@ The blocklist prevents sending to addresses that have previously blocked your em
153153
#### List blocked addresses
154154

155155
```bash
156-
curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/blocklist/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
156+
curl "https://platform.sendgrid.pltfrm.sh/api/v1/self/blocklist/{{< variable "PROJECT_ID" >}}" \
157157
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
158158
-H "accept: application/json" | jq '.'
159159
```
@@ -167,7 +167,7 @@ curl "https://sendgrid.pltfrm.sh/api/v1/sendgrid/blocklist/platformsh-auth/{{< v
167167
Removes an address to resume sending. Returns `204 No Content` on success.
168168

169169
```bash
170-
curl -X DELETE "https://sendgrid.pltfrm.sh/api/v1/sendgrid/blocklist/platformsh-auth/{{< variable "PROJECT_ID" >}}" \
170+
curl -X DELETE "platform.sendgrid.pltfrm.sh/api/v1/self/blocklist/{{< variable "PROJECT_ID" >}}" \
171171
-H "Authorization: Bearer {{< variable "ACCESS_TOKEN" >}}" \
172172
-H "content-type: application/json" \
173173
-d '{"email": "user@example.com"}'

0 commit comments

Comments
 (0)