Case Management

View and manage cases and projects within Case Management. See the Case Management page for more information.

POST https://api.ap1.datadoghq.com/api/v2/cases/projectshttps://api.datadoghq.eu/api/v2/cases/projectshttps://api.ddog-gov.com/api/v2/cases/projectshttps://api.datadoghq.com/api/v2/cases/projectshttps://api.us3.datadoghq.com/api/v2/cases/projectshttps://api.us5.datadoghq.com/api/v2/cases/projects

Overview

Create a project.

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

Request

Body Data (required)

Project payload

Expand All

Field

Type

Description

data [required]

object

Project create

attributes [required]

object

Project creation attributes

key [required]

string

Project's key. Cannot be "CASE"

name [required]

string

name

type [required]

enum

Project resource type Allowed enum values: project

default: project

{
  "data": {
    "attributes": {
      "key": "SEC",
      "name": "Security Investigation"
    },
    "type": "project"
  }
}

Response

CREATED

Project response

Expand All

Field

Type

Description

data

object

A Project

attributes [required]

object

Project attributes

key

string

The project's key

name

string

Project's name

id [required]

string

The Project's identifier

relationships

object

Project relationships

member_team

object

Relationship between a team and a team link

data

[object]

Related team links

id [required]

string

The team link's identifier

type [required]

enum

Team link type Allowed enum values: team_links

default: team_links

links

object

Links attributes.

related

string

Related link.

member_user

object

Relationship to users.

data [required]

[object]

Relationships to user objects.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

type [required]

enum

Project resource type Allowed enum values: project

default: project

