Skip to content

Commit 0f9bc54

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7650f8e of spec repo
1 parent ca9983b commit 0f9bc54

15 files changed

Lines changed: 549 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86462,6 +86462,89 @@ components:
8646286462
required:
8646386463
- data
8646486464
type: object
86465+
StegadographyGetWidgetsRequest:
86466+
description: Multipart form data containing the PNG image to scan for watermarks.
86467+
properties:
86468+
image:
86469+
description: PNG image file to scan for embedded watermarks.
86470+
example: "screenshot.png"
86471+
format: binary
86472+
type: string
86473+
required:
86474+
- image
86475+
type: object
86476+
StegadographyGetWidgetsResponse:
86477+
description: Response containing watermarked widgets recovered from an image.
86478+
properties:
86479+
data:
86480+
$ref: "#/components/schemas/StegadographyWidgetItems"
86481+
required:
86482+
- data
86483+
type: object
86484+
StegadographyWidget:
86485+
description: A single watermarked widget resource recovered from an image.
86486+
properties:
86487+
attributes:
86488+
$ref: "#/components/schemas/StegadographyWidgetAttributes"
86489+
id:
86490+
description: Composite identifier formed from the organization ID and watermark, separated by a colon.
86491+
example: "abc123:0123456789abcdef"
86492+
type: string
86493+
type:
86494+
$ref: "#/components/schemas/StegadographyWidgetType"
86495+
required:
86496+
- id
86497+
- type
86498+
- attributes
86499+
type: object
86500+
StegadographyWidgetAttributes:
86501+
description: Attributes of a watermarked widget recovered from an image.
86502+
properties:
86503+
locationx:
86504+
description: Horizontal pixel coordinate where the watermark was found in the image.
86505+
example: 100
86506+
format: int64
86507+
type: integer
86508+
locationy:
86509+
description: Vertical pixel coordinate where the watermark was found in the image.
86510+
example: 200
86511+
format: int64
86512+
type: integer
86513+
rawData:
86514+
description: JSON-encoded string representing the widget state.
86515+
example: '{"widgetType":"timeseries","requests":[]}'
86516+
type: string
86517+
watermark:
86518+
description: Hex-encoded watermark string identifying the widget.
86519+
example: "0123456789abcdef"
86520+
type: string
86521+
required:
86522+
- rawData
86523+
- watermark
86524+
- locationx
86525+
- locationy
86526+
type: object
86527+
StegadographyWidgetItems:
86528+
description: List of watermarked widget resources recovered from an image.
86529+
example:
86530+
- attributes:
86531+
locationx: 100
86532+
locationy: 200
86533+
rawData: '{"widgetType":"timeseries","requests":[]}'
86534+
watermark: "0123456789abcdef"
86535+
id: "abc123:0123456789abcdef"
86536+
type: widget
86537+
items:
86538+
$ref: "#/components/schemas/StegadographyWidget"
86539+
type: array
86540+
StegadographyWidgetType:
86541+
description: Stegadography widget resource type.
86542+
enum:
86543+
- widget
86544+
example: widget
86545+
type: string
86546+
x-enum-varnames:
86547+
- WIDGET
8646586548
Step:
8646686549
description: A Step is a sub-component of a workflow. Each Step performs an action.
8646786550
properties:
@@ -166854,6 +166937,75 @@ paths:
166854166937
- status_pages_settings_write
166855166938
- status_pages_public_page_publish
166856166939
- status_pages_internal_page_publish
166940+
/api/v2/stegadography/get-widgets:
166941+
post:
166942+
description: |-
166943+
Extracts watermarks from a PNG image and returns the cached widget data
166944+
associated with each watermark found. The image must be uploaded as a
166945+
`multipart/form-data` request with the file in the `image` field.
166946+
Only widgets belonging to the authenticated organization are returned.
166947+
operationId: GetStegadographyWidgets
166948+
requestBody:
166949+
content:
166950+
multipart/form-data:
166951+
examples:
166952+
default:
166953+
value:
166954+
image: "screenshot.png"
166955+
schema:
166956+
$ref: "#/components/schemas/StegadographyGetWidgetsRequest"
166957+
description: PNG image to extract watermarks from.
166958+
required: true
166959+
responses:
166960+
"200":
166961+
content:
166962+
application/json:
166963+
examples:
166964+
default:
166965+
value:
166966+
data:
166967+
- attributes:
166968+
locationx: 100
166969+
locationy: 200
166970+
rawData: '{"widgetType":"timeseries","requests":[]}'
166971+
watermark: "0123456789abcdef"
166972+
id: "abc123:0123456789abcdef"
166973+
type: widget
166974+
schema:
166975+
$ref: "#/components/schemas/StegadographyGetWidgetsResponse"
166976+
description: OK
166977+
"400":
166978+
content:
166979+
application/json:
166980+
schema:
166981+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166982+
description: Bad Request
166983+
"403":
166984+
content:
166985+
application/json:
166986+
schema:
166987+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166988+
description: Forbidden
166989+
"415":
166990+
content:
166991+
application/json:
166992+
schema:
166993+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166994+
description: Unsupported Media Type
166995+
"429":
166996+
$ref: "#/components/responses/TooManyRequestsResponse"
166997+
"500":
166998+
content:
166999+
application/json:
167000+
schema:
167001+
$ref: "#/components/schemas/JSONAPIErrorResponse"
167002+
description: Internal Server Error
167003+
security:
167004+
- apiKeyAuth: []
167005+
appKeyAuth: []
167006+
summary: Get widgets from an image
167007+
tags:
167008+
- Stegadography
166857167009
/api/v2/synthetics/api-multistep/subtests/{public_id}:
166858167010
get:
166859167011
description: |-
@@ -175167,6 +175319,8 @@ tags:
175167175319
externalDocs:
175168175320
url: https://docs.datadoghq.com/api/latest/statuspage-integration
175169175321
name: Statuspage Integration
175322+
- description: Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.
175323+
name: Stegadography
175170175324
- description: |-
175171175325
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.
175172175326
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
@@ -37580,6 +37580,41 @@ datadog\_api\_client.v2.model.statuspage\_url\_settings\_response module
3758037580
:members:
3758137581
:show-inheritance:
3758237582

