@@ -61,11 +61,11 @@ Vendor API v3 documentation:
6161* [ /v3/clusters] ( https://replicated-vendor-api.readme.io/reference/listclusters )
6262* [ /v3/cmx/history] ( https://replicated-vendor-api.readme.io/reference/listcmxhistory )
6363
64- Examples of using these endpoints can be found below.
64+ For examples of using these endpoints, see the sections below.
6565
6666### Credit Balance and Summarized Usage
67- To obtain summarized usage information in addition to your Compatibility Matrix
68- credit balance, the ` /v3/cmx/stats ` endpoint can be used .
67+ You can use the ` /v3/cmx/stats ` endpoint to get summarized usage information in addition to your Compatibility Matrix
68+ credit balance.
6969
7070This endpoint returns:
7171
@@ -84,7 +84,7 @@ curl --request GET \
8484```
8585
8686The ` v3/cmx/stats ` endpoint also supports filtering by ` start-time ` and
87- ` end-time ` , for example, to get usage information for January 2025:
87+ ` end-time ` . For example, the following request gets usage information for January 2025:
8888
8989``` shell
9090curl --request GET \
@@ -94,8 +94,7 @@ curl --request GET \
9494```
9595
9696### Currently Active Clusters
97- To get a list of currently active clusters, the ` /v3/clusters ` endpoint can be
98- used:
97+ To get a list of active clusters:
9998
10099``` shell
101100curl --request GET \
@@ -104,7 +103,7 @@ curl --request GET \
104103 --header ' accept: application/json'
105104```
106105
107- You can use a tool such as ` jq ` to filter and iterate over the output:
106+ You can also use a tool such as ` jq ` to filter and iterate over the output:
108107
109108``` shell
110109curl --request GET \
@@ -122,8 +121,7 @@ curl --request GET \
122121```
123122
124123### Currently Active Virtual Machines
125- Similar to clusters, to get a list of currently active virtual machines, the
126- ` /v3/vms ` endpoint can be used:
124+ To get a list of active VMs:
127125
128126``` shell
129127curl --request GET \
@@ -133,8 +131,7 @@ curl --request GET \
133131```
134132
135133### Historical Usage
136- To fetch historical usage information, the ` /v3/cmx/history ` endpoint can be
137- used. This endpoint returns a list of terminated clusters and VMs:
134+ To fetch historical usage information:
138135
139136``` shell
140137curl --request GET \
@@ -143,87 +140,91 @@ curl --request GET \
143140 --header ' accept: application/json'
144141```
145142
146- Unique to this endpoint is the ability to filter by ` distribution-type ` which
147- allows you to get a list of either just clusters or just virtual machines :
143+ You can also filter the response from the ` /v3/cmx/history ` endpoint by ` distribution-type ` , which
144+ allows you to get a list of either clusters or VMs :
148145
149146- ** For clusters use ` distribution-type=kubernetes ` :**
150- ``` shell
151- curl --request GET \
152- --url ' https://api.replicated.com/vendor/v3/cmx/history?distribution-type=kubernetes' \
153- --header ' Authorization: $REPLICATED_API_TOKEN' \
154- --header ' accept: application/json'
155- ```
156-
157- - ** For virtual machines use ` distribution-type=vm ` :**
158- ``` shell
159- curl --request GET \
160- --url ' https://api.replicated.com/vendor/v3/cmx/history?distribution-type=vm' \
161- --header ' Authorization: $REPLICATED_API_TOKEN' \
162- --header ' accept: application/json'
163- ```
147+ ``` shell
148+ curl --request GET \
149+ --url ' https://api.replicated.com/vendor/v3/cmx/history?distribution-type=kubernetes' \
150+ --header ' Authorization: $REPLICATED_API_TOKEN' \
151+ --header ' accept: application/json'
152+ ```
153+
154+ - ** For VMs use ` distribution-type=vm` :**
155+ ` ` ` shell
156+ curl --request GET \
157+ --url ' https://api.replicated.com/vendor/v3/cmx/history?distribution-type=vm' \
158+ --header ' Authorization: $REPLICATED_API_TOKEN' \
159+ --header ' accept: application/json'
160+ ` ` `
164161
165162# ## Filtering Endpoint Results
166- Each of these endpoints supports pagination and filtering. You can use the
167- following query parameters to filter the results. Each of the examples below
163+ Each of these endpoints supports pagination and filtering. You can use the
164+ following query parameters to filter the results.
165+
166+ :::note
167+ Each of the examples below
168168uses the ` v3/cmx/history` endpoint, but the same query parameters can be used
169169with the other endpoints as well.
170+ :::
170171
171172- ** Pagination:** Use the ` pageSize` and ` currentPage` query parameters to
172173 paginate through the results:
173174
174- ``` shell
175- curl --request GET \
176- --url ' https://api.replicated.com/vendor/v3/cmx/history?pageSize=10¤tPage=1' \
177- --header ' Authorization: $REPLICATED_API_TOKEN' \
178- --header ' accept: application/json'
179- ```
175+ ` ` ` shell
176+ curl --request GET \
177+ --url ' https://api.replicated.com/vendor/v3/cmx/history?pageSize=10¤tPage=1' \
178+ --header ' Authorization: $REPLICATED_API_TOKEN' \
179+ --header ' accept: application/json'
180+ ` ` `
180181
181182- ** Filter by date:** Use the ` start-time` and ` end-time` query parameters to
182183 filter the results by a specific date range:
183184
184- ``` shell
185- curl --request GET \
186- --url ' https://api.replicated.com/vendor/v3/cmx/history?start-time=2025-01-01T00:00:00Z&end-time=2025-01-31T23:59:59Z' \
187- --header ' Authorization: $REPLICATED_API_TOKEN' \
188- --header ' accept: application/json'
189- ```
185+ ` ` ` shell
186+ curl --request GET \
187+ --url ' https://api.replicated.com/vendor/v3/cmx/history?start-time=2025-01-01T00:00:00Z&end-time=2025-01-31T23:59:59Z' \
188+ --header ' Authorization: $REPLICATED_API_TOKEN' \
189+ --header ' accept: application/json'
190+ ` ` `
190191
191192- ** Sort by:** Use the ` tag-sort-key` query parameter to sort the results by a
192193 specific field. The field can be any of the fields returned in the response.
193- - By default the results are sorted in ascending order, use
194- ` sortDesc=true ` to sort in descending order:
194+
195+ By default, the results are sorted in ascending order, use
196+ ` sortDesc=true` to sort in descending order:
195197
196- ``` shell
197- curl --request GET \
198- --url ' https://api.replicated.com/vendor/v3/cmx/history?tag-sort-key=created_at&sortDesc=true' \
199- --header ' Authorization: $REPLICATED_API_TOKEN' \
200- --header ' accept: application/json'
201- ```
198+ ` ` ` shell
199+ curl --request GET \
200+ --url ' https://api.replicated.com/vendor/v3/cmx/history?tag-sort-key=created_at&sortDesc=true' \
201+ --header ' Authorization: $REPLICATED_API_TOKEN' \
202+ --header ' accept: application/json'
203+ ` ` `
202204
203205- ** Tag filters:** Use the ` tag-filter` query parameter to filter the results by
204206 a specific tag:
205207
206- ``` shell
207- curl --request GET \
208- --url ' https://api.replicated.com/vendor/v3/cmx/history?tag-filter=tag1' \
209- --header ' Authorization: $REPLICATED_API_TOKEN' \
210- --header ' accept: application/json'
211- ```
208+ ` ` ` shell
209+ curl --request GET \
210+ --url ' https://api.replicated.com/vendor/v3/cmx/history?tag-filter=tag1' \
211+ --header ' Authorization: $REPLICATED_API_TOKEN' \
212+ --header ' accept: application/json'
213+ ` ` `
212214
213215- ** Actor filters:** Use the ` actor-filter` query parameter to filter the actor
214216 that created the resource, or the type of actor such as ` Web UI` or
215217 ` Replicated CLI` :
216218
217- ``` shell
218- curl --request GET \
219- --url ' https://api.replicated.com/vendor/v3/cmx/history?actor-filter=name' \
220- --header ' Authorization: $REPLICATED_API_TOKEN' \
221- --header ' accept: application/json'
222- ```
223-
224-
225- ::: note
226- If any filter is passed for an object that does not exist, no warning is given.
227- For example, if you filter by ` actor-filter=name ` and there are no results
228- the response will be empty.
229- :::
219+ ` ` ` shell
220+ curl --request GET \
221+ --url ' https://api.replicated.com/vendor/v3/cmx/history?actor-filter=name' \
222+ --header ' Authorization: $REPLICATED_API_TOKEN' \
223+ --header ' accept: application/json'
224+ ` ` `
225+
226+ :::note
227+ If any filter is passed for an object that does not exist, no warning is given.
228+ For example, if you filter by ` actor-filter=name` and there are no results
229+ the response will be empty.
230+ :::
0 commit comments