{
  "data": {
    "attributes": {
      "key": "CASEM",
      "name": "string"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "member_team": {
        "data": [
          {
            "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
            "type": "team_links"
          }
        ],
        "links": {
          "related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"
        }
      },
      "member_user": {
        "data": [
          {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        ]
      }
    },
    "type": "project"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Create a project returns "CREATED" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.project_create import ProjectCreate
from datadog_api_client.v2.model.project_create_attributes import ProjectCreateAttributes
from datadog_api_client.v2.model.project_create_request import ProjectCreateRequest
from datadog_api_client.v2.model.project_resource_type import ProjectResourceType

body = ProjectCreateRequest(
    data=ProjectCreate(
        attributes=ProjectCreateAttributes(
            key="SEC",
            name="Security Investigation",
        ),
        type=ProjectResourceType.PROJECT,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.create_project(body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

GET https://api.ap1.datadoghq.com/api/v2/caseshttps://api.datadoghq.eu/api/v2/caseshttps://api.ddog-gov.com/api/v2/caseshttps://api.datadoghq.com/api/v2/caseshttps://api.us3.datadoghq.com/api/v2/caseshttps://api.us5.datadoghq.com/api/v2/cases

Overview

Search cases.

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

Arguments

Query Strings

Name

Type

Description

page[size]

integer

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

page[number]

integer

Specific page number to return.

sort[field]

enum

Specify which field to sort
Allowed enum values: created_at, priority, status

filter

string

Search query

sort[asc]

boolean

Specify if order is ascending or not

Response

OK

Response with cases

Expand All

Field

Type

Description

data

[object]

Cases response data

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

meta

object

Cases response metadata

page

object

Pagination metadata

current

int64

Current page number

size

int64

Number of cases in current page

total

int64

Total number of pages

{
  "data": [
    {
      "attributes": {
        "archived_at": "2019-09-19T10:00:00.000Z",
        "closed_at": "2019-09-19T10:00:00.000Z",
        "created_at": "2019-09-19T10:00:00.000Z",
        "description": "string",
        "jira_issue": {
          "result": {
            "issue_id": "string",
            "issue_key": "string",
            "issue_url": "string",
            "project_key": "string"
          },
          "status": "COMPLETED"
        },
        "key": "CASEM-4523",
        "modified_at": "2019-09-19T10:00:00.000Z",
        "priority": "NOT_DEFINED",
        "service_now_ticket": {
          "result": {
            "sys_target_link": "string"
          },
          "status": "COMPLETED"
        },
        "status": "OPEN",
        "title": "Memory leak investigation on API",
        "type": "STANDARD"
      },
      "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
      "relationships": {
        "assignee": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        },
        "created_by": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        },
        "modified_by": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        },
        "project": {
          "data": {
            "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
            "type": "project"
          }
        }
      },
      "type": "case"
    }
  ],
  "meta": {
    "page": {
      "current": "integer",
      "size": "integer",
      "total": "integer"
    }
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Search cases returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.search_cases()

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/caseshttps://api.datadoghq.eu/api/v2/caseshttps://api.ddog-gov.com/api/v2/caseshttps://api.datadoghq.com/api/v2/caseshttps://api.us3.datadoghq.com/api/v2/caseshttps://api.us5.datadoghq.com/api/v2/cases

Overview

Create a Case

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

Request

Body Data (required)

Case payload

Expand All

Field

Type

Description

data [required]

object

Case creation data

attributes [required]

object

Case creation attributes

description

string

Description

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

title [required]

string

Title

type [required]

enum

Case type Allowed enum values: STANDARD

relationships

object

Relationships formed with the case on creation

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project [required]

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "priority": "NOT_DEFINED",
      "title": "Security breach investigation in 0cfbc5cbc676ee71",
      "type": "STANDARD"
    },
    "relationships": {
      "assignee": {
        "data": {
          "id": "string",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Response

CREATED

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Create a case returns "CREATED" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_create import CaseCreate
from datadog_api_client.v2.model.case_create_attributes import CaseCreateAttributes
from datadog_api_client.v2.model.case_create_relationships import CaseCreateRelationships
from datadog_api_client.v2.model.case_create_request import CaseCreateRequest
from datadog_api_client.v2.model.case_priority import CasePriority
from datadog_api_client.v2.model.case_resource_type import CaseResourceType
from datadog_api_client.v2.model.case_type import CaseType
from datadog_api_client.v2.model.nullable_user_relationship import NullableUserRelationship
from datadog_api_client.v2.model.nullable_user_relationship_data import NullableUserRelationshipData
from datadog_api_client.v2.model.project_relationship import ProjectRelationship
from datadog_api_client.v2.model.project_relationship_data import ProjectRelationshipData
from datadog_api_client.v2.model.project_resource_type import ProjectResourceType
from datadog_api_client.v2.model.user_resource_type import UserResourceType

# there is a valid "user" in the system
USER_DATA_ID = environ["USER_DATA_ID"]

body = CaseCreateRequest(
    data=CaseCreate(
        attributes=CaseCreateAttributes(
            priority=CasePriority.NOT_DEFINED,
            title="Security breach investigation in 0cfbc5cbc676ee71",
            type=CaseType.STANDARD,
        ),
        relationships=CaseCreateRelationships(
            assignee=NullableUserRelationship(
                data=NullableUserRelationshipData(
                    id=USER_DATA_ID,
                    type=UserResourceType.USER,
                ),
            ),
            project=ProjectRelationship(
                data=ProjectRelationshipData(
                    id="d4bbe1af-f36e-42f1-87c1-493ca35c320e",
                    type=ProjectResourceType.PROJECT,
                ),
            ),
        ),
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.create_case(body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

GET https://api.ap1.datadoghq.com/api/v2/cases/projectshttps://api.datadoghq.eu/api/v2/cases/projectshttps://api.ddog-gov.com/api/v2/cases/projectshttps://api.datadoghq.com/api/v2/cases/projectshttps://api.us3.datadoghq.com/api/v2/cases/projectshttps://api.us5.datadoghq.com/api/v2/cases/projects

Overview

Get all projects.

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

Response

OK

Response with projects

Expand All

Field

Type

Description

data

[object]

Projects response data

attributes [required]

object

Project attributes

key

string

The project's key

name

string

Project's name

id [required]

string

The Project's identifier

relationships

object

Project relationships

member_team

object

Relationship between a team and a team link

data

[object]

Related team links

id [required]

string

The team link's identifier

type [required]

enum

Team link type Allowed enum values: team_links

default: team_links

links

object

Links attributes.

related

string

Related link.

member_user

object

Relationship to users.

data [required]

[object]

Relationships to user objects.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

type [required]

enum

Project resource type Allowed enum values: project

default: project

{
  "data": [
    {
      "attributes": {
        "key": "CASEM",
        "name": "string"
      },
      "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
      "relationships": {
        "member_team": {
          "data": [
            {
              "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
              "type": "team_links"
            }
          ],
          "links": {
            "related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"
          }
        },
        "member_user": {
          "data": [
            {
              "id": "00000000-0000-0000-0000-000000000000",
              "type": "user"
            }
          ]
        }
      },
      "type": "project"
    }
  ]
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Get all projects returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.get_projects()

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

GET https://api.ap1.datadoghq.com/api/v2/cases/{case_id}https://api.datadoghq.eu/api/v2/cases/{case_id}https://api.ddog-gov.com/api/v2/cases/{case_id}https://api.datadoghq.com/api/v2/cases/{case_id}https://api.us3.datadoghq.com/api/v2/cases/{case_id}https://api.us5.datadoghq.com/api/v2/cases/{case_id}

Overview

Get the details of case by case_id

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Get the details of a case returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.get_case(
        case_id=CASE_ID,
    )

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

GET https://api.ap1.datadoghq.com/api/v2/cases/projects/{project_id}https://api.datadoghq.eu/api/v2/cases/projects/{project_id}https://api.ddog-gov.com/api/v2/cases/projects/{project_id}https://api.datadoghq.com/api/v2/cases/projects/{project_id}https://api.us3.datadoghq.com/api/v2/cases/projects/{project_id}https://api.us5.datadoghq.com/api/v2/cases/projects/{project_id}

Overview

Get the details of a project by project_id.

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

Arguments

Path Parameters

Name

Type

Description

project_id [required]

string

Project UUID

Response

OK

Project response

Expand All

Field

Type

Description

data

object

A Project

attributes [required]

object

Project attributes

key

string

The project's key

name

string

Project's name

id [required]

string

The Project's identifier

relationships

object

Project relationships

member_team

object

Relationship between a team and a team link

data

[object]

Related team links

id [required]

string

The team link's identifier

type [required]

enum

Team link type Allowed enum values: team_links

default: team_links

links

object

Links attributes.

related

string

Related link.

member_user

object

Relationship to users.

data [required]

[object]

Relationships to user objects.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

type [required]

enum

Project resource type Allowed enum values: project

default: project

{
  "data": {
    "attributes": {
      "key": "CASEM",
      "name": "string"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "member_team": {
        "data": [
          {
            "id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001",
            "type": "team_links"
          }
        ],
        "links": {
          "related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"
        }
      },
      "member_user": {
        "data": [
          {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        ]
      }
    },
    "type": "project"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Get the details of a project returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.get_project(
        project_id="project_id",
    )

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

DELETE https://api.ap1.datadoghq.com/api/v2/cases/projects/{project_id}https://api.datadoghq.eu/api/v2/cases/projects/{project_id}https://api.ddog-gov.com/api/v2/cases/projects/{project_id}https://api.datadoghq.com/api/v2/cases/projects/{project_id}https://api.us3.datadoghq.com/api/v2/cases/projects/{project_id}https://api.us5.datadoghq.com/api/v2/cases/projects/{project_id}

Overview

Remove a project using the project’s id.

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

Arguments

Path Parameters

Name

Type

Description

project_id [required]

string

Project UUID

Response

No Content

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

API error response

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Remove a project returns "No Content" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    api_instance.delete_project(
        project_id="project_id",
    )

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/cases/{case_id}/statushttps://api.datadoghq.eu/api/v2/cases/{case_id}/statushttps://api.ddog-gov.com/api/v2/cases/{case_id}/statushttps://api.datadoghq.com/api/v2/cases/{case_id}/statushttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/statushttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/status

Overview

Update case status

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Request

Body Data (required)

Case status update payload

Expand All

Field

Type

Description

data [required]

object

Case update status

attributes [required]

object

Case update status attributes

status [required]

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "status": "IN_PROGRESS"
    },
    "type": "case"
  }
}

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Update case status returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_resource_type import CaseResourceType
from datadog_api_client.v2.model.case_status import CaseStatus
from datadog_api_client.v2.model.case_update_status import CaseUpdateStatus
from datadog_api_client.v2.model.case_update_status_attributes import CaseUpdateStatusAttributes
from datadog_api_client.v2.model.case_update_status_request import CaseUpdateStatusRequest

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

body = CaseUpdateStatusRequest(
    data=CaseUpdateStatus(
        attributes=CaseUpdateStatusAttributes(
            status=CaseStatus.IN_PROGRESS,
        ),
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.update_status(case_id=CASE_ID, body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/cases/{case_id}/priorityhttps://api.datadoghq.eu/api/v2/cases/{case_id}/priorityhttps://api.ddog-gov.com/api/v2/cases/{case_id}/priorityhttps://api.datadoghq.com/api/v2/cases/{case_id}/priorityhttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/priorityhttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/priority

Overview

Update case priority

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Request

Body Data (required)

Case priority update payload

Expand All

Field

Type

Description

data [required]

object

Case priority status

attributes [required]

object

Case update priority attributes

priority [required]

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "priority": "P3"
    },
    "type": "case"
  }
}

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Update case priority returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_priority import CasePriority
from datadog_api_client.v2.model.case_resource_type import CaseResourceType
from datadog_api_client.v2.model.case_update_priority import CaseUpdatePriority
from datadog_api_client.v2.model.case_update_priority_attributes import CaseUpdatePriorityAttributes
from datadog_api_client.v2.model.case_update_priority_request import CaseUpdatePriorityRequest

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

body = CaseUpdatePriorityRequest(
    data=CaseUpdatePriority(
        attributes=CaseUpdatePriorityAttributes(
            priority=CasePriority.P3,
        ),
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.update_priority(case_id=CASE_ID, body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/cases/{case_id}/assignhttps://api.datadoghq.eu/api/v2/cases/{case_id}/assignhttps://api.ddog-gov.com/api/v2/cases/{case_id}/assignhttps://api.datadoghq.com/api/v2/cases/{case_id}/assignhttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/assignhttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/assign

Overview

Assign case to a user

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Request

Body Data (required)

Assign case payload

Expand All

Field

Type

Description

data [required]

object

Case assign

attributes [required]

object

Case assign attributes

assignee_id [required]

string

Assignee's UUID

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "assignee_id": "string"
    },
    "type": "case"
  }
}

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Assign case returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_assign import CaseAssign
from datadog_api_client.v2.model.case_assign_attributes import CaseAssignAttributes
from datadog_api_client.v2.model.case_assign_request import CaseAssignRequest
from datadog_api_client.v2.model.case_resource_type import CaseResourceType

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

# there is a valid "user" in the system
USER_DATA_ID = environ["USER_DATA_ID"]

body = CaseAssignRequest(
    data=CaseAssign(
        attributes=CaseAssignAttributes(
            assignee_id=USER_DATA_ID,
        ),
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.assign_case(case_id=CASE_ID, body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/cases/{case_id}/unassignhttps://api.datadoghq.eu/api/v2/cases/{case_id}/unassignhttps://api.ddog-gov.com/api/v2/cases/{case_id}/unassignhttps://api.datadoghq.com/api/v2/cases/{case_id}/unassignhttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/unassignhttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/unassign

Overview

Unassign case

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Request

Body Data (required)

Unassign case payload

Expand All

Field

Type

Description

data [required]

object

Case empty request data

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "type": "case"
  }
}

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Unassign case returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_empty import CaseEmpty
from datadog_api_client.v2.model.case_empty_request import CaseEmptyRequest
from datadog_api_client.v2.model.case_resource_type import CaseResourceType

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

body = CaseEmptyRequest(
    data=CaseEmpty(
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.unassign_case(case_id=CASE_ID, body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/cases/{case_id}/archivehttps://api.datadoghq.eu/api/v2/cases/{case_id}/archivehttps://api.ddog-gov.com/api/v2/cases/{case_id}/archivehttps://api.datadoghq.com/api/v2/cases/{case_id}/archivehttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/archivehttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/archive

Overview

Archive case

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Request

Body Data (required)

Archive case payload

Expand All

Field

Type

Description

data [required]

object

Case empty request data

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "type": "case"
  }
}

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Archive case returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_empty import CaseEmpty
from datadog_api_client.v2.model.case_empty_request import CaseEmptyRequest
from datadog_api_client.v2.model.case_resource_type import CaseResourceType

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

body = CaseEmptyRequest(
    data=CaseEmpty(
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.archive_case(case_id=CASE_ID, body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"

POST https://api.ap1.datadoghq.com/api/v2/cases/{case_id}/unarchivehttps://api.datadoghq.eu/api/v2/cases/{case_id}/unarchivehttps://api.ddog-gov.com/api/v2/cases/{case_id}/unarchivehttps://api.datadoghq.com/api/v2/cases/{case_id}/unarchivehttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/unarchivehttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/unarchive

Overview

Unarchive case

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

Arguments

Path Parameters

Name

Type

Description

case_id [required]

string

Case’s UUID or key

Request

Body Data (required)

Unarchive case payload

Expand All

Field

Type

Description

data [required]

object

Case empty request data

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "type": "case"
  }
}

Response

OK

Case response

Expand All

Field

Type

Description

data

object

A case

attributes [required]

object

Case attributes

archived_at

date-time

Timestamp of when the case was archived

closed_at

date-time

Timestamp of when the case was closed

created_at

date-time

Timestamp of when the case was created

description

string

Description

jira_issue

object

Jira issue attached to case

result

object

Jira issue information

issue_id

string

Jira issue ID

issue_key

string

Jira issue key

issue_url

string

Jira issue URL

project_key

string

Jira project key

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

key

string

Key

modified_at

date-time

Timestamp of when the case was last modified

priority

enum

Case priority Allowed enum values: NOT_DEFINED,P1,P2,P3,P4,P5

default: NOT_DEFINED

service_now_ticket

object

ServiceNow ticket attached to case

result

object

ServiceNow ticket information

sys_target_link

string

Link to the Incident created on ServiceNow

status

enum

Case status Allowed enum values: IN_PROGRESS,COMPLETED,FAILED

default: IN_PROGRESS

status

enum

Case status Allowed enum values: OPEN,IN_PROGRESS,CLOSED

title

string

Title

type

enum

Case type Allowed enum values: STANDARD

id [required]

string

Case's identifier

relationships

object

Resources related to a case

assignee

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

created_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

modified_by

object

Relationship to user.

data [required]

object

Relationship to user object.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

User resource type. Allowed enum values: user

default: user

project

object

Relationship to project

data [required]

object

Relationship to project object

id [required]

string

A unique identifier that represents the project

type [required]

enum

Project resource type Allowed enum values: project

default: project

type [required]

enum

Case resource type Allowed enum values: case

default: case

{
  "data": {
    "attributes": {
      "archived_at": "2019-09-19T10:00:00.000Z",
      "closed_at": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "jira_issue": {
        "result": {
          "issue_id": "string",
          "issue_key": "string",
          "issue_url": "string",
          "project_key": "string"
        },
        "status": "COMPLETED"
      },
      "key": "CASEM-4523",
      "modified_at": "2019-09-19T10:00:00.000Z",
      "priority": "NOT_DEFINED",
      "service_now_ticket": {
        "result": {
          "sys_target_link": "string"
        },
        "status": "COMPLETED"
      },
      "status": "OPEN",
      "title": "Memory leak investigation on API",
      "type": "STANDARD"
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "relationships": {
      "assignee": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "created_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "modified_by": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "user"
        }
      },
      "project": {
        "data": {
          "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
          "type": "project"
        }
      }
    },
    "type": "case"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

"""
Unarchive case returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.case_management_api import CaseManagementApi
from datadog_api_client.v2.model.case_empty import CaseEmpty
from datadog_api_client.v2.model.case_empty_request import CaseEmptyRequest
from datadog_api_client.v2.model.case_resource_type import CaseResourceType

# there is a valid "case" in the system
CASE_ID = environ["CASE_ID"]

body = CaseEmptyRequest(
    data=CaseEmpty(
        type=CaseResourceType.CASE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = CaseManagementApi(api_client)
    response = api_instance.unarchive_case(case_id=CASE_ID, body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"