Skip to content

Commit 9fdf182

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 20922e6 of spec repo
1 parent da0d5e2 commit 9fdf182

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
@@ -83901,6 +83901,89 @@ components:
8390183901
type: string
8390283902
x-enum-varnames:
8390383903
- USERS
83904+
StegadographyGetWidgetsRequest:
83905+
description: Multipart form data containing the PNG image to scan for watermarks.
83906+
properties:
83907+
image:
83908+
description: PNG image file to scan for embedded watermarks.
83909+
example: "screenshot.png"
83910+
format: binary
83911+
type: string
83912+
required:
83913+
- image
83914+
type: object
83915+
StegadographyGetWidgetsResponse:
83916+
description: Response containing watermarked widgets recovered from an image.
83917+
properties:
83918+
data:
83919+
$ref: "#/components/schemas/StegadographyWidgetItems"
83920+
required:
83921+
- data
83922+
type: object
83923+
StegadographyWidget:
83924+
description: A single watermarked widget resource recovered from an image.
83925+
properties:
83926+
attributes:
83927+
$ref: "#/components/schemas/StegadographyWidgetAttributes"
83928+
id:
83929+
description: Composite identifier formed from the organization ID and watermark, separated by a colon.
83930+
example: "abc123:0123456789abcdef"
83931+
type: string
83932+
type:
83933+
$ref: "#/components/schemas/StegadographyWidgetType"
83934+
required:
83935+
- id
83936+
- type
83937+
- attributes
83938+
type: object
83939+
StegadographyWidgetAttributes:
83940+
description: Attributes of a watermarked widget recovered from an image.
83941+
properties:
83942+
locationx:
83943+
description: Horizontal pixel coordinate where the watermark was found in the image.
83944+
example: 100
83945+
format: int64
83946+
type: integer
83947+
locationy:
83948+
description: Vertical pixel coordinate where the watermark was found in the image.
83949+
example: 200
83950+
format: int64
83951+
type: integer
83952+
rawData:
83953+
description: JSON-encoded string representing the widget state.
83954+
example: '{"widgetType":"timeseries","requests":[]}'
83955+
type: string
83956+
watermark:
83957+
description: Hex-encoded watermark string identifying the widget.
83958+
example: "0123456789abcdef"
83959+
type: string
83960+
required:
83961+
- rawData
83962+
- watermark
83963+
- locationx
83964+
- locationy
83965+
type: object
83966+
StegadographyWidgetItems:
83967+
description: List of watermarked widget resources recovered from an image.
83968+
example:
83969+
- attributes:
83970+
locationx: 100
83971+
locationy: 200
83972+
rawData: '{"widgetType":"timeseries","requests":[]}'
83973+
watermark: "0123456789abcdef"
83974+
id: "abc123:0123456789abcdef"
83975+
type: widget
83976+
items:
83977+
$ref: "#/components/schemas/StegadographyWidget"
83978+
type: array
83979+
StegadographyWidgetType:
83980+
description: Stegadography widget resource type.
83981+
enum:
83982+
- widget
83983+
example: widget
83984+
type: string
83985+
x-enum-varnames:
83986+
- WIDGET
8390483987
Step:
8390583988
description: A Step is a sub-component of a workflow. Each Step performs an action.
8390683989
properties:
@@ -161903,6 +161986,75 @@ paths:
161903161986
- status_pages_settings_write
161904161987
- status_pages_public_page_publish
161905161988
- status_pages_internal_page_publish
161989+
/api/v2/stegadography/get-widgets:
161990+
post:
161991+
description: |-
161992+
Extracts watermarks from a PNG image and returns the cached widget data
161993+
associated with each watermark found. The image must be uploaded as a
161994+
`multipart/form-data` request with the file in the `image` field.
161995+
Only widgets belonging to the authenticated organization are returned.
161996+
operationId: GetStegadographyWidgets
161997+
requestBody:
161998+
content:
161999+
multipart/form-data:
162000+
examples:
162001+
default:
162002+
value:
162003+
image: "screenshot.png"
162004+
schema:
162005+
$ref: "#/components/schemas/StegadographyGetWidgetsRequest"
162006+
description: PNG image to extract watermarks from.
162007+
required: true
162008+
responses:
162009+
"200":
162010+
content:
162011+
application/json:
162012+
examples:
162013+
default:
162014+
value:
162015+
data:
162016+
- attributes:
162017+
locationx: 100
162018+
locationy: 200
162019+
rawData: '{"widgetType":"timeseries","requests":[]}'
162020+
watermark: "0123456789abcdef"
162021+
id: "abc123:0123456789abcdef"
162022+
type: widget
162023+
schema:
162024+
$ref: "#/components/schemas/StegadographyGetWidgetsResponse"
162025+
description: OK
162026+
"400":
162027+
content:
162028+
application/json:
162029+
schema:
162030+
$ref: "#/components/schemas/JSONAPIErrorResponse"
162031+
description: Bad Request
162032+
"403":
162033+
content:
162034+
application/json:
162035+
schema:
162036+
$ref: "#/components/schemas/JSONAPIErrorResponse"
162037+
description: Forbidden
162038+
"415":
162039+
content:
162040+
application/json:
162041+
schema:
162042+
$ref: "#/components/schemas/JSONAPIErrorResponse"
162043+
description: Unsupported Media Type
162044+
"429":
162045+
$ref: "#/components/responses/TooManyRequestsResponse"
162046+
"500":
162047+
content:
162048+
application/json:
162049+
schema:
162050+
$ref: "#/components/schemas/JSONAPIErrorResponse"
162051+
description: Internal Server Error
162052+
security:
162053+
- apiKeyAuth: []
162054+
appKeyAuth: []
162055+
summary: Get widgets from an image
162056+
tags:
162057+
- Stegadography
161906162058
/api/v2/synthetics/api-multistep/subtests/{public_id}:
161907162059
get:
161908162060
description: |-
@@ -170201,6 +170353,8 @@ tags:
170201170353
name: Static Analysis
170202170354
- 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.
170203170355
name: Status Pages
170356+
- description: Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.
170357+
name: Stegadography
170204170358
- description: |-
170205170359
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.
170206170360
name: Storage Management

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,13 @@ datadog\_api\_client.v2.api.status\_pages\_api module
753753
:members:
754754
:show-inheritance:
755755