37583+
datadog\_api\_client.v2.model.stegadography\_get\_widgets\_request module
37584+
-------------------------------------------------------------------------
37585+
37586+
.. automodule:: datadog_api_client.v2.model.stegadography_get_widgets_request
37587+
:members:
37588+
:show-inheritance:
37589+
37590+
datadog\_api\_client.v2.model.stegadography\_get\_widgets\_response module
37591+
--------------------------------------------------------------------------
37592+
37593+
.. automodule:: datadog_api_client.v2.model.stegadography_get_widgets_response
37594+
:members:
37595+
:show-inheritance:
37596+
37597+
datadog\_api\_client.v2.model.stegadography\_widget module
37598+
----------------------------------------------------------
37599+
37600+
.. automodule:: datadog_api_client.v2.model.stegadography_widget
37601+
:members:
37602+
:show-inheritance:
37603+
37604+
datadog\_api\_client.v2.model.stegadography\_widget\_attributes module
37605+
----------------------------------------------------------------------
37606+
37607+
.. automodule:: datadog_api_client.v2.model.stegadography_widget_attributes
37608+
:members:
37609+
:show-inheritance:
37610+
37611+
datadog\_api\_client.v2.model.stegadography\_widget\_type module
37612+
----------------------------------------------------------------
37613+
37614+
.. automodule:: datadog_api_client.v2.model.stegadography_widget_type
37615+
:members:
37616+
:show-inheritance:
37617+
3758337618
datadog\_api\_client.v2.model.step module
3758437619
-----------------------------------------
3758537620

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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
request contains "image" parameter with value "screenshot.png"
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)