Skip to content

Commit 2237658

Browse files
authored
Revert "Adds APIRequest component to Logs docs (#23561)"
This reverts commit 3dff33c.
1 parent 2fb2a9e commit 2237658

File tree

8 files changed

+276
-286
lines changed

8 files changed

+276
-286
lines changed

src/content/docs/logs/get-started/api-configuration.mdx

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ sidebar:
66

77
---
88

9-
import { APIRequest } from "~/components";
10-
119
## Endpoints
1210

1311
The table below summarizes the job operations available for both Logpush and Edge Log Delivery jobs. Make sure that Account-scoped datasets use `/accounts/{account_id}` and Zone-scoped datasets use `/zone/{zone_id}`. For more information, refer to the [Log fields](/logs/reference/log-fields/) page.
@@ -39,24 +37,27 @@ For concrete examples, refer to the tutorials in [Logpush examples](/logs/tutori
3937

4038
The Logpush API requires credentials like any other Cloudflare API.
4139

42-
<APIRequest
43-
path="/zones/{zone_id}/logpush/jobs"
44-
method="GET"
45-
/>
40+
```bash
41+
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logpush/jobs \
42+
--header "X-Auth-Email: <EMAIL>" \
43+
--header "X-Auth-Key: <API_KEY>"
44+
```
4645

4746
## Ownership
4847

4948
Before creating a new job, ownership of the destination must be proven.
5049

5150
To issue an ownership challenge token to your destination:
5251

53-
<APIRequest
54-
path="/zones/{zone_id}/logpush/ownership"
55-
method="POST"
56-
json={{
57-
destination_conf: "s3://<BUCKET_PATH>?region=us-west-2",
58-
}}
59-
/>
52+
```bash
53+
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logpush/ownership \
54+
--header "X-Auth-Email: <EMAIL>" \
55+
--header "X-Auth-Key: <API_KEY>" \
56+
--header "Content-Type: application/json" \
57+
--data '{
58+
"destination_conf": "s3://<BUCKET_PATH>?region=us-west-2"
59+
}'
60+
```
6061

6162
A challenge file will be written to the destination, and the filename will be in the response (the filename may be expressed as a path, if appropriate for your destination):
6263

@@ -142,13 +143,15 @@ For more information on the value for your cloud storage provider, consult the f
142143

143144
To check if a destination is already in use:
144145

145-
<APIRequest
146-
path="/zones/{zone_id}/logpush/validate/destination/exists"
147-
method="POST"
148-
json={{
149-
destination_conf: "s3://foo",
150-
}}
151-
/>
146+
```bash
147+
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logpush/validate/destination/exists \
148+
--header "X-Auth-Email: <EMAIL>" \
149+
--header "X-Auth-Key: <API_KEY>" \
150+
--header "Content-Type: application/json" \
151+
--data '{
152+
"destination_conf": "s3://foo"
153+
}'
154+
```
152155

153156
Response
154157

@@ -179,30 +182,22 @@ The kind parameter cannot be used to update existing Logpush jobs. You can only
179182

180183
:::
181184

182-
<APIRequest
183-
path="/zones/{zone_id}/logpush/jobs"
184-
method="POST"
185-
json={{
186-
name: "<DOMAIN_NAME>",
187-
destination_conf: "s3://<BUCKET_PATH>?region=us-west-2",
188-
dataset: "http_requests",
189-
output_options: {
190-
field_names: [
191-
"ClientIP",
192-
"ClientRequesrHost",
193-
"ClientRequestMethod",
194-
" ClientRequestURI",
195-
"EdgeEndTimestamp",
196-
"EdgeResponseBytes",
197-
"EdgeResponseStatus",
198-
"EdgeStartTimestamp",
199-
"RayID"
200-
],
201-
timestamp_format: "rfc3339"
202-
},
203-
kind: "edge"
204-
}}
205-
/>
185+
```bash
186+
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logpush/jobs \
187+
--header "X-Auth-Email: <EMAIL>" \
188+
--header "X-Auth-Key: <API_KEY>" \
189+
--header "Content-Type: application/json" \
190+
--data '{
191+
"name": "<DOMAIN_NAME>",
192+
"destination_conf": "s3://<BUCKET_PATH>?region=us-west-2",
193+
"dataset": "http_requests",
194+
"output_options": {
195+
"field_names": ["ClientIP", "ClientRequesrHost", "ClientRequestMethod", " ClientRequestURI", "EdgeEndTimestamp", "EdgeResponseBytes", "EdgeResponseStatus", "EdgeStartTimestamp","RayID"],
196+
"timestamp_format": "rfc3339"
197+
},
198+
"kind": "edge"
199+
}'
200+
```
206201

207202
## Options
208203

@@ -221,14 +216,16 @@ The **CVE-2021-44228** parameter can only be set through the API at this time. U
221216

222217
To check if the selected **logpull\_options** are valid:
223218

224-
<APIRequest
225-
path="/zones/{zone_id}/logpush/validate/origin"
226-
method="POST"
227-
json={{
228-
logpull_options: "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339&CVE-2021-44228=true",
229-
dataset: "http_requests"
230-
}}
231-
/>
219+
```bash
220+
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logpush/validate/origin \
221+
--header "X-Auth-Email: <EMAIL>" \
222+
--header "X-Auth-Key: <API_KEY>" \
223+
--header "Content-Type: application/json" \
224+
--data '{
225+
"logpull_options": "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339&CVE-2021-44228=true",
226+
"dataset": "http_requests"
227+
}'
228+
```
232229

233230
Response
234231

src/content/docs/logs/instant-logs.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 116
66
---
77

8-
import { FeatureTable, APIRequest } from "~/components";
8+
import { FeatureTable } from "~/components";
99

1010
Instant Logs allows Cloudflare customers to access a live stream of the traffic for their domain from the Cloudflare dashboard or from a command-line interface (CLI). Seeing data in real time allows you to investigate an attack, troubleshoot, debug or test out changes made to your network. Instant Logs is lightweight, simple to use and does not require any additional setup.
1111

@@ -66,16 +66,18 @@ Below we have three examples of filters:
6666

6767
Example request using cURL:
6868

69-
<APIRequest
70-
path="/zones/{zone_id}/logpush/edge"
71-
method="POST"
72-
json={{
73-
fields: "ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID",
74-
sample: 100,
75-
filter: "",
76-
kind: "instant-logs"
77-
}}
78-
/>
69+
```bash
70+
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logpush/edge/jobs \
71+
--header "X-Auth-Email: <EMAIL>" \
72+
--header "X-Auth-Key: <API_KEY>" \
73+
--header "Content-Type: application/json" \
74+
--data '{
75+
"fields": "ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID",
76+
"sample": 100,
77+
"filter": "",
78+
"kind": "instant-logs"
79+
}'
80+
```
7981

8082
Response:
8183

0 commit comments

Comments
 (0)