---
title: Stegadography
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Stegadography
---

# Stegadography

Extract watermarks embedded in dashboard screenshots to retrieve cached widget state.

## Get widgets from an image{% #get-widgets-from-an-image %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/stegadography/get-widgets |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/stegadography/get-widgets |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/stegadography/get-widgets      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/stegadography/get-widgets      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/stegadography/get-widgets  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/stegadography/get-widgets     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/stegadography/get-widgets |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/stegadography/get-widgets |

### Overview

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.

### Request

#### Body Data (required)

PNG image to extract watermarks from.

{% tab title="Model" %}

| Field                   | Type   | Description                                     |
| ----------------------- | ------ | ----------------------------------------------- |
| image [*required*] | binary | PNG image file to scan for embedded watermarks. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "image": "screenshot.png"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing watermarked widgets recovered from an image.

| Parent field | Field                        | Type     | Description                                                                               |
| ------------ | ---------------------------- | -------- | ----------------------------------------------------------------------------------------- |
|              | data [*required*]       | [object] | List of watermarked widget resources recovered from an image.                             |
| data         | attributes [*required*] | object   | Attributes of a watermarked widget recovered from an image.                               |
| attributes   | locationx [*required*]  | int64    | Horizontal pixel coordinate where the watermark was found in the image.                   |
| attributes   | locationy [*required*]  | int64    | Vertical pixel coordinate where the watermark was found in the image.                     |
| attributes   | rawData [*required*]    | string   | JSON-encoded string representing the widget state.                                        |
| attributes   | watermark [*required*]  | string   | Hex-encoded watermark string identifying the widget.                                      |
| data         | id [*required*]         | string   | Composite identifier formed from the organization ID and watermark, separated by a colon. |
| data         | type [*required*]       | enum     | Stegadography widget resource type. Allowed enum values: `widget`                         |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "locationx": 100,
        "locationy": 200,
        "rawData": "{\"widgetType\":\"timeseries\",\"requests\":[]}",
        "watermark": "0123456789abcdef"
      },
      "id": "abc123:0123456789abcdef",
      "type": "widget"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="415" %}
Unsupported Media Type
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="500" %}
Internal Server Error
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v2/stegadography/get-widgets" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-F image=@string 
                
{% /tab %}
