Skip to content

Commit bd21eb2

Browse files
authored
Merge pull request #2649 from yoshizzle/longviewPOST
Added POST and PUT endpoints to Longview client
2 parents 020f6f0 + 70a4a91 commit bd21eb2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/src/data/endpoints/longview.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@ endpoints:
1818
curl: |
1919
curl -H "Authorization: Bearer $TOKEN" \
2020
https://$api_root/$version/longview/clients
21+
POST:
22+
money: true
23+
oauth: longviewclient:create
24+
description: >
25+
Creates a new Longview client.
26+
params:
27+
label:
28+
optional: true
29+
description: The label to assign this Longview client.
30+
type: String
31+
limit: "3-32 ASCII characters limited to letters, numbers, underscores, and dashes, starting and ending with a letter, and without two dashes or underscores in a row"
32+
examples:
33+
curl: |
34+
curl -H "Content-Type: application/json" \
35+
-H "Authorization: Bearer $TOKEN" \
36+
-X POST -d '{
37+
"label": "newlabel",
38+
}' \
39+
https://$api_root/$version/longview/clients
2140
/longview/clients/$id:
2241
type: resource
2342
authenticated: true
@@ -33,6 +52,18 @@ endpoints:
3352
curl: |
3453
curl -H "Authorization: Bearer $TOKEN" \
3554
https://$api_root/$version/longview/clients/$longviewclient_id
55+
PUT:
56+
oauth: longviewclient:modify
57+
description: >
58+
Modifies this Longview client.
59+
examples:
60+
curl: |
61+
curl -H "Content-Type: application/json" \
62+
-H "Authorization: Bearer $TOKEN" \
63+
-X PUT -d '{
64+
"label": "awesome_new_label",
65+
}' \
66+
https://$api_root/$version/longview/clients/$longviewclient_id
3667
DELETE:
3768
oauth: longviewclients:delete
3869
dangerous: true

0 commit comments

Comments
 (0)