Response containing a single incident user-defined field.
Expand All
항목
유형
설명
data [required]
object
Data object for an incident user-defined field response.
attributes [required]
object
Attributes of an incident user-defined field.
category [required]
enum
The section in which the field appears: "what_happened" or "why_it_happened". When null, the field appears in the Attributes section.
Allowed enum values: what_happened,why_it_happened
collected [required]
enum
The lifecycle stage at which the app prompts users to fill out this field. Cannot be set on required fields.
Allowed enum values: active,stable,resolved,completed
created [required]
date-time
Timestamp when the field was created.
default_value [required]
string
The default value for the field.
deleted [required]
date-time
Timestamp when the field was soft-deleted, or null if not deleted.
display_name [required]
string
The human-readable name shown in the UI.
metadata [required]
object
Metadata for autocomplete-type user-defined fields, describing how to populate autocomplete options.
category [required]
string
The category of the autocomplete source.
search_limit_param [required]
string
The query parameter used to limit the number of autocomplete results.
search_params [required]
object
Additional query parameters to include in the search URL.
search_query_param [required]
string
The query parameter used to pass typed input to the search URL.
search_result_path [required]
string
The JSON path to the results in the response body.
search_url [required]
string
The URL used to populate autocomplete options.
modified [required]
date-time
Timestamp when the field was last modified.
name [required]
string
The unique identifier of the field.
ordinal [required]
string
A decimal string representing the field's display order in the UI.
required [required]
boolean
When true, users must fill out this field on incidents.
reserved [required]
boolean
When true, this field is reserved for system use and cannot be deleted.
tag_key [required]
string
For metric tag-type fields only, the metric tag key that powers the autocomplete options.
type [required]
int32
The data type of the field. 1=dropdown, 2=multiselect, 3=textbox, 4=textarray, 5=metrictag, 6=autocomplete, 7=number, 8=datetime.
valid_values [required]
[object]
The list of allowed values for dropdown, multiselect, and autocomplete fields.
description
string
A detailed description of the valid value.
display_name [required]
string
The human-readable display name for this value.
short_description
string
A short description of the valid value.
value [required]
string
The identifier that is stored when this option is selected.
id [required]
string
The unique identifier of the user-defined field.
relationships [required]
object
Relationships of an incident user-defined field.
created_by_user [required]
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
incident_type [required]
object
Relationship to an incident type.
data [required]
object
Relationship to incident type object.
id [required]
string
The incident type's ID.
type [required]
enum
Incident type resource type.
Allowed enum values: incident_types
default: incident_types
last_modified_by_user [required]
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type [required]
enum
The incident user defined fields type.
Allowed enum values: user_defined_field
"""
Get an incident user-defined field returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.incidents_apiimportIncidentsApiconfiguration=Configuration()configuration.unstable_operations["get_incident_user_defined_field"]=TruewithApiClient(configuration)asapi_client:api_instance=IncidentsApi(api_client)response=api_instance.get_incident_user_defined_field(field_id="00000000-0000-0000-0000-000000000000",)print(response)
# Get an incident user-defined field returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.get_incident_user_defined_field".to_sym]=trueendapi_instance=DatadogAPIClient::V2::IncidentsAPI.newpapi_instance.get_incident_user_defined_field("00000000-0000-0000-0000-000000000000")
// Get an incident user-defined field returns "OK" responsepackagemainimport("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")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.GetIncidentUserDefinedField",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewIncidentsApi(apiClient)resp,r,err:=api.GetIncidentUserDefinedField(ctx,"00000000-0000-0000-0000-000000000000",*datadogV2.NewGetIncidentUserDefinedFieldOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `IncidentsApi.GetIncidentUserDefinedField`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `IncidentsApi.GetIncidentUserDefinedField`:\n%s\n",responseContent)}
// Get an incident user-defined field returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.IncidentsApi;importcom.datadog.api.client.v2.model.IncidentUserDefinedFieldResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.getIncidentUserDefinedField",true);IncidentsApiapiInstance=newIncidentsApi(defaultClient);try{IncidentUserDefinedFieldResponseresult=apiInstance.getIncidentUserDefinedField("00000000-0000-0000-0000-000000000000");System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling IncidentsApi#getIncidentUserDefinedField");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get an incident user-defined field returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_incidents::GetIncidentUserDefinedFieldOptionalParams;usedatadog_api_client::datadogV2::api_incidents::IncidentsAPI;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.GetIncidentUserDefinedField",true);letapi=IncidentsAPI::with_config(configuration);letresp=api.get_incident_user_defined_field("00000000-0000-0000-0000-000000000000".to_string(),GetIncidentUserDefinedFieldOptionalParams::default(),).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get an incident user-defined field returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.getIncidentUserDefinedField"]=true;constapiInstance=newv2.IncidentsApi(configuration);constparams: v2.IncidentsApiGetIncidentUserDefinedFieldRequest={fieldId:"00000000-0000-0000-0000-000000000000",};apiInstance.getIncidentUserDefinedField(params).then((data: v2.IncidentUserDefinedFieldResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));