Response containing the chronological list of timeline cells for a work item.
항목
유형
설명
data
[object]
The TimelineResponsedata.
attributes [required]
object
Attributes of a timeline cell, representing a single event in a work item's chronological activity log (for example, a comment, status change, or assignment update).
author
<oneOf>
The author of the timeline cell. Currently only user authors are supported.
<type=USER>
object
A user who authored a timeline cell.
content
object
Profile information for the user who authored the timeline cell.
email
string
The email address of the user.
handle
string
The Datadog handle of the user.
id
string
The UUID of the user.
name
string
The display name of the user.
type
enum
The type of timeline cell author. Currently only USER is supported.
Allowed enum values: USER
cell_content
<oneOf>
The content payload of a timeline cell, varying by cell type.
Object 1
object
The content of a comment timeline cell.
message
string
The text content of the comment. Supports Markdown formatting.
created_at
date-time
Timestamp of when the cell was created
deleted_at
date-time
Timestamp of when the cell was deleted
modified_at
date-time
Timestamp of when the cell was last modified
type
enum
The type of content in the timeline cell. Currently only COMMENT is supported in this endpoint.
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="datadoghq.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="us3.datadoghq.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="us5.datadoghq.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="datadoghq.eu"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="ap1.datadoghq.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="ap2.datadoghq.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="uk1.datadoghq.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="ddog-gov.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
# Path parametersexport case_id="f98a5a5b-e0ff-45d4-b2f5-afe6e74de504"# Set your Datadog site and credentialsexport DD_SITE="us2.ddog-gov.com"# Use a Personal Access Token or Service Access Tokenexport DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"curl -X POST "https://api.${DD_SITE}/api/v2/cases/${case_id}/comment" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \-d @- << EOF{ "data": { "attributes": { "comment": "Hello World !" }, "type": "case" }}EOF
Comment case returns "OK" response
// Comment case returns "OK" responsepackage mainimport ( "context" "encoding/json" "fmt" "os" "github.com/DataDog/datadog-api-client-go/v2/api/datadog" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")func main() { // there is a valid "case" in the system CaseID := os.Getenv("CASE_ID") body := datadogV2.CaseCommentRequest{ Data: datadogV2.CaseComment{ Attributes: datadogV2.CaseCommentAttributes{ Comment: "Hello World !", }, Type: datadogV2.CASERESOURCETYPE_CASE, }, } ctx := datadog.NewDefaultContext(context.Background()) ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN")) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.CommentCase(ctx, CaseID, body) if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.CommentCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.CommentCase`:\n%s\n", responseContent)}
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
Comment case returns "OK" response
# Comment case returns "OK" responserequire "datadog_api_client"DatadogAPIClient.configure do |config| config.access_token = ENV["DD_BEARER_TOKEN"]endapi_instance = DatadogAPIClient::V2::CaseManagementAPI.new# there is a valid "case" in the systemCASE_ID = ENV["CASE_ID"]body = DatadogAPIClient::V2::CaseCommentRequest.new({ data: DatadogAPIClient::V2::CaseComment.new({ attributes: DatadogAPIClient::V2::CaseCommentAttributes.new({ comment: "Hello World !", }), type: DatadogAPIClient::V2::CaseResourceType::CASE, }),})p api_instance.comment_case(CASE_ID, body)
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
Comment case returns "OK" response
// Comment case returns "OK" responseuse datadog_api_client::datadog;use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI;use datadog_api_client::datadogV2::model::CaseComment;use datadog_api_client::datadogV2::model::CaseCommentAttributes;use datadog_api_client::datadogV2::model::CaseCommentRequest;use datadog_api_client::datadogV2::model::CaseResourceType;#[tokio::main]async fn main() { // there is a valid "case" in the system let case_id = std::env::var("CASE_ID").unwrap(); let body = CaseCommentRequest::new(CaseComment::new( CaseCommentAttributes::new("Hello World !".to_string()), CaseResourceType::CASE, )); let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.comment_case(case_id.clone(), body).await; if let Ok(value) = resp { println!("{:#?}", value); } else { println!("{:#?}", resp.unwrap_err()); }}
https://api.datadoghq.com/api/v2/cases/{case_id}/commenthttps://api.us3.datadoghq.com/api/v2/cases/{case_id}/commenthttps://api.us5.datadoghq.com/api/v2/cases/{case_id}/commenthttps://api.datadoghq.eu/api/v2/cases/{case_id}/commenthttps://api.ap1.datadoghq.com/api/v2/cases/{case_id}/commenthttps://api.ap2.datadoghq.com/api/v2/cases/{case_id}/commenthttps://api.uk1.datadoghq.com/api/v2/cases/{case_id}/commenthttps://api.ddog-gov.com/api/v2/cases/{case_id}/commenthttps://api.us2.ddog-gov.com/api/v2/cases/{case_id}/comment개요
케이스에 코멘트 달기
인수
경로 파라미터
case_id[required]Work item's UUID or key
요청
Body Data (required)
케이스 댓글 페이로드
data[required]케이스 댓글 요청
attributes[required]Work item comment attributes
comment[required]The
CaseCommentAttributesmessage.type[required]JSON:API resource type for work items.
casecase응답
OK
Response containing the chronological list of timeline cells for a work item.
dataThe
TimelineResponsedata.attributes[required]Attributes of a timeline cell, representing a single event in a work item's chronological activity log (for example, a comment, status change, or assignment update).
authorThe author of the timeline cell. Currently only user authors are supported.
<type=USER>A user who authored a timeline cell.
contentProfile information for the user who authored the timeline cell.
emailThe email address of the user.
handleThe Datadog handle of the user.
idThe UUID of the user.
nameThe display name of the user.
typeThe type of timeline cell author. Currently only
USERis supported.USERcell_contentThe content payload of a timeline cell, varying by cell type.
Object 1The content of a comment timeline cell.
messageThe text content of the comment. Supports Markdown formatting.
created_atTimestamp of when the cell was created
deleted_atTimestamp of when the cell was deleted
modified_atTimestamp of when the cell was last modified
typeThe type of content in the timeline cell. Currently only
COMMENTis supported in this endpoint.COMMENTid[required]Timeline cell's identifier
type[required]JSON:API resource type for timeline cells.
timeline_celltimeline_cellBad Request
API error response.
errors[required]A list of errors.
Unauthorized
API error response.
errors[required]A list of errors.
Forbidden
API error response.
errors[required]A list of errors.
Not Found
API error response.
errors[required]A list of errors.
Too many requests
API error response.
errors[required]A list of errors.
코드 예시
Instructions
First install the library and its dependencies and then save the example to
main.goand run following commands:Instructions
First install the library and its dependencies and then save the example to
Example.javaand run following commands:Instructions
First install the library and its dependencies and then save the example to
example.pyand run following commands:Instructions
First install the library and its dependencies and then save the example to
example.rband run following commands:Instructions
First install the library and its dependencies and then save the example to
src/main.rsand run following commands:Instructions
First install the library and its dependencies and then save the example to
example.tsand run following commands: