Skip to content

Commit 91ffd9c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b873e26 of spec repo
1 parent eb0c868 commit 91ffd9c

14 files changed

Lines changed: 531 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86739,6 +86739,89 @@ components:
8673986739
required:
8674086740
- data
8674186741
type: object
86742+
StegadographyGetWidgetsRequest:
86743+
description: Multipart form data containing the PNG image to scan for watermarks.
86744+
properties:
86745+
image:
86746+
description: PNG image file to scan for embedded watermarks.
86747+
example: ""
86748+
format: binary
86749+
type: string
86750+
required:
86751+
- image
86752+
type: object
86753+
StegadographyGetWidgetsResponse:
86754+
description: Response containing watermarked widgets recovered from an image.
86755+
properties:
86756+
data:
86757+
$ref: "#/components/schemas/StegadographyWidgetItems"
86758+
required:
86759+
- data
86760+
type: object
86761+
StegadographyWidget:
86762+
description: A single watermarked widget resource recovered from an image.
86763+
properties:
86764+
attributes:
86765+
$ref: "#/components/schemas/StegadographyWidgetAttributes"
86766+
id:
86767+
description: Composite identifier formed from the organization ID and watermark, separated by a colon.
86768+
example: "abc123:0123456789abcdef"
86769+
type: string
86770+
type:
86771+
$ref: "#/components/schemas/StegadographyWidgetType"
86772+
required:
86773+
- id
86774+
- type
86775+
- attributes
86776+
type: object
86777+
StegadographyWidgetAttributes:
86778+
description: Attributes of a watermarked widget recovered from an image.
86779+
properties:
86780+
locationx:
86781+
description: Horizontal pixel coordinate where the watermark was found in the image.
86782+
example: 100
86783+
format: int64
86784+
type: integer
86785+
locationy:
86786+
description: Vertical pixel coordinate where the watermark was found in the image.
86787+
example: 200
86788+
format: int64
86789+
type: integer
86790+
rawData:
86791+
description: JSON-encoded string representing the widget state.
86792+
example: '{"widgetType":"timeseries","requests":[]}'
86793+
type: string
86794+
watermark:
86795+
description: Hex-encoded watermark string identifying the widget.
86796+
example: "0123456789abcdef"
86797+
type: string
86798+
required:
86799+
- rawData
86800+
- watermark
86801+
- locationx
86802+
- locationy
86803+
type: object
86804+
StegadographyWidgetItems:
86805+
description: List of watermarked widget resources recovered from an image.
86806+
example:
86807+
- attributes:
86808+
locationx: 100
86809+
locationy: 200
86810+
rawData: '{"widgetType":"timeseries","requests":[]}'
86811+
watermark: "0123456789abcdef"
86812+
id: "abc123:0123456789abcdef"
86813+
type: widget
86814+
items:
86815+
$ref: "#/components/schemas/StegadographyWidget"
86816+
type: array
86817+
StegadographyWidgetType:
86818+
description: Stegadography widget resource type.
86819+
enum:
86820+
- widget
86821+
example: widget
86822+
type: string
86823+
x-enum-varnames:
86824+
- WIDGET
8674286825
Step:
8674386826
description: A Step is a sub-component of a workflow. Each Step performs an action.
8674486827
properties:
@@ -167338,6 +167421,75 @@ paths:
167338167421
- status_pages_settings_write
167339167422
- status_pages_public_page_publish
167340167423
- status_pages_internal_page_publish
167424+
/api/v2/stegadography/get-widgets:
167425+
post:
167426+
description: |-
167427+
Extracts watermarks from a PNG image and returns the cached widget data
167428+
associated with each watermark found. The image must be uploaded as a
167429+
`multipart/form-data` request with the file in the `image` field.
167430+
Only widgets belonging to the authenticated organization are returned.
167431+
operationId: GetStegadographyWidgets
167432+
requestBody:
167433+
content:
167434+
multipart/form-data:
167435+
examples:
167436+
default:
167437+
value:
167438+
image: "screenshot.png"
167439+
schema:
167440+
$ref: "#/components/schemas/StegadographyGetWidgetsRequest"
167441+
description: PNG image to extract watermarks from.
167442+
required: true
167443+
responses:
167444+
"200":
167445+
content:
167446+
application/json:
167447+
examples:
167448+
default:
167449+
value:
167450+
data:
167451+
- attributes:
167452+
locationx: 100
167453+
locationy: 200
167454+
rawData: '{"widgetType":"timeseries","requests":[]}'
167455+
watermark: "0123456789abcdef"
167456+
id: "abc123:0123456789abcdef"
167457+
type: widget
167458+
schema:
167459+
$ref: "#/components/schemas/StegadographyGetWidgetsResponse"
167460+
description: OK
167461+
"400":
167462+
content:
167463+
application/json:
167464+
schema:
167465+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167466+
description: Bad Request
167467+
"403":
167468+
content:
167469+
application/json:
167470+
schema:
167471+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167472+
description: Forbidden
167473+
"415":
167474+
content:
167475+
application/json:
167476+
schema:
167477+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167478+
description: Unsupported Media Type
167479+
"429":
167480+
$ref: "#/components/responses/TooManyRequestsResponse"
167481+
"500":
167482+
content:
167483+
application/json:
167484+
schema:
167485+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167486+
description: Internal Server Error
167487+
security:
167488+
- apiKeyAuth: []
167489+
appKeyAuth: []
167490+
summary: Get widgets from an image
167491+
tags:
167492+
- Stegadography
167341167493
/api/v2/synthetics/api-multistep/subtests/{public_id}:
167342167494
get:
167343167495
description: |-
@@ -175651,6 +175803,8 @@ tags:
175651175803
externalDocs:
175652175804
url: https://docs.datadoghq.com/api/latest/statuspage-integration
175653175805
name: Statuspage Integration
175806+
- description: Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.
175807+
name: Stegadography
175654175808
- description: |-
175655175809
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.
175656175810
name: Storage Management

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,13 @@ datadog\_api\_client.v2.api.statuspage\_integration\_api module
774774
:members:
775775
:show-inheritance:
776776

777+
datadog\_api\_client.v2.api.stegadography\_api module
778+
-----------------------------------------------------
779+
780+
.. automodule:: datadog_api_client.v2.api.stegadography_api
781+
:members:
782+
:show-inheritance:
783+
777784
datadog\_api\_client.v2.api.storage\_management\_api module
778785
-----------------------------------------------------------
779786

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37727,6 +37727,41 @@ datadog\_api\_client.v2.model.statuspage\_url\_settings\_response module
3772737727
:members:
3772837728
:show-inheritance:
3772937729

37730+
datadog\_api\_client.v2.model.stegadography\_get\_widgets\_request module
37731+
-------------------------------------------------------------------------
37732+
37733+
.. automodule:: datadog_api_client.v2.model.stegadography_get_widgets_request
37734+
:members:
37735+
:show-inheritance:
37736+
37737+
datadog\_api\_client.v2.model.stegadography\_get\_widgets\_response module
37738+
--------------------------------------------------------------------------
37739+
37740+
.. automodule:: datadog_api_client.v2.model.stegadography_get_widgets_response
37741+
:members:
37742+
:show-inheritance:
37743+
37744+
datadog\_api\_client.v2.model.stegadography\_widget module
37745+
----------------------------------------------------------
37746+
37747+
.. automodule:: datadog_api_client.v2.model.stegadography_widget
37748+
:members:
37749+
:show-inheritance:
37750+
37751+
datadog\_api\_client.v2.model.stegadography\_widget\_attributes module
37752+
----------------------------------------------------------------------
37753+
37754+
.. automodule:: datadog_api_client.v2.model.stegadography_widget_attributes
37755+
:members:
37756+
:show-inheritance:
37757+
37758+
datadog\_api\_client.v2.model.stegadography\_widget\_type module
37759+
----------------------------------------------------------------
37760+
37761+
.. automodule:: datadog_api_client.v2.model.stegadography_widget_type
37762+
:members:
37763+
:show-inheritance:
37764+
3773037765
datadog\_api\_client.v2.model.step module
3773137766
-----------------------------------------
3773237767

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get widgets from an image returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.stegadography_api import StegadographyApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = StegadographyApi(api_client)
11+
response = api_instance.get_stegadography_widgets()
12+
13+
print(response)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Any, Dict
7+
8+
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
9+
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.model_utils import (
11+
file_type,
12+
)
13+
from datadog_api_client.v2.model.stegadography_get_widgets_response import StegadographyGetWidgetsResponse
14+
15+
16+
class StegadographyApi:
17+
"""
18+
Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.
19+
"""
20+
21+
def __init__(self, api_client=None):
22+
if api_client is None:
23+
api_client = ApiClient(Configuration())
24+
self.api_client = api_client
25+
26+
self._get_stegadography_widgets_endpoint = _Endpoint(
27+
settings={
28+
"response_type": (StegadographyGetWidgetsResponse,),
29+
"auth": ["apiKeyAuth", "appKeyAuth"],
30+
"endpoint_path": "/api/v2/stegadography/get-widgets",
31+
"operation_id": "get_stegadography_widgets",
32+
"http_method": "POST",
33+
"version": "v2",
34+
},
35+
params_map={
36+
"image": {
37+
"required": True,
38+
"openapi_types": (file_type,),
39+
"attribute": "image",
40+
"location": "form",
41+
},
42+
},
43+
headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]},
44+
api_client=api_client,
45+
)
46+
47+
def get_stegadography_widgets(
48+
self,
49+
image: file_type,
50+
) -> StegadographyGetWidgetsResponse:
51+
"""Get widgets from an image.
52+
53+
Extracts watermarks from a PNG image and returns the cached widget data
54+
associated with each watermark found. The image must be uploaded as a
55+
``multipart/form-data`` request with the file in the ``image`` field.
56+
Only widgets belonging to the authenticated organization are returned.
57+
58+
:param image: PNG image file to scan for embedded watermarks.
59+
:type image: file_type
60+
:rtype: StegadographyGetWidgetsResponse
61+
"""
62+
kwargs: Dict[str, Any] = {}
63+
kwargs["image"] = image
64+
65+
return self._get_stegadography_widgets_endpoint.call_with_http_info(**kwargs)

src/datadog_api_client/v2/apis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
from datadog_api_client.v2.api.static_analysis_api import StaticAnalysisApi
109109
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
110110
from datadog_api_client.v2.api.statuspage_integration_api import StatuspageIntegrationApi
111+
from datadog_api_client.v2.api.stegadography_api import StegadographyApi
111112
from datadog_api_client.v2.api.storage_management_api import StorageManagementApi
112113
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
113114
from datadog_api_client.v2.api.teams_api import TeamsApi
@@ -231,6 +232,7 @@
231232
"StaticAnalysisApi",
232233
"StatusPagesApi",
233234
"StatuspageIntegrationApi",
235+
"StegadographyApi",
234236
"StorageManagementApi",
235237
"SyntheticsApi",
236238
"TeamsApi",
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
cached_property,
10+
file_type,
11+
)
12+
13+
14+
class StegadographyGetWidgetsRequest(ModelNormal):
15+
@cached_property
16+
def openapi_types(_):
17+
return {
18+
"image": (file_type,),
19+
}
20+
21+
attribute_map = {
22+
"image": "image",
23+
}
24+
25+
def __init__(self_, image: file_type, **kwargs):
26+
"""
27+
Multipart form data containing the PNG image to scan for watermarks.
28+
29+
:param image: PNG image file to scan for embedded watermarks.
30+
:type image: file_type
31+
"""
32+
super().__init__(kwargs)
33+
34+
self_.image = image

0 commit comments

Comments
 (0)