The response returned when listing the inference history for a resource.
Expand All
Field
Type
Description
data [required]
object
The data wrapper for an ownership history response.
attributes [required]
object
The attributes of an ownership history response.
items [required]
[object]
The list of history entries returned for this page.
checksum [required]
string
A checksum identifying the state of the inference at this point in time.
confidence [required]
string
The confidence score of the inference, expressed as a numeric string with up to four decimal places.
created_at [required]
date-time
The time this history entry was created.
evidence_versions [required]
[object]
The list of evidence versions associated with an inference.
explanation [required]
string
A human-readable explanation of how the inference was produced.
failed_at
date-time
The time when this inference failed, if applicable.
failure_reason
string
The reason why this inference failed, if applicable.
id [required]
int64
The unique identifier of the history entry.
owner_type [required]
enum
The owner type for an ownership inference.
Allowed enum values: user,team,service,unknown
primary_contact_ref
string
The primary contact reference for the inferred owner, formatted as ref:handle/<owner_handle>.
resource_id [required]
string
The identifier of the resource that the inference applies to.
retry_schedule
date-time
The scheduled retry time for a failed inference, if applicable.
sources [required]
[object]
The list of sources backing an ownership inference. Empty when the inference status is not whitelisted to expose sources.
status [required]
enum
The lifecycle status of an ownership inference.
Allowed enum values: suggested,persisted,overridden,failed,unknown
pagination [required]
object
Cursor-based pagination metadata for the history response.
has_more [required]
boolean
Whether more history entries are available beyond this page.
next_cursor
string
An opaque, base64-encoded cursor token. Pass it as the cursor query parameter to retrieve the next page. Absent or null when there are no further pages.
id [required]
string
The resource identifier for which history is returned.
type [required]
enum
The type of the ownership history resource. The value should always be ownership_history.
Allowed enum values: ownership_history
"""
List ownership history by owner type returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.csm_ownership_apiimportCSMOwnershipApifromdatadog_api_client.v2.model.ownership_owner_typeimportOwnershipOwnerTypeconfiguration=Configuration()configuration.unstable_operations["list_ownership_history_by_owner_type"]=TruewithApiClient(configuration)asapi_client:api_instance=CSMOwnershipApi(api_client)response=api_instance.list_ownership_history_by_owner_type(resource_id="res-1",owner_type=OwnershipOwnerType.TEAM,)print(response)
# List ownership history by owner type returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.list_ownership_history_by_owner_type".to_sym]=trueendapi_instance=DatadogAPIClient::V2::CSMOwnershipAPI.newpapi_instance.list_ownership_history_by_owner_type("res-1",OwnershipOwnerType::TEAM)
// List ownership history by owner type 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.ListOwnershipHistoryByOwnerType",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewCSMOwnershipApi(apiClient)resp,r,err:=api.ListOwnershipHistoryByOwnerType(ctx,"res-1",datadogV2.OWNERSHIPOWNERTYPE_TEAM,*datadogV2.NewListOwnershipHistoryByOwnerTypeOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `CSMOwnershipApi.ListOwnershipHistoryByOwnerType`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `CSMOwnershipApi.ListOwnershipHistoryByOwnerType`:\n%s\n",responseContent)}
// List ownership history by owner type returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.CsmOwnershipApi;importcom.datadog.api.client.v2.model.OwnershipHistoryResponse;importcom.datadog.api.client.v2.model.OwnershipOwnerType;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.listOwnershipHistoryByOwnerType",true);CsmOwnershipApiapiInstance=newCsmOwnershipApi(defaultClient);try{OwnershipHistoryResponseresult=apiInstance.listOwnershipHistoryByOwnerType("res-1",OwnershipOwnerType.TEAM);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling CsmOwnershipApi#listOwnershipHistoryByOwnerType");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// List ownership history by owner type returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_csm_ownership::CSMOwnershipAPI;usedatadog_api_client::datadogV2::api_csm_ownership::ListOwnershipHistoryByOwnerTypeOptionalParams;usedatadog_api_client::datadogV2::model::OwnershipOwnerType;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.ListOwnershipHistoryByOwnerType",true);letapi=CSMOwnershipAPI::with_config(configuration);letresp=api.list_ownership_history_by_owner_type("res-1".to_string(),OwnershipOwnerType::TEAM,ListOwnershipHistoryByOwnerTypeOptionalParams::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="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List ownership history by owner type returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.listOwnershipHistoryByOwnerType"]=true;constapiInstance=newv2.CSMOwnershipApi(configuration);constparams: v2.CSMOwnershipApiListOwnershipHistoryByOwnerTypeRequest={resourceId:"res-1",ownerType:"team",};apiInstance.listOwnershipHistoryByOwnerType(params).then((data: v2.OwnershipHistoryResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));