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: pages/reference/api/overview.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,15 +32,15 @@ To construct an API call, it helps to understand a little about how the underlyi
32
32
Knowing the resource you wish to act upon and the method you wish to act with is enough for some requests. For example, if you want to view all fleets you have access to (which includes public fleets), you can use the `GET` method and the `application` resource. Your API call would look like this:
33
33
34
34
```shell
35
-
curl -X GET "{{ $links.apiBase }}/v5/application" \
35
+
curl -X GET "{{ $links.apiBase }}/v6/application" \
36
36
-H "Content-Type: application/json" \
37
37
-H "Authorization: Bearer <AUTH_TOKEN>"
38
38
```
39
39
40
40
If you want to limit this to only return fleets related to the authenticated user, use the `my_application` resource. For example:
41
41
42
42
```shell
43
-
curl -X GET "{{ $links.apiBase }}/v5/my_application" \
43
+
curl -X GET "{{ $links.apiBase }}/v6/my_application" \
44
44
-H "Content-Type: application/json" \
45
45
-H "Authorization: Bearer <AUTH_TOKEN>"
46
46
```
@@ -53,31 +53,31 @@ The following API call uses `$select` to only return the name and device type fo
In some cases, you'll want to get information for one specific resource, rather than all resources of that type. If you happen to know the resource ID, you can simply append it to the resource name:
62
62
63
63
```shell
64
-
curl -X GET "{{ $links.apiBase }}/v5/device(<ID>)" \
64
+
curl -X GET "{{ $links.apiBase }}/v6/device(<ID>)" \
65
65
-H "Content-Type: application/json" \
66
66
-H "Authorization: Bearer <AUTH_TOKEN>"
67
67
```
68
68
69
69
This also works for other pieces of unique information as long as you specify them, eg the device uuid for devices:
70
70
71
71
```shell
72
-
curl -X GET "{{ $links.apiBase }}/v5/device(uuid='<UUID>')" \
72
+
curl -X GET "{{ $links.apiBase }}/v6/device(uuid='<UUID>')" \
73
73
-H "Content-Type: application/json" \
74
74
-H "Authorization: Bearer <AUTH_TOKEN>"
75
75
```
76
76
77
77
or for resources where multiple elements combine to be unique, eg for device tags the device and tag key are a unique combination:
78
78
79
79
```shell
80
-
curl -X GET "{{ $links.apiBase }}/v5/device(device=<DEVICE ID>,tag_key='<KEY>')" \
80
+
curl -X GET "{{ $links.apiBase }}/v6/device(device=<DEVICE ID>,tag_key='<KEY>')" \
81
81
-H "Content-Type: application/json" \
82
82
-H "Authorization: Bearer <AUTH_TOKEN>"
83
83
```
@@ -87,7 +87,7 @@ Many times, however, you won't know the internal ID or other unique info used by
0 commit comments