Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86739,6 +86739,77 @@ components:
required:
- data
type: object
StegadographyGetWidgetsFormData:
description: The form data submitted to look up widgets from a watermarked image.
properties:
image:
description: A PNG image (for example, a dashboard screenshot) containing embedded widget watermarks.
format: binary
type: string
x-mimetype: image/png
type: object
StegadographyWidgetAttributes:
description: Attributes of a widget recovered from an image watermark.
properties:
locationx:
description: Horizontal pixel coordinate of the watermark within the image.
example: 120
format: int64
type: integer
locationy:
description: Vertical pixel coordinate of the watermark within the image.
example: 240
format: int64
type: integer
rawData:
description: Stored snapshot of the widget state, returned exactly as it was cached.
example: '{"definition":{"type":"timeseries"}}'
type: string
watermark:
description: The watermark value extracted from the image that this widget was matched against.
example: "abc123"
type: string
required:
- rawData
- watermark
- locationx
- locationy
type: object
StegadographyWidgetData:
description: A single widget recovered from an image watermark.
properties:
attributes:
$ref: "#/components/schemas/StegadographyWidgetAttributes"
id:
description: Identifier of the cached widget, scoped to the organization.
example: "1a2b:abc123"
type: string
type:
$ref: "#/components/schemas/StegadographyWidgetType"
required:
- id
- type
- attributes
type: object
StegadographyWidgetType:
description: Widget resource type.
enum:
- widget
example: widget
type: string
x-enum-varnames:
- WIDGET
StegadographyWidgetsResponse:
description: Response containing the widgets recovered from the uploaded image.
properties:
data:
description: List of widgets matched to watermarks found in the image.
items:
$ref: "#/components/schemas/StegadographyWidgetData"
type: array
required:
- data
type: object
Step:
description: A Step is a sub-component of a workflow. Each Step performs an action.
properties:
Expand Down Expand Up @@ -167338,6 +167409,76 @@ paths:
- status_pages_settings_write
- status_pages_public_page_publish
- status_pages_internal_page_publish
/api/v2/stegadography/get-widgets:
post:
description: |-
Extracts embedded watermarks from an uploaded PNG image (for example, a dashboard screenshot)
and returns the cached widget state matching each watermark found.
operationId: GetWidgetsFromImage
requestBody:
content:
multipart/form-data:
examples:
default:
value: {}
schema:
$ref: "#/components/schemas/StegadographyGetWidgetsFormData"
description: The image to extract widget watermarks from.
required: true
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
locationx: 120
locationy: 240
rawData: '{"definition":{"type":"timeseries"}}'
watermark: "abc123"
id: "1a2b:abc123"
type: widget
schema:
$ref: "#/components/schemas/StegadographyWidgetsResponse"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"415":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Unsupported Media Type
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
"500":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Internal Server Error
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Get widgets from an image
tags:
- Stegadography
x-codegen-request-body-name: body
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/synthetics/api-multistep/subtests/{public_id}:
get:
description: |-
Expand Down Expand Up @@ -175651,6 +175792,8 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/api/latest/statuspage-integration
name: Statuspage Integration
- description: Recover dashboard widget data from watermarks embedded in images.
name: Stegadography
- description: |-
Enable Storage Management for S3 buckets, GCS buckets, and Azure containers. Each configuration registers the destination that holds inventory reports for the storage being monitored.
name: Storage Management
Expand Down
25 changes: 25 additions & 0 deletions examples/v2/stegadography/GetWidgetsFromImage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Get widgets from an image returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StegadographyApi;
import com.datadog.api.client.v2.model.StegadographyWidgetsResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getWidgetsFromImage", true);
StegadographyApi apiInstance = new StegadographyApi(defaultClient);

try {
StegadographyWidgetsResponse result = apiInstance.getWidgetsFromImage();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StegadographyApi#getWidgetsFromImage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
1 change: 1 addition & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@ public class ApiClient {
put("v2.revertCustomRuleRevision", false);
put("v2.updateAiCustomRuleset", false);
put("v2.updateCustomRuleset", false);
put("v2.getWidgetsFromImage", false);
put("v2.addMemberTeam", false);
put("v2.listMemberTeams", false);
put("v2.removeMemberTeam", false);
Expand Down
Loading
Loading