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
154 changes: 154 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83901,6 +83901,89 @@ components:
type: string
x-enum-varnames:
- USERS
StegadographyGetWidgetsRequest:
description: Multipart form data containing the PNG image to scan for watermarks.
properties:
image:
description: PNG image file to scan for embedded watermarks.
example: "screenshot.png"
format: binary
type: string
required:
- image
type: object
StegadographyGetWidgetsResponse:
description: Response containing watermarked widgets recovered from an image.
properties:
data:
$ref: "#/components/schemas/StegadographyWidgetItems"
required:
- data
type: object
StegadographyWidget:
description: A single watermarked widget resource recovered from an image.
properties:
attributes:
$ref: "#/components/schemas/StegadographyWidgetAttributes"
id:
description: Composite identifier formed from the organization ID and watermark, separated by a colon.
example: "abc123:0123456789abcdef"
type: string
type:
$ref: "#/components/schemas/StegadographyWidgetType"
required:
- id
- type
- attributes
type: object
StegadographyWidgetAttributes:
description: Attributes of a watermarked widget recovered from an image.
properties:
locationx:
description: Horizontal pixel coordinate where the watermark was found in the image.
example: 100
format: int64
type: integer
locationy:
description: Vertical pixel coordinate where the watermark was found in the image.
example: 200
format: int64
type: integer
rawData:
description: JSON-encoded string representing the widget state.
example: '{"widgetType":"timeseries","requests":[]}'
type: string
watermark:
description: Hex-encoded watermark string identifying the widget.
example: "0123456789abcdef"
type: string
required:
- rawData
- watermark
- locationx
- locationy
type: object
StegadographyWidgetItems:
description: List of watermarked widget resources recovered from an image.
example:
- attributes:
locationx: 100
locationy: 200
rawData: '{"widgetType":"timeseries","requests":[]}'
watermark: "0123456789abcdef"
id: "abc123:0123456789abcdef"
type: widget
items:
$ref: "#/components/schemas/StegadographyWidget"
type: array
StegadographyWidgetType:
description: Stegadography widget resource type.
enum:
- widget
example: widget
type: string
x-enum-varnames:
- WIDGET
Step:
description: A Step is a sub-component of a workflow. Each Step performs an action.
properties:
Expand Down Expand Up @@ -161903,6 +161986,75 @@ paths:
- status_pages_settings_write
- status_pages_public_page_publish
- status_pages_internal_page_publish
/api/v2/stegadography/get-widgets:
post:
description: |-
Extracts watermarks from a PNG image and returns the cached widget data
associated with each watermark found. The image must be uploaded as a
`multipart/form-data` request with the file in the `image` field.
Only widgets belonging to the authenticated organization are returned.
operationId: GetStegadographyWidgets
requestBody:
content:
multipart/form-data:
examples:
default:
value:
image: "screenshot.png"
schema:
$ref: "#/components/schemas/StegadographyGetWidgetsRequest"
description: PNG image to extract watermarks from.
required: true
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
locationx: 100
locationy: 200
rawData: '{"widgetType":"timeseries","requests":[]}'
watermark: "0123456789abcdef"
id: "abc123:0123456789abcdef"
type: widget
schema:
$ref: "#/components/schemas/StegadographyGetWidgetsResponse"
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
/api/v2/synthetics/api-multistep/subtests/{public_id}:
get:
description: |-
Expand Down Expand Up @@ -170201,6 +170353,8 @@ tags:
name: Static Analysis
- description: Manage your status pages and communicate service disruptions to stakeholders via Datadog's API. See the [Status Pages documentation](https://docs.datadoghq.com/incident_response/status_pages/) for more information.
name: Status Pages
- description: Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.
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
17 changes: 17 additions & 0 deletions examples/v2/stegadography/GetStegadographyWidgets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Get widgets from an image returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.StegadographyApi(configuration);

apiInstance
.getStegadographyWidgets()

Check failure on line 11 in examples/v2/stegadography/GetStegadographyWidgets.ts

View workflow job for this annotation

GitHub Actions / examples / examples

Expected 1-2 arguments, but got 0.
.then((data: v2.StegadographyGetWidgetsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
7 changes: 7 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14272,6 +14272,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "{}",
},
"v2.GetStegadographyWidgets": {
"image": {
"type": "HttpFile",
"format": "binary",
},
"operationResponseType": "StegadographyGetWidgetsResponse",
},
"v2.GetApiMultistepSubtests": {
"publicId": {
"type": "string",
Expand Down
25 changes: 25 additions & 0 deletions features/v2/stegadography.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@endpoint(stegadography) @endpoint(stegadography-v2)
Feature: Stegadography
Extract watermarks embedded in dashboard screenshots to retrieve cached
widget state.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "Stegadography" API
And new "GetStegadographyWidgets" request

@generated @skip @team:DataDog/dataviz-backend-maintainers
Scenario: Get widgets from an image returns "Bad Request" response
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/dataviz-backend-maintainers
Scenario: Get widgets from an image returns "OK" response
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/dataviz-backend-maintainers
Scenario: Get widgets from an image returns "Unsupported Media Type" response
When the request is sent
Then the response status is 415 Unsupported Media Type
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7640,6 +7640,12 @@
"type": "idempotent"
}
},
"GetStegadographyWidgets": {
"tag": "Stegadography",
"undo": {
"type": "safe"
}
},
"GetApiMultistepSubtests": {
"tag": "Synthetics",
"undo": {
Expand Down
Loading
Loading