756+
datadog\_api\_client.v2.api.stegadography\_api module
757+
-----------------------------------------------------
758+
759+
.. automodule:: datadog_api_client.v2.api.stegadography_api
760+
:members:
761+
:show-inheritance:
762+
756763
datadog\_api\_client.v2.api.storage\_management\_api module
757764
-----------------------------------------------------------
758765

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36607,6 +36607,41 @@ datadog\_api\_client.v2.model.status\_pages\_user\_type module
3660736607
:members:
3660836608
:show-inheritance:
3660936609

36610+
datadog\_api\_client.v2.model.stegadography\_get\_widgets\_request module
36611+
-------------------------------------------------------------------------
36612+
36613+
.. automodule:: datadog_api_client.v2.model.stegadography_get_widgets_request
36614+
:members:
36615+
:show-inheritance:
36616+
36617+
datadog\_api\_client.v2.model.stegadography\_get\_widgets\_response module
36618+
--------------------------------------------------------------------------
36619+
36620+
.. automodule:: datadog_api_client.v2.model.stegadography_get_widgets_response
36621+
:members:
36622+
:show-inheritance:
36623+
36624+
datadog\_api\_client.v2.model.stegadography\_widget module
36625+
----------------------------------------------------------
36626+
36627+
.. automodule:: datadog_api_client.v2.model.stegadography_widget
36628+
:members:
36629+
:show-inheritance:
36630+
36631+
datadog\_api\_client.v2.model.stegadography\_widget\_attributes module
36632+
----------------------------------------------------------------------
36633+
36634+
.. automodule:: datadog_api_client.v2.model.stegadography_widget_attributes
36635+
:members:
36636+
:show-inheritance:
36637+
36638+
datadog\_api\_client.v2.model.stegadography\_widget\_type module
36639+
----------------------------------------------------------------
36640+
36641+
.. automodule:: datadog_api_client.v2.model.stegadography_widget_type
36642+
:members:
36643+
:show-inheritance:
36644+
3661036645
datadog\_api\_client.v2.model.step module
3661136646
-----------------------------------------
3661236647

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
@@ -105,6 +105,7 @@
105105
from datadog_api_client.v2.api.spans_metrics_api import SpansMetricsApi
106106
from datadog_api_client.v2.api.static_analysis_api import StaticAnalysisApi
107107
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
108+
from datadog_api_client.v2.api.stegadography_api import StegadographyApi
108109
from datadog_api_client.v2.api.storage_management_api import StorageManagementApi
109110
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
110111
from datadog_api_client.v2.api.teams_api import TeamsApi
@@ -224,6 +225,7 @@
224225
"SpansMetricsApi",
225226
"StaticAnalysisApi",
226227
"StatusPagesApi",
228+
"StegadographyApi",
227229
"StorageManagementApi",
228230
"SyntheticsApi",
229231
"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)