Skip to content

Commit fec09de

Browse files
Merge pull request DataDog#395 from DataDog/allegrem/revoke_screenboard
2 parents df32c7e + f3230fd commit fec09de

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
api_key=9775a026f1ca7d1c6c5af9d94d9595a4
2+
app_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff
3+
board_id=6334
4+
5+
# Create a screenboard to share
6+
board_id=$(curl -X POST -H "Content-type: application/json" \
7+
-d '{
8+
"width": 1024,
9+
"height": 768,
10+
"board_title": "dogapi tests",
11+
"widgets": [
12+
{
13+
"type": "image",
14+
"height": 20,
15+
"width": 32,
16+
"y": 7,
17+
"x": 32,
18+
"url": "https://path/to/image.jpg"
19+
}
20+
]
21+
}' \
22+
"https://app.datadoghq.com/api/v1/screen?api_key=${api_key}&application_key=${app_key}" | jq '.id')
23+
24+
# Share it
25+
curl -X GET \
26+
"https://app.datadoghq.com/api/v1/screen/share/${board_id}?api_key=${api_key}&application_key=${app_key}"
27+
28+
# Revoke the sharing
29+
curl -X DELETE \
30+
"https://app.datadoghq.com/api/v1/screen/share/${board_id}?api_key=${api_key}&application_key=${app_key}"

content/api/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,24 @@ <h5>Example Response</h5>
11781178
</div>
11791179
</div>
11801180

1181+
<!-- revoke a screenboard -->
1182+
<h4 id="screenboards-revoke">Revoke a shared a Screenboard</h4>
1183+
<div class="row-fluid">
1184+
<%= left_side_div %>
1185+
<p>Revoke a currently shared screenboard's.</p>
1186+
<h5>Arguments</h5>
1187+
<%= no_args %>
1188+
</div>
1189+
<%= right_side_div %>
1190+
<h5>Signature</h5>
1191+
<code>DELETE /api/v1/screen/share/:board_id</code>
1192+
<h5>Example Request</h5>
1193+
<%= snippet_code_block "api-screenboard-revoke.sh" %>
1194+
<h5>Example Response</h5>
1195+
<%= no_response %>
1196+
</div>
1197+
</div>
1198+
11811199

11821200
<!--
11831201
=====================================================================

content/api/screenboards.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Endpoints
3535
- update: `PUT /api/v1/screen/{board_id}`
3636
- delete: `DELETE /api/v1/screen/{board_id}`
3737
- sharing `GET /api/v1/screen/share/{board_id}`
38+
- revoke sharing `DELETE /api/v1/screen/share/{board_id}`
3839

3940
For `create`/`read`/`update` endpoints, the body is one JSON payload describing the Screenboard.
4041

0 commit comments

Comments
 (0)