This product is not supported for your selected Datadog site. ().
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

Scorecards

API to create and update scorecard rules and outcomes. See Scorecards for more information.

POST https://api.ap1.datadoghq.com/api/v2/scorecard/ruleshttps://api.ap2.datadoghq.com/api/v2/scorecard/ruleshttps://api.datadoghq.eu/api/v2/scorecard/ruleshttps://api.ddog-gov.com/api/v2/scorecard/ruleshttps://api.datadoghq.com/api/v2/scorecard/ruleshttps://api.us3.datadoghq.com/api/v2/scorecard/ruleshttps://api.us5.datadoghq.com/api/v2/scorecard/rules

概要

Creates a new rule.

OAuth apps require the apm_service_catalog_write authorization scope to access this endpoint.

リクエスト

Body Data (required)

Rule attributes.

Expand All

フィールド

種類

説明

data

object

Scorecard create rule request data.

attributes

object

Attributes for creating or updating a rule. Server-managed fields (created_at, modified_at, custom) are excluded.

description

string

Explanation of the rule.

enabled

boolean

If enabled, the rule is calculated as part of the score.

level

int32

The maturity level of the rule (1, 2, or 3).

name

string

Name of the rule.

owner

string

Owner of the rule.

scope_query

string

A query to filter which entities this rule applies to.

scorecard_name

string

The scorecard name to which this rule must belong.

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

{
  "data": {
    "attributes": {
      "enabled": true,
      "name": "Example-Scorecard",
      "scorecard_name": "Observability Best Practices"
    },
    "type": "rule"
  }
}

応答

Created

Created rule in response.

Expand All

フィールド

種類

説明

data

object

Create rule response data.

attributes

object

Details of a rule.

category

string

DEPRECATED: The scorecard name to which this rule must belong.

created_at

date-time

Creation time of the rule outcome.

custom

boolean

Defines if the rule is a custom rule.

description

string

Explanation of the rule.

enabled

boolean

If enabled, the rule is calculated as part of the score.

level

int32

The maturity level of the rule (1, 2, or 3).

modified_at

date-time

Time of the last rule outcome modification.

name

string

Name of the rule.

owner

string

Owner of the rule.

scope_query

string

A query to filter which entities this rule applies to.

scorecard_name

string

The scorecard name to which this rule must belong.

id

string

The unique ID for a scorecard rule.

relationships

object

Scorecard create rule response relationship.

scorecard

object

Relationship data for a rule.

data

object

Rule relationship data.

id

string

The unique ID for a scorecard.

type

enum

The JSON:API type for scorecard. Allowed enum values: scorecard

default: scorecard

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

