You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: products/analytics/src/content/graphql-api/getting-started/authentication/api-token-auth.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,11 +90,11 @@ When you create a new token, a confirmation page displays that includes your tok
90
90
91
91
To copy the token to your device's clipboard, click the **Copy** button.
92
92
93
-
<Asidetype='note'header='Note'>
93
+
<Asidetype='warning'header='Warning'>
94
94
95
-
The confirmation page is the only time that you can see the token, so make sure you store it safely, since anyone who has the token can use it to access your data.
95
+
The token displays only on the confirmation page, so copy the token and store it safely, since anyone who has the token can use it to access your data.
96
96
97
-
If you lose the secret, you can [regenerate the token from the API Tokens page](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys#12345681), so that you do not have to configure all the permissions again.
97
+
If you lose the token, you can [regenerate it from the API Tokens page](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys#12345681), so that you do not have to configure all the permissions again.
Copy file name to clipboardExpand all lines: products/analytics/src/content/graphql-api/getting-started/compose-graphql-query.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
-
title: Create a query in a GraphQL client
2
+
title: Create a query in GraphiQL
3
3
order: 50
4
4
---
5
5
6
-
# Create a query in a GraphQL client
6
+
# Create a query in GraphiQL
7
7
8
8
You can use a GraphQL client to build and execute queries to the GraphQL API endpoint. The example below uses the [GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme) client.
9
9
@@ -53,7 +53,7 @@ To display information about the data set, including required parameters, click
53
53
54
54
Note that the `filter` and `limit` arguments are required, as indicated by the exclamation mark (`!`) after their type definitions (gold text). In this example, the `orderBy` argument is not required, though when used it requires a value of type `ZoneFirewallEventsAdaptiveOrderBy`.
55
55
56
-
To browse a list of supported filter fields, click the filter type definition (gold text) in the Documentation Explorer. In this example the type is `ZoneFirewallEventsAdaptiveFilter_InputObject`:
56
+
To browse a list of supported filter fields, click the filter type definition (gold text) in the Documentation Explorer. In this example, the type is `ZoneFirewallEventsAdaptiveFilter_InputObject`:
@@ -77,7 +77,7 @@ This example query returns the `action`, `datetime`, `clientRequestHTTPHost`, an
77
77
78
78

79
79
80
-
Once you have entered all the fields you want your query to return, you can click the **Play** button to submit the query. The response pane contains the data fetched from the Cloudflare GraphQL API endpoint.
80
+
Once you have entered all the fields you want your query to return, click the **Play** button to submit the query. The response pane contains the data fetched from the Cloudflare GraphQL API endpoint.
Copy file name to clipboardExpand all lines: products/analytics/src/content/graphql-api/getting-started/execute-graphql-query.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: Use curl to query the GraphQL API
3
3
order: 60
4
4
---
5
5
6
-
# Use curl to query the GraphQL API
6
+
# Use curl to query the Analytics API
7
7
8
-
You can submit a query you built up in the GraphiQL client as a payload in the `data` field of a POST request to the GraphQL API.
8
+
You can submit a query built with the GraphiQL client as the payload in the `data` field of a POST request to the Analytics API.
9
9
10
-
The advantage of executing the request with [curl](https://curl.se/) is that you can redirect the response to a file, and execute other post processing methods.
10
+
The advantage of executing the request with [curl](https://curl.se/) is that you can redirect the response to a file and execute other post processing methods.
11
11
12
12
The GraphQL endpoint requires valid JSON, so you must pass the query as the _value_ part of a JSON _key:value_ pair with a key named "query".
One of the great features of a GraphQL API is that it offers "introspection"—you can explore the graph (by making API calls) to see the available data sets, the fields and their types, and the operations you can perform.
8
+
A useful feature a GraphQL API is that it offers [introspection](https://graphql.org/learn/introspection/), which allows you to explore the graph (by making API calls) to see the available data sets, the fields and their types, and the operations you can perform.
9
9
10
-
[GraphiQL]([GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme))uses introspection to provide the **Documentation Explorer** so that you can visually browse the Analytics schema, including available data sets (nodes) and available fields.
10
+
[GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql#readme) is a GraphQL client that uses introspection to provide the **Documentation Explorer** so that you can visually browse a GraphQL schema.
11
11
12
-
This article provides an introduction to the GraphQL Documentation Explorer.
12
+
This article provides an introduction to exploring the Analytics GraphQL schema with the GraphiQL Documentation Explorer.
13
13
14
14
## Prerequisites
15
15
16
-
Before you begin, [configure the API endpoint and HTTP headers](/graphql-api/getting-started/authentication/graphql-client-headers) in the GraphQL client.
16
+
Before you begin, [configure the API endpoint and HTTP headers](/graphql-api/getting-started/authentication/graphql-client-headers) in the GraphiQL client.
17
17
18
18
## Open the Documentation Explorer
19
19
20
20
To open the GraphiQL Documentation Explorer, click the **Docs** link in header of the response pane:
When you first open the **Documentation Explorer** pane, the `mutation` and `query` root types display:
33
37
34
-

38
+

35
39
36
40
In this example `query` is the name of a root, and `Query` is the type definition.
37
41
38
-
## Find the fields available for a given type definition
42
+
## Find the fields available for a type definition
39
43
40
-
Click on the **type definition** of a node to view the fields that it provides. The **Documentation Explorer**pane also displays descriptions of the nodes.
44
+
Click on the **type definition** of a node to view the fields that it provides. The **Documentation Explorer** also displays descriptions of the nodes.
41
45
42
-
For example, click the **Query** type definition. The **Documentation Explorer**panel displays the fields that Query` provides. In this example, the fields are `cost` and `viewer`.
46
+
For example, click the **Query** type definition. The **Documentation Explorer** displays the fields that `Query` provides. In this example, the fields are `cost` and `viewer`:
43
47
44
-

48
+

49
+
50
+
To explore the schema, click the names of objects and definitions. You can also use search input (magnifying glass) and breadcrumb links in the header.
45
51
46
52
## Find the arguments associated with a field
47
53
48
-
Click the type definition of the `viewer` field to list its sub-fields. The `viewer` field provides sub-fields that allow you to query `accounts` or `zones` data:
54
+
Click the type definition of the `viewer` field (gold text) to list its sub-fields. The `viewer` field provides sub-fields that allow you to query `accounts` or `zones` data:
The `accounts` and `zones` fields take arguments to specify which data set to query.
53
59
54
-
For example, the `zones` can take a filter of `ZoneFilter_InputObject` type as an argument. To view the fields available to filter, click **ZoneFilter_InputObject**.
60
+
For example, `zones` can take a filter of `ZoneFilter_InputObject` type as an argument. To view the fields available to filter, click **ZoneFilter_InputObject**.
61
+
62
+
To limit the number of search results that the query returns, click **limit**.
63
+
64
+
## Find the data sets available for a zone
65
+
66
+
To view a list of the data sets available to query, click the **zone** type definition (gold text):
67
+
68
+

55
69
56
-
To limit the amount of search results that the query returns, click the **limit** argument.
70
+
A list of data sets displays in the **Fields** section, each with list of valid arguments and a brief description. Arguments that end with an exclamation mark (`!`) are required.
To view a list of the data sets available for a zone, click on the `zones` type definition after the colon (`:`) in the `zones` field:
74
+
Use the search input (magnifying glass icon) to find specific data sets:
61
75
62
-

76
+

63
77
64
-
A list of **search nodes** displays, with a brief description of their behavior and a list of valid arguments. Arguments that end with an exclamation mark (`!`) are required.
The definition for the data set displays. This example shows the `firewallEventsAdaptive` data set:
81
+
82
+

67
83
68
84
Refer to [_Data Sets (tables)_](/graphql-api/features/data-sets) for details on the nomenclature and behavior of these nodes.
69
85
70
-
To view the fields available for a particular data set, click on its type definition. If you click on the **ZoneFirewallEventsAdaptive** type definition in the **firewallEventsAdaptive** node, a list of fields is displayed:
86
+
## Find the fields available for a data set
87
+
88
+
To view the fields available for a particular data set, click on its type definition (gold text).
89
+
90
+
For example, click the **ZoneFirewallEventsAdaptive** type definition to view the fields available for the `firewallEventsAdaptive` data set:
0 commit comments