Get widgets from an image

POST https://api.ap1.datadoghq.com/api/v2/stegadography/get-widgetshttps://api.ap2.datadoghq.com/api/v2/stegadography/get-widgetshttps://api.datadoghq.eu/api/v2/stegadography/get-widgetshttps://api.ddog-gov.com/api/v2/stegadography/get-widgetshttps://api.us2.ddog-gov.com/api/v2/stegadography/get-widgetshttps://api.datadoghq.com/api/v2/stegadography/get-widgetshttps://api.us3.datadoghq.com/api/v2/stegadography/get-widgetshttps://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.

Expand All

Field

Type

Description

image [required]

binary

PNG image file to scan for embedded watermarks.

{
  "image": "screenshot.png"
}

Response

OK

Response containing watermarked widgets recovered from an image.

Expand All

Field

Type

Description

data [required]

[object]

List of watermarked widget resources recovered from an image.

attributes [required]

object

Attributes of a watermarked widget recovered from an image.

locationx [required]

int64

Horizontal pixel coordinate where the watermark was found in the image.

locationy [required]

int64

Vertical pixel coordinate where the watermark was found in the image.

rawData [required]

string

JSON-encoded string representing the widget state.

watermark [required]

string

Hex-encoded watermark string identifying the widget.

id [required]

string

Composite identifier formed from the organization ID and watermark, separated by a colon.

type [required]

enum

Stegadography widget resource type. Allowed enum values: widget

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

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

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

Unsupported Media Type

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Internal Server Error

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

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

Code Example

                  ## default
# 

# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.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