{
  "data": {
    "attributes": {
      "category": "string",
      "created_at": "2019-09-19T10:00:00.000Z",
      "custom": false,
      "description": "string",
      "enabled": true,
      "level": 2,
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "Team Defined",
      "owner": "string",
      "scope_query": "kind:service",
      "scorecard_name": "Deployments automated via Deployment Trains"
    },
    "id": "q8MQxk8TCqrHnWkx",
    "relationships": {
      "scorecard": {
        "data": {
          "id": "q8MQxk8TCqrHnWkp",
          "type": "scorecard"
        }
      }
    },
    "type": "rule"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                          ## 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/rules" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "enabled": true, "name": "My Rule", "owner": "Datadog", "scorecard_name": "My Scorecard" }, "type": "rule" } } EOF

PUT https://api.ap1.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.ap2.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.datadoghq.eu/api/v2/scorecard/rules/{rule_id}https://api.ddog-gov.com/api/v2/scorecard/rules/{rule_id}https://api.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.us3.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.us5.datadoghq.com/api/v2/scorecard/rules/{rule_id}

概要

Updates an existing rule.

OAuth apps require the apm_service_catalog_write authorization scope to access this endpoint.

引数

パスパラメーター

名前

種類

説明

rule_id [required]

string

The ID of the rule.

リクエスト

Body Data (required)

Rule attributes.

Expand All

フィールド

種類

説明

data

object

Data for the request to update a scorecard rule.

attributes

object

Attributes for creating or updating a rule. Server-managed fields (created_at, modified_at, custom) are excluded.

description

string

Explanation of the rule.

enabled

boolean

If enabled, the rule is calculated as part of the score.

level

int32

The maturity level of the rule (1, 2, or 3).

name

string

Name of the rule.

owner

string

Owner of the rule.

scope_query

string

A query to filter which entities this rule applies to.

scorecard_name

string

The scorecard name to which this rule must belong.

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

{
  "data": {
    "type": "rule",
    "attributes": {
      "enabled": true,
      "name": "Team Defined",
      "scorecard_name": "Deployments automated via Deployment Trains",
      "description": "Updated description via test"
    }
  }
}

応答

Rule updated successfully

The response from a rule update request.

Expand All

フィールド

種類

説明

data

object

The data for a rule update response.

attributes

object

Details of a rule.

category

string

DEPRECATED: The scorecard name to which this rule must belong.

created_at

date-time

Creation time of the rule outcome.

custom

boolean

Defines if the rule is a custom rule.

description

string

Explanation of the rule.

enabled

boolean

If enabled, the rule is calculated as part of the score.

level

int32

The maturity level of the rule (1, 2, or 3).

modified_at

date-time

Time of the last rule outcome modification.

name

string

Name of the rule.

owner

string

Owner of the rule.

scope_query

string

A query to filter which entities this rule applies to.

scorecard_name

string

The scorecard name to which this rule must belong.

id

string

The unique ID for a scorecard rule.

relationships

object

Scorecard create rule response relationship.

scorecard

object

Relationship data for a rule.

data

object

Rule relationship data.

id

string

The unique ID for a scorecard.

type

enum

The JSON:API type for scorecard. Allowed enum values: scorecard

default: scorecard

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

{
  "data": {
    "attributes": {
      "category": "string",
      "created_at": "2019-09-19T10:00:00.000Z",
      "custom": false,
      "description": "string",
      "enabled": true,
      "level": 2,
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "Team Defined",
      "owner": "string",
      "scope_query": "kind:service",
      "scorecard_name": "Deployments automated via Deployment Trains"
    },
    "id": "q8MQxk8TCqrHnWkx",
    "relationships": {
      "scorecard": {
        "data": {
          "id": "q8MQxk8TCqrHnWkp",
          "type": "scorecard"
        }
      }
    },
    "type": "rule"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                          ## default
# 

# Path parameters
export rule_id="CHANGE_ME"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/rules/${rule_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "description": "Updated Description", "enabled": false, "name": "Updated Rule", "owner": "team:updated-team", "scope_query": "kind:service", "scorecard_name": "Updated Scorecard" }, "type": "rule" } } EOF

POST https://api.ap1.datadoghq.com/api/v2/scorecard/outcomeshttps://api.ap2.datadoghq.com/api/v2/scorecard/outcomeshttps://api.datadoghq.eu/api/v2/scorecard/outcomeshttps://api.ddog-gov.com/api/v2/scorecard/outcomeshttps://api.datadoghq.com/api/v2/scorecard/outcomeshttps://api.us3.datadoghq.com/api/v2/scorecard/outcomeshttps://api.us5.datadoghq.com/api/v2/scorecard/outcomes

概要

Updates multiple scorecard rule outcomes in a single batched request.

OAuth apps require the apm_service_catalog_write authorization scope to access this endpoint.

リクエスト

Body Data (required)

Set of scorecard outcomes.

Expand All

フィールド

種類

説明

data

object

Scorecard outcomes batch request data.

attributes

object

The JSON:API attributes for a batched set of scorecard outcomes.

results

[object]

Set of scorecard outcomes to update asynchronously.

entity_reference [required]

string

The unique reference for an IDP entity.

remarks

string

Any remarks regarding the scorecard rule's evaluation. Supports HTML hyperlinks.

rule_id [required]

string

The unique ID for a scorecard rule.

state [required]

enum

The state of the rule evaluation. Allowed enum values: pass,fail,skip

type

enum

The JSON:API type for scorecard outcomes. Allowed enum values: batched-outcome

default: batched-outcome

{
  "data": {
    "attributes": {
      "results": [
        {
          "rule_id": "q8MQxk8TCqrHnWkx",
          "entity_reference": "service:my-service",
          "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>",
          "state": "pass"
        }
      ]
    },
    "type": "batched-outcome"
  }
}

応答

Accepted

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Conflict

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                          # 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/outcomes" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "results": [ { "rule_id": "q8MQxk8TCqrHnWkx", "entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "state": "pass" } ] }, "type": "batched-outcome" } } EOF

GET https://api.ap1.datadoghq.com/api/v2/scorecard/outcomeshttps://api.ap2.datadoghq.com/api/v2/scorecard/outcomeshttps://api.datadoghq.eu/api/v2/scorecard/outcomeshttps://api.ddog-gov.com/api/v2/scorecard/outcomeshttps://api.datadoghq.com/api/v2/scorecard/outcomeshttps://api.us3.datadoghq.com/api/v2/scorecard/outcomeshttps://api.us5.datadoghq.com/api/v2/scorecard/outcomes

概要

Fetches all rule outcomes.

OAuth apps require the apm_service_catalog_read authorization scope to access this endpoint.

引数

クエリ文字列

名前

種類

説明

page[size]

integer

Size for a given page. The maximum allowed value is 100.

page[offset]

integer

Specific offset to use as the beginning of the returned page.

include

string

Include related rule details in the response.

fields[outcome]

string

Return only specified values in the outcome attributes.

fields[rule]

string

Return only specified values in the included rule details.

filter[outcome][service_name]

string

Filter outcomes on a specific service name.

filter[outcome][state]

string

Filter outcomes by a specific state.

filter[rule][enabled]

boolean

Filter outcomes based on whether a rule is enabled or disabled.

filter[rule][id]

string

Filter outcomes based on rule ID.

filter[rule][name]

string

Filter outcomes based on rule name.

応答

OK

Scorecard outcomes - the result of a rule for a service.

Expand All

フィールド

種類

説明

data

[object]

List of rule outcomes.

attributes

object

The JSON:API attributes for an outcome.

created_at

date-time

Creation time of the rule outcome.

modified_at

date-time

Time of last rule outcome modification.

remarks

string

Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks.

service_name

string

The unique name for a service in the catalog.

state

enum

The state of the rule evaluation. Allowed enum values: pass,fail,skip

id

string

The unique ID for a rule outcome.

relationships

object

The JSON:API relationship to a scorecard rule.

rule

object

The JSON:API relationship to a scorecard outcome.

data

object

The JSON:API relationship to an outcome, which returns the related rule id.

id

string

The unique ID for a scorecard rule.

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

type

enum

The JSON:API type for an outcome. Allowed enum values: outcome

default: outcome

included

[object]

Array of rule details.

attributes

object

Details of a rule.

name

string

Name of the rule.

scorecard_name

string

The scorecard name to which this rule must belong.

id

string

The unique ID for a scorecard rule.

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

links

object

Links attributes.

next

string

Link for the next set of results.

{
  "data": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "modified_at": "2019-09-19T10:00:00.000Z",
        "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>",
        "service_name": "my-service",
        "state": "pass"
      },
      "id": "string",
      "relationships": {
        "rule": {
          "data": {
            "id": "q8MQxk8TCqrHnWkx",
            "type": "rule"
          }
        }
      },
      "type": "outcome"
    }
  ],
  "included": [
    {
      "attributes": {
        "name": "Team Defined",
        "scorecard_name": "Observability Best Practices"
      },
      "id": "q8MQxk8TCqrHnWkx",
      "type": "rule"
    }
  ],
  "links": {
    "next": "/api/v2/scorecard/outcomes?include=rule\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=100"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/outcomes" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

GET https://api.ap1.datadoghq.com/api/v2/scorecard/ruleshttps://api.ap2.datadoghq.com/api/v2/scorecard/ruleshttps://api.datadoghq.eu/api/v2/scorecard/ruleshttps://api.ddog-gov.com/api/v2/scorecard/ruleshttps://api.datadoghq.com/api/v2/scorecard/ruleshttps://api.us3.datadoghq.com/api/v2/scorecard/ruleshttps://api.us5.datadoghq.com/api/v2/scorecard/rules

概要

Fetch all rules.

OAuth apps require the apm_service_catalog_read authorization scope to access this endpoint.

引数

クエリ文字列

名前

種類

説明

page[size]

integer

Size for a given page. The maximum allowed value is 100.

page[offset]

integer

Specific offset to use as the beginning of the returned page.

include

string

Include related scorecard details in the response.

filter[rule][id]

string

Filter the rules on a rule ID.

filter[rule][enabled]

boolean

Filter for enabled rules only.

filter[rule][custom]

boolean

Filter for custom rules only.

filter[rule][name]

string

Filter rules on the rule name.

filter[rule][description]

string

Filter rules on the rule description.

fields[rule]

string

Return only specific fields in the response for rule attributes.

fields[scorecard]

string

Return only specific fields in the included response for scorecard attributes.

応答

OK

Scorecard rules response.

Expand All

フィールド

種類

説明

data

[object]

Array of rule details.

attributes

object

Details of a rule.

category

string

DEPRECATED: The scorecard name to which this rule must belong.

created_at

date-time

Creation time of the rule outcome.

custom

boolean

Defines if the rule is a custom rule.

description

string

Explanation of the rule.

enabled

boolean

If enabled, the rule is calculated as part of the score.

level

int32

The maturity level of the rule (1, 2, or 3).

modified_at

date-time

Time of the last rule outcome modification.

name

string

Name of the rule.

owner

string

Owner of the rule.

scope_query

string

A query to filter which entities this rule applies to.

scorecard_name

string

The scorecard name to which this rule must belong.

id

string

The unique ID for a scorecard rule.

relationships

object

Scorecard create rule response relationship.

scorecard

object

Relationship data for a rule.

data

object

Rule relationship data.

id

string

The unique ID for a scorecard.

type

enum

The JSON:API type for scorecard. Allowed enum values: scorecard

default: scorecard

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

links

object

Links attributes.

next

string

Link for the next set of rules.

{
  "data": [
    {
      "attributes": {
        "category": "string",
        "created_at": "2019-09-19T10:00:00.000Z",
        "custom": false,
        "description": "string",
        "enabled": true,
        "level": 2,
        "modified_at": "2019-09-19T10:00:00.000Z",
        "name": "Team Defined",
        "owner": "string",
        "scope_query": "kind:service",
        "scorecard_name": "Deployments automated via Deployment Trains"
      },
      "id": "q8MQxk8TCqrHnWkx",
      "relationships": {
        "scorecard": {
          "data": {
            "id": "q8MQxk8TCqrHnWkp",
            "type": "scorecard"
          }
        }
      },
      "type": "rule"
    }
  ],
  "links": {
    "next": "/api/v2/scorecard/rules?page%5Blimit%5D=2\u0026page%5Boffset%5D=2\u0026page%5Bsize%5D=2"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/rules" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

DELETE https://api.ap1.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.ap2.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.datadoghq.eu/api/v2/scorecard/rules/{rule_id}https://api.ddog-gov.com/api/v2/scorecard/rules/{rule_id}https://api.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.us3.datadoghq.com/api/v2/scorecard/rules/{rule_id}https://api.us5.datadoghq.com/api/v2/scorecard/rules/{rule_id}

概要

Deletes a single rule.

OAuth apps require the apm_service_catalog_write authorization scope to access this endpoint.

引数

パスパラメーター

名前

種類

説明

rule_id [required]

string

The ID of the rule.

応答

OK

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Path parameters
export rule_id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/rules/${rule_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Note: This endpoint is in Preview. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/scorecard/outcomes/batchhttps://api.ap2.datadoghq.com/api/v2/scorecard/outcomes/batchhttps://api.datadoghq.eu/api/v2/scorecard/outcomes/batchhttps://api.ddog-gov.com/api/v2/scorecard/outcomes/batchhttps://api.datadoghq.com/api/v2/scorecard/outcomes/batchhttps://api.us3.datadoghq.com/api/v2/scorecard/outcomes/batchhttps://api.us5.datadoghq.com/api/v2/scorecard/outcomes/batch

概要

Sets multiple service-rule outcomes in a single batched request.

OAuth apps require the apm_service_catalog_write authorization scope to access this endpoint.

リクエスト

Body Data (required)

Set of scorecard outcomes.

Expand All

フィールド

種類

説明

data

object

Scorecard outcomes batch request data.

attributes

object

The JSON:API attributes for a batched set of scorecard outcomes.

results

[object]

Set of scorecard outcomes to update.

remarks

string

Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks.

rule_id [required]

string

The unique ID for a scorecard rule.

service_name [required]

string

The unique name for a service in the catalog.

state [required]

enum

The state of the rule evaluation. Allowed enum values: pass,fail,skip

type

enum

The JSON:API type for scorecard outcomes. Allowed enum values: batched-outcome

default: batched-outcome

{
  "data": {
    "attributes": {
      "results": [
        {
          "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>",
          "rule_id": "q8MQxk8TCqrHnWkx",
          "service_name": "my-service",
          "state": "pass"
        }
      ]
    },
    "type": "batched-outcome"
  }
}

応答

OK

Scorecard outcomes batch response.

Expand All

フィールド

種類

説明

data [required]

[object]

List of rule outcomes which were affected during the bulk operation.

attributes

object

The JSON:API attributes for an outcome.

created_at

date-time

Creation time of the rule outcome.

modified_at

date-time

Time of last rule outcome modification.

remarks

string

Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks.

service_name

string

The unique name for a service in the catalog.

state

enum

The state of the rule evaluation. Allowed enum values: pass,fail,skip

id

string

The unique ID for a rule outcome.

relationships

object

The JSON:API relationship to a scorecard rule.

rule

object

The JSON:API relationship to a scorecard outcome.

data

object

The JSON:API relationship to an outcome, which returns the related rule id.

id

string

The unique ID for a scorecard rule.

type

enum

The JSON:API type for scorecard rules. Allowed enum values: rule

default: rule

type

enum

The JSON:API type for an outcome. Allowed enum values: outcome

default: outcome

meta [required]

object

Metadata pertaining to the bulk operation.

total_received

int64

Total number of scorecard results received during the bulk operation.

total_updated

int64

Total number of scorecard results modified during the bulk operation.

{
  "data": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "modified_at": "2019-09-19T10:00:00.000Z",
        "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>",
        "service_name": "my-service",
        "state": "pass"
      },
      "id": "string",
      "relationships": {
        "rule": {
          "data": {
            "id": "q8MQxk8TCqrHnWkx",
            "type": "rule"
          }
        }
      },
      "type": "outcome"
    }
  ],
  "meta": {
    "total_received": "integer",
    "total_updated": "integer"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                          # 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/outcomes/batch" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "results": [ { "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "rule_id": "q8MQxk8TCqrHnWkx", "service_name": "my-service", "state": "pass" } ] }, "type": "batched-outcome" } } EOF

GET https://api.ap1.datadoghq.com/api/v2/scorecard/campaignshttps://api.ap2.datadoghq.com/api/v2/scorecard/campaignshttps://api.datadoghq.eu/api/v2/scorecard/campaignshttps://api.ddog-gov.com/api/v2/scorecard/campaignshttps://api.datadoghq.com/api/v2/scorecard/campaignshttps://api.us3.datadoghq.com/api/v2/scorecard/campaignshttps://api.us5.datadoghq.com/api/v2/scorecard/campaigns

概要

Fetches all scorecard campaigns.

OAuth apps require the apm_service_catalog_read, cases_read authorization scope to access this endpoint.

引数

クエリ文字列

名前

種類

説明

page[limit]

integer

Maximum number of campaigns to return.

page[offset]

integer

Offset for pagination.

filter[campaign][name]

string

Filter campaigns by name (full-text search).

filter[campaign][status]

string

Filter campaigns by status.

filter[campaign][owner]

string

Filter campaigns by owner UUID.

応答

OK

Response containing a list of campaigns.

Expand All

フィールド

種類

説明

data [required]

[object]

Array of campaigns.

attributes [required]

object

Campaign attributes.

created_at [required]

date-time

Creation time of the campaign.

description

string

The description of the campaign.

due_date

date-time

The due date of the campaign.

entity_scope

string

Entity scope query to filter entities for this campaign.

guidance

string

Guidance for the campaign.

key [required]

string

The unique key for the campaign.

modified_at [required]

date-time

Time of last campaign modification.

name [required]

string

The name of the campaign.

owner [required]

string

The UUID of the campaign owner.

start_date [required]

date-time

The start date of the campaign.

status [required]

string

The status of the campaign.

id [required]

string

The unique ID of the campaign.

type [required]

enum

The JSON:API type for campaigns. Allowed enum values: campaign

meta [required]

object

Metadata for scores response.

count [required]

int64

Number of entities in this response.

limit [required]

int64

Pagination limit.

offset [required]

int64

Pagination offset.

total [required]

int64

Total number of entities available.

{
  "data": [
    {
      "attributes": {
        "created_at": "2023-12-15T10:30:00Z",
        "description": "Campaign to improve security posture for Q1 2024.",
        "due_date": "2024-03-31T23:59:59Z",
        "entity_scope": "kind:service AND team:platform",
        "guidance": "Please ensure all services pass the security requirements.",
        "key": "q1-security-2024",
        "modified_at": "2024-01-05T14:20:00Z",
        "name": "Q1 Security Campaign",
        "owner": "550e8400-e29b-41d4-a716-446655440000",
        "start_date": "2024-01-01T00:00:00Z",
        "status": "in_progress"
      },
      "id": "c10ODp0VCrrIpXmz",
      "type": "campaign"
    }
  ],
  "meta": {
    "count": 10,
    "limit": 10,
    "offset": 0,
    "total": 150
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

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

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/campaigns" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

POST https://api.ap1.datadoghq.com/api/v2/scorecard/campaignshttps://api.ap2.datadoghq.com/api/v2/scorecard/campaignshttps://api.datadoghq.eu/api/v2/scorecard/campaignshttps://api.ddog-gov.com/api/v2/scorecard/campaignshttps://api.datadoghq.com/api/v2/scorecard/campaignshttps://api.us3.datadoghq.com/api/v2/scorecard/campaignshttps://api.us5.datadoghq.com/api/v2/scorecard/campaigns

概要

Creates a new scorecard campaign.

OAuth apps require the apm_service_catalog_write, cases_write authorization scope to access this endpoint.

リクエスト

Body Data (required)

Campaign data.

Expand All

フィールド

種類

説明

data [required]

object

Data for creating a new campaign.

attributes [required]

object

Attributes for creating a new campaign.

description

string

The description of the campaign.

due_date

date-time

The due date of the campaign.

entity_scope

string

Entity scope query to filter entities for this campaign.

guidance

string

Guidance for the campaign.

key [required]

string

The unique key for the campaign.

name [required]

string

The name of the campaign.

owner_id [required]

string

The UUID of the campaign owner.

rule_ids [required]

[string]

Array of rule IDs associated with this campaign.

start_date [required]

date-time

The start date of the campaign.

status

enum

The status of the campaign. Allowed enum values: in_progress,not_started,completed

type [required]

enum

The JSON:API type for campaigns. Allowed enum values: campaign

{
  "data": {
    "attributes": {
      "description": "Campaign to improve security posture for Q1 2024.",
      "due_date": "2024-03-31T23:59:59Z",
      "entity_scope": "kind:service AND team:platform",
      "guidance": "Please ensure all services pass the security requirements.",
      "key": "q1-security-2024",
      "name": "Q1 Security Campaign",
      "owner_id": "550e8400-e29b-41d4-a716-446655440000",
      "rule_ids": [
        "q8MQxk8TCqrHnWkx",
        "r9NRyl9UDrsIoXly"
      ],
      "start_date": "2024-01-01T00:00:00Z",
      "status": "in_progress"
    },
    "type": "campaign"
  }
}

応答

Created

Response containing campaign data.

Expand All

フィールド

種類

説明

data [required]

object

Campaign data.

attributes [required]

object

Campaign attributes.

created_at [required]

date-time

Creation time of the campaign.

description

string

The description of the campaign.

due_date

date-time

The due date of the campaign.

entity_scope

string

Entity scope query to filter entities for this campaign.

guidance

string

Guidance for the campaign.

key [required]

string

The unique key for the campaign.

modified_at [required]

date-time

Time of last campaign modification.

name [required]

string

The name of the campaign.

owner [required]

string

The UUID of the campaign owner.

start_date [required]

date-time

The start date of the campaign.

status [required]

string

The status of the campaign.

id [required]

string

The unique ID of the campaign.

type [required]

enum

The JSON:API type for campaigns. Allowed enum values: campaign

{
  "data": {
    "attributes": {
      "created_at": "2023-12-15T10:30:00Z",
      "description": "Campaign to improve security posture for Q1 2024.",
      "due_date": "2024-03-31T23:59:59Z",
      "entity_scope": "kind:service AND team:platform",
      "guidance": "Please ensure all services pass the security requirements.",
      "key": "q1-security-2024",
      "modified_at": "2024-01-05T14:20:00Z",
      "name": "Q1 Security Campaign",
      "owner": "550e8400-e29b-41d4-a716-446655440000",
      "start_date": "2024-01-01T00:00:00Z",
      "status": "in_progress"
    },
    "id": "c10ODp0VCrrIpXmz",
    "type": "campaign"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

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

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/campaigns" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": [ "q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly" ], "start_date": "2024-01-01T00:00:00Z" }, "type": "campaign" } } EOF

GET https://api.ap1.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.ap2.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.datadoghq.eu/api/v2/scorecard/campaigns/{campaign_id}https://api.ddog-gov.com/api/v2/scorecard/campaigns/{campaign_id}https://api.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.us3.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.us5.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}

概要

Fetches a single campaign by ID or key.

OAuth apps require the apm_service_catalog_read, cases_read authorization scope to access this endpoint.

引数

パスパラメーター

名前

種類

説明

campaign_id [required]

string

Campaign ID or key.

クエリ文字列

名前

種類

説明

include

string

Include related data (for example, scores).

include_meta

boolean

Include metadata (entity and rule counts).

応答

OK

Response containing campaign data.

Expand All

フィールド

種類

説明

data [required]

object

Campaign data.

attributes [required]

object

Campaign attributes.

created_at [required]

date-time

Creation time of the campaign.

description

string

The description of the campaign.

due_date

date-time

The due date of the campaign.

entity_scope

string

Entity scope query to filter entities for this campaign.

guidance

string

Guidance for the campaign.

key [required]

string

The unique key for the campaign.

modified_at [required]

date-time

Time of last campaign modification.

name [required]

string

The name of the campaign.

owner [required]

string

The UUID of the campaign owner.

start_date [required]

date-time

The start date of the campaign.

status [required]

string

The status of the campaign.

id [required]

string

The unique ID of the campaign.

type [required]

enum

The JSON:API type for campaigns. Allowed enum values: campaign

{
  "data": {
    "attributes": {
      "created_at": "2023-12-15T10:30:00Z",
      "description": "Campaign to improve security posture for Q1 2024.",
      "due_date": "2024-03-31T23:59:59Z",
      "entity_scope": "kind:service AND team:platform",
      "guidance": "Please ensure all services pass the security requirements.",
      "key": "q1-security-2024",
      "modified_at": "2024-01-05T14:20:00Z",
      "name": "Q1 Security Campaign",
      "owner": "550e8400-e29b-41d4-a716-446655440000",
      "start_date": "2024-01-01T00:00:00Z",
      "status": "in_progress"
    },
    "id": "c10ODp0VCrrIpXmz",
    "type": "campaign"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

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"
    }
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Path parameters
export campaign_id="c10ODp0VCrrIpXmz"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/campaigns/${campaign_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

PUT https://api.ap1.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.ap2.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.datadoghq.eu/api/v2/scorecard/campaigns/{campaign_id}https://api.ddog-gov.com/api/v2/scorecard/campaigns/{campaign_id}https://api.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.us3.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.us5.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}

概要

Updates an existing campaign.

OAuth apps require the apm_service_catalog_write, cases_write authorization scope to access this endpoint.

引数

パスパラメーター

名前

種類

説明

campaign_id [required]

string

Campaign ID or key.

リクエスト

Body Data (required)

Campaign data.

Expand All

フィールド

種類

説明

data [required]

object

Data for updating a campaign.

attributes [required]

object

Attributes for updating a campaign.

description

string

The description of the campaign.

due_date

date-time

The due date of the campaign.

entity_scope

string

Entity scope query to filter entities for this campaign.

guidance

string

Guidance for the campaign.

key

string

The unique key for the campaign.

name [required]

string

The name of the campaign.

owner_id [required]

string

The UUID of the campaign owner.

rule_ids [required]

[string]

Array of rule IDs associated with this campaign.

start_date [required]

date-time

The start date of the campaign.

status [required]

string

The status of the campaign.

type [required]

enum

The JSON:API type for campaigns. Allowed enum values: campaign

{
  "data": {
    "attributes": {
      "description": "Campaign to improve security posture for Q1 2024.",
      "due_date": "2024-03-31T23:59:59Z",
      "entity_scope": "kind:service AND team:platform",
      "guidance": "Please ensure all services pass the security requirements.",
      "key": "q1-security-2024",
      "name": "Q1 Security Campaign",
      "owner_id": "550e8400-e29b-41d4-a716-446655440000",
      "rule_ids": [
        "q8MQxk8TCqrHnWkx",
        "r9NRyl9UDrsIoXly"
      ],
      "start_date": "2024-01-01T00:00:00Z",
      "status": "in_progress"
    },
    "type": "campaign"
  }
}

応答

OK

Response containing campaign data.

Expand All

フィールド

種類

説明

data [required]

object

Campaign data.

attributes [required]

object

Campaign attributes.

created_at [required]

date-time

Creation time of the campaign.

description

string

The description of the campaign.

due_date

date-time

The due date of the campaign.

entity_scope

string

Entity scope query to filter entities for this campaign.

guidance

string

Guidance for the campaign.

key [required]

string

The unique key for the campaign.

modified_at [required]

date-time

Time of last campaign modification.

name [required]

string

The name of the campaign.

owner [required]

string

The UUID of the campaign owner.

start_date [required]

date-time

The start date of the campaign.

status [required]

string

The status of the campaign.

id [required]

string

The unique ID of the campaign.

type [required]

enum

The JSON:API type for campaigns. Allowed enum values: campaign

{
  "data": {
    "attributes": {
      "created_at": "2023-12-15T10:30:00Z",
      "description": "Campaign to improve security posture for Q1 2024.",
      "due_date": "2024-03-31T23:59:59Z",
      "entity_scope": "kind:service AND team:platform",
      "guidance": "Please ensure all services pass the security requirements.",
      "key": "q1-security-2024",
      "modified_at": "2024-01-05T14:20:00Z",
      "name": "Q1 Security Campaign",
      "owner": "550e8400-e29b-41d4-a716-446655440000",
      "start_date": "2024-01-01T00:00:00Z",
      "status": "in_progress"
    },
    "id": "c10ODp0VCrrIpXmz",
    "type": "campaign"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

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"
    }
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Path parameters
export campaign_id="c10ODp0VCrrIpXmz"
# Curl command
curl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/campaigns/${campaign_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": [ "q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly" ], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress" }, "type": "campaign" } } EOF

DELETE https://api.ap1.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.ap2.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.datadoghq.eu/api/v2/scorecard/campaigns/{campaign_id}https://api.ddog-gov.com/api/v2/scorecard/campaigns/{campaign_id}https://api.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.us3.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}https://api.us5.datadoghq.com/api/v2/scorecard/campaigns/{campaign_id}

概要

Deletes a single campaign by ID or key.

OAuth apps require the apm_service_catalog_write, cases_write authorization scope to access this endpoint.

引数

パスパラメーター

名前

種類

説明

campaign_id [required]

string

Campaign ID or key.

応答

No Content

Bad Request

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

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"
    }
  ]
}

Not Found

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Path parameters
export campaign_id="c10ODp0VCrrIpXmz"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/campaigns/${campaign_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

GET https://api.ap1.datadoghq.com/api/v2/scorecard/scorecardshttps://api.ap2.datadoghq.com/api/v2/scorecard/scorecardshttps://api.datadoghq.eu/api/v2/scorecard/scorecardshttps://api.ddog-gov.com/api/v2/scorecard/scorecardshttps://api.datadoghq.com/api/v2/scorecard/scorecardshttps://api.us3.datadoghq.com/api/v2/scorecard/scorecardshttps://api.us5.datadoghq.com/api/v2/scorecard/scorecards

概要

Fetches all scorecards.

OAuth apps require the apm_service_catalog_read authorization scope to access this endpoint.

引数

クエリ文字列

名前

種類

説明

page[offset]

integer

Offset for pagination.

page[size]

integer

Maximum number of scorecards to return.

filter[scorecard][id]

string

Filter by scorecard ID.

filter[scorecard][name]

string

Filter by scorecard name (partial match).

filter[scorecard][description]

string

Filter by scorecard description (partial match).

応答

OK

Response containing a list of scorecards.

Expand All

フィールド

種類

説明

data [required]

[object]

Array of scorecards.

attributes [required]

object

Scorecard attributes.

created_at [required]

date-time

Creation time of the scorecard.

description

string

The description of the scorecard.

modified_at [required]

date-time

Time of last scorecard modification.

name [required]

string

The name of the scorecard.

id [required]

string

The unique ID of the scorecard.

type [required]

enum

The JSON:API type for scorecard list. Allowed enum values: scorecard

{
  "data": [
    {
      "attributes": {
        "created_at": "2023-01-15T10:30:00Z",
        "description": "Best practices for observability.",
        "modified_at": "2024-01-05T14:20:00Z",
        "name": "Observability Best Practices"
      },
      "id": "q8MQxk8TCqrHnWkx",
      "type": "scorecard"
    }
  ]
}

Forbidden

API error response.

Expand All

フィールド

種類

説明

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

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/scorecard/scorecards" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"