List AI memory violation results

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/static-analysis/ai/memoryhttps://api.ap2.datadoghq.com/api/v2/static-analysis/ai/memoryhttps://api.datadoghq.eu/api/v2/static-analysis/ai/memoryhttps://api.ddog-gov.com/api/v2/static-analysis/ai/memoryhttps://api.us2.ddog-gov.com/api/v2/static-analysis/ai/memoryhttps://api.datadoghq.com/api/v2/static-analysis/ai/memoryhttps://api.us3.datadoghq.com/api/v2/static-analysis/ai/memoryhttps://api.us5.datadoghq.com/api/v2/static-analysis/ai/memory

Overview

Get all AI memory violation results for the authenticated organization.

Response

Successful response

Response containing a list of AI memory violation results.

Expand All

Field

Type

Description

data [required]

[object]

The list of AI memory violation results.

attributes [required]

object

Response attributes of an AI memory violation result.

created_at [required]

date-time

The creation timestamp.

created_by [required]

string

The identifier of the user who created the result.

line [required]

int64

The line number where the violation was found.

message [required]

string

A message explaining the violation result.

name [required]

string

The file path where the violation was found.

repository_id [required]

string

The repository identifier.

rule [required]

string

The rule identifier in the format ruleset/rule.

sha [required]

string

The git commit SHA where the violation was found.

type [required]

enum

The type of AI memory violation result indicating whether it is a true positive or false positive. Allowed enum values: TP,FP

id [required]

string

The numeric identifier of the violation result.

type [required]

enum

AI memory violation result resource type. Allowed enum values: ai_memory_violation_result

{
  "data": [
    {
      "attributes": {
        "created_at": "2024-01-01T00:00:00+00:00",
        "created_by": "example-handle",
        "line": 10,
        "message": "This is a false positive because the input is sanitized.",
        "name": "src/main.py",
        "repository_id": "my-repo",
        "rule": "my-ai-ruleset/my-ai-rule",
        "sha": "abc123def456789012345678901234567890abcd",
        "type": "FP"
      },
      "id": "42",
      "type": "ai_memory_violation_result"
    }
  ]
}

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

Unauthorized

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

Not Found

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

                  # 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.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/static-analysis/ai/memory" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"