Simple search experimentation entities
https://api.datadoghq.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.us3.datadoghq.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.us5.datadoghq.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.datadoghq.eu/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.ap1.datadoghq.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.ap2.datadoghq.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.uk1.datadoghq.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.ddog-gov.com/api/v2/llm-obs/v1/experimentation/simple-searchhttps://api.us2.ddog-gov.com/api/v2/llm-obs/v1/experimentation/simple-searchOverview
Search across Agent Observability experimentation entities using offset-based (page-number) pagination. Use this endpoint when you need total page count or want to navigate to a specific page number.
The filter.scope field controls which entity types are returned. At least one valid scope must be provided.
Request
Body Data (required)
Simple search payload.
data [required]Data object for an experimentation simple search request.
attributes [required]Attributes for an experimentation simple search request.
content_previewOptions to control content preview truncation.
limitMaximum number of characters to include in content previews.
filter [required]Filter criteria for an experimentation search request.
include_deletedWhen true, include soft-deleted entities alongside active ones.
falseis_deletedWhen true, return only soft-deleted entities.
falsequeryFree-text search query.
scope [required]Entity types to search. Valid values are projects, datasets, dataset_records, experiments, and experiment_runs.
versionFilter dataset records by a specific dataset version.
includeAdditional data to include in the response.
user_dataWhen true, enrich results with author user data (name and email).
falsepageOffset-based pagination parameters for simple search.
limitMaximum number of results per page.
numberPage number to retrieve (1-indexed).
sortSort order for results.
directionSort direction.
asc, descfield [required]The field name to sort on.
type [required]Resource type for experimentation search and analytics operations.
experimentation{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}Response
OK
Response to an offset-based experimentation simple search.
data [required]JSON:API data object for a simple search response.
attributes [required]The matching experimentation entities grouped by type.
dataset_recordsMatching dataset records. Present when dataset_records is included in filter.scope.
created_at [required]Timestamp when the record was created.
dataset_id [required]Identifier of the dataset this record belongs to.
expected_output [required]Represents any valid JSON value.
Object 1A scalar value represented as a string.
Object 2A scalar numeric value.
Object 3An arbitrary object value with additional properties.
Object 4An array of arbitrary values.
Object 1A scalar value represented as a string.
Object 2A scalar numeric value.
Object 3An arbitrary object value with additional properties.
Object 4A scalar boolean value.
Object 5A scalar boolean value.
id [required]Unique identifier of the record.
input [required]Represents any valid JSON value.
Object 1A scalar value represented as a string.
Object 2A scalar numeric value.
Object 3An arbitrary object value with additional properties.
Object 4An array of arbitrary values.
Object 1A scalar value represented as a string.
Object 2A scalar numeric value.
Object 3An arbitrary object value with additional properties.
Object 4A scalar boolean value.
Object 5A scalar boolean value.
metadata [required]Arbitrary metadata associated with the record.
updated_at [required]Timestamp when the record was last updated.
datasetsMatching datasets. Present when datasets is included in filter.scope.
attributes [required]Attributes of an Agent Observability dataset.
created_at [required]Timestamp when the dataset was created.
current_version [required]Current version number of the dataset.
description [required]Description of the dataset.
metadata [required]Arbitrary metadata associated with the dataset.
name [required]Name of the dataset.
updated_at [required]Timestamp when the dataset was last updated.
id [required]Unique identifier of the dataset.
type [required]Resource type of an Agent Observability dataset.
datasetsexperiment_runsMatching experiment runs. Present when experiment_runs is included in filter.scope.
aggregate_dataAggregated metric data for this run.
created_atTimestamp when the run was created.
experiment_idIdentifier of the experiment this run belongs to.
idUnique identifier of the experiment run.
run_numberSequential number of this run within the experiment.
experimentsMatching experiments. Present when experiments is included in filter.scope.
aggregate_dataPre-computed aggregate metrics for this experiment run, including eval score distributions, token costs, and error rates.
authorUser data for the author of an experiment. Only present when include[user_data] is true.
emailEmail address of the user.
handleUsername or handle associated with the user's Datadog account.
iconURL of the user's icon.
idUnique identifier of the user.
nameDisplay name of the user.
config [required]Configuration parameters for the experiment.
created_at [required]Timestamp when the experiment was created.
dataset_id [required]Identifier of the dataset used in this experiment.
dataset_nameName of the dataset used in this experiment.
Only present when include[dataset_names] is true.
dataset_versionVersion of the dataset used in this experiment.
deleted_atTimestamp when the experiment was soft-deleted, if applicable.
description [required]Description of the experiment.
errorError message describing why the experiment failed, if applicable.
experimentLogical name of the experiment, shared across all runs of the same pipeline.
metadata [required]Arbitrary metadata associated with the experiment.
name [required]Name of the experiment.
parent_experiment_idIdentifier of the parent (baseline) experiment this experiment was run against, if any.
project_id [required]Identifier of the project this experiment belongs to.
run_countExpected number of runs for this experiment.
statusExecution status of an Agent Observability experiment.
running, completed, failed, interruptedupdated_at [required]Timestamp when the experiment was last updated.
projectsMatching projects. Present when projects is included in filter.scope.
attributes [required]Attributes of an Agent Observability project.
created_at [required]Timestamp when the project was created.
description [required]Description of the project.
name [required]Name of the project.
updated_at [required]Timestamp when the project was last updated.
id [required]Unique identifier of the project.
type [required]Resource type of an Agent Observability project.
projectsid [required]Server-generated identifier for this search result.
type [required]Resource type for experimentation search and analytics operations.
experimentationmetaPagination metadata for a simple search response.
pagePage metadata.
currentCurrent page number.
limitPage size used for this response.
total_countTotal number of matching results (capped at the maximum search limit).
total_pagesTotal number of pages available.
{
"data": {
"attributes": {
"dataset_records": [
{
"created_at": "2024-01-15T10:30:00Z",
"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
"expected_output": {
"description": "undefined",
"type": "undefined"
},
"id": "rec-7c3f5a1b-9e2d-4f8a-b1c6-3d7e9f0a2b4c",
"input": {
"description": "undefined",
"type": "undefined"
},
"metadata": {},
"updated_at": "2024-01-15T10:30:00Z"
}
],
"datasets": [
{
"attributes": {
"created_at": "2024-01-15T10:30:00Z",
"current_version": 1,
"description": "",
"metadata": {},
"name": "My LLM Dataset",
"updated_at": "2024-01-15T10:30:00Z"
},
"id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
"type": "datasets"
}
],
"experiment_runs": [
{
"aggregate_data": {},
"created_at": "2024-01-15T10:30:00Z",
"experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
"id": "7a1b2c3d-4e5f-6789-abcd-ef0123456789",
"run_number": 1
}
],
"experiments": [
{
"aggregate_data": {},
"author": {
"email": "jane.doe@example.com",
"handle": "jane.doe@example.com",
"icon": "https://example.com/icon.png",
"id": "00000000-0000-0000-0000-000000000010",
"name": "Jane Doe"
},
"config": {},
"created_at": "2024-01-15T10:30:00Z",
"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
"dataset_name": "string",
"dataset_version": "integer",
"deleted_at": "2019-09-19T10:00:00.000Z",
"description": "",
"error": "string",
"experiment": "my-pipeline",
"metadata": {},
"name": "My Experiment v1",
"parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
"project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"run_count": "integer",
"status": "completed",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"projects": [
{
"attributes": {
"created_at": "2024-01-15T10:30:00Z",
"description": "",
"name": "My LLM Project",
"updated_at": "2024-01-15T10:30:00Z"
},
"id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"type": "projects"
}
]
},
"id": "00000000-0000-0000-0000-000000000001",
"type": "experimentation"
},
"meta": {
"page": {
"current": 1,
"limit": 50,
"total_count": 193,
"total_pages": 4
}
}
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Unauthorized
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Forbidden
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Internal Server Error
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Code Example
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/llm-obs/v1/experimentation/simple-search" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"filter": {
"query": "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
"scope": [
"experiments"
]
},
"page": {
"limit": 50,
"number": 1
},
"sort": [
{
"direction": "desc",
"field": "created_at"
}
]
},
"type": "experimentation"
}
}
EOF// Simple search experimentation entities returns "OK" response
package main
import (
"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() {
body := datadogV2.LLMObsExperimentationSimpleSearchRequest{
Data: datadogV2.LLMObsExperimentationSimpleSearchDataRequest{
Attributes: datadogV2.LLMObsExperimentationSimpleSearchDataAttributesRequest{
ContentPreview: &datadogV2.LLMObsExperimentationContentPreview{
Limit: datadog.PtrInt64(500),
},
Filter: datadogV2.LLMObsExperimentationFilter{
IncludeDeleted: datadog.PtrBool(false),
IsDeleted: datadog.PtrBool(false),
Query: datadog.PtrString("my experiment"),
Scope: []string{
"experiments",
},
Version: *datadog.NewNullableInt64(nil),
},
Include: &datadogV2.LLMObsExperimentationInclude{
UserData: datadog.PtrBool(false),
},
Page: &datadogV2.LLMObsExperimentationNumberPage{
Limit: datadog.PtrInt32(50),
Number: datadog.PtrInt32(1),
},
Sort: []datadogV2.LLMObsExperimentationSortField{
{
Direction: datadogV2.LLMOBSEXPERIMENTATIONSORTFIELDDIRECTION_DESC.Ptr(),
Field: "created_at",
},
},
},
Type: datadogV2.LLMOBSEXPERIMENTATIONTYPE_EXPERIMENTATION,
},
}
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.SimpleSearchLLMObsExperimentation", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewAgentObservabilityApi(apiClient)
resp, r, err := api.SimpleSearchLLMObsExperimentation(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AgentObservabilityApi.SimpleSearchLLMObsExperimentation`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `AgentObservabilityApi.SimpleSearchLLMObsExperimentation`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Simple search experimentation entities returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.AgentObservabilityApi;
import com.datadog.api.client.v2.model.LLMObsExperimentationContentPreview;
import com.datadog.api.client.v2.model.LLMObsExperimentationFilter;
import com.datadog.api.client.v2.model.LLMObsExperimentationInclude;
import com.datadog.api.client.v2.model.LLMObsExperimentationNumberPage;
import com.datadog.api.client.v2.model.LLMObsExperimentationSimpleSearchDataAttributesRequest;
import com.datadog.api.client.v2.model.LLMObsExperimentationSimpleSearchDataRequest;
import com.datadog.api.client.v2.model.LLMObsExperimentationSimpleSearchRequest;
import com.datadog.api.client.v2.model.LLMObsExperimentationSimpleSearchResponse;
import com.datadog.api.client.v2.model.LLMObsExperimentationSortField;
import com.datadog.api.client.v2.model.LLMObsExperimentationSortFieldDirection;
import com.datadog.api.client.v2.model.LLMObsExperimentationType;
import java.util.Collections;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.simpleSearchLLMObsExperimentation", true);
AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient);
LLMObsExperimentationSimpleSearchRequest body =
new LLMObsExperimentationSimpleSearchRequest()
.data(
new LLMObsExperimentationSimpleSearchDataRequest()
.attributes(
new LLMObsExperimentationSimpleSearchDataAttributesRequest()
.contentPreview(new LLMObsExperimentationContentPreview().limit(500L))
.filter(
new LLMObsExperimentationFilter()
.includeDeleted(false)
.isDeleted(false)
.query("my experiment")
.scope(Collections.singletonList("experiments"))
.version(null))
.include(new LLMObsExperimentationInclude().userData(false))
.page(new LLMObsExperimentationNumberPage().limit(50).number(1))
.sort(
Collections.singletonList(
new LLMObsExperimentationSortField()
.direction(LLMObsExperimentationSortFieldDirection.DESC)
.field("created_at"))))
.type(LLMObsExperimentationType.EXPERIMENTATION));
try {
LLMObsExperimentationSimpleSearchResponse result =
apiInstance.simpleSearchLLMObsExperimentation(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling AgentObservabilityApi#simpleSearchLLMObsExperimentation");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Simple search experimentation entities returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.agent_observability_api import AgentObservabilityApi
from datadog_api_client.v2.model.llm_obs_experimentation_content_preview import LLMObsExperimentationContentPreview
from datadog_api_client.v2.model.llm_obs_experimentation_filter import LLMObsExperimentationFilter
from datadog_api_client.v2.model.llm_obs_experimentation_include import LLMObsExperimentationInclude
from datadog_api_client.v2.model.llm_obs_experimentation_number_page import LLMObsExperimentationNumberPage
from datadog_api_client.v2.model.llm_obs_experimentation_simple_search_data_attributes_request import (
LLMObsExperimentationSimpleSearchDataAttributesRequest,
)
from datadog_api_client.v2.model.llm_obs_experimentation_simple_search_data_request import (
LLMObsExperimentationSimpleSearchDataRequest,
)
from datadog_api_client.v2.model.llm_obs_experimentation_simple_search_request import (
LLMObsExperimentationSimpleSearchRequest,
)
from datadog_api_client.v2.model.llm_obs_experimentation_sort_field import LLMObsExperimentationSortField
from datadog_api_client.v2.model.llm_obs_experimentation_sort_field_direction import (
LLMObsExperimentationSortFieldDirection,
)
from datadog_api_client.v2.model.llm_obs_experimentation_type import LLMObsExperimentationType
body = LLMObsExperimentationSimpleSearchRequest(
data=LLMObsExperimentationSimpleSearchDataRequest(
attributes=LLMObsExperimentationSimpleSearchDataAttributesRequest(
content_preview=LLMObsExperimentationContentPreview(
limit=500,
),
filter=LLMObsExperimentationFilter(
include_deleted=False,
is_deleted=False,
query="my experiment",
scope=[
"experiments",
],
version=None,
),
include=LLMObsExperimentationInclude(
user_data=False,
),
page=LLMObsExperimentationNumberPage(
limit=50,
number=1,
),
sort=[
LLMObsExperimentationSortField(
direction=LLMObsExperimentationSortFieldDirection.DESC,
field="created_at",
),
],
),
type=LLMObsExperimentationType.EXPERIMENTATION,
),
)
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["simple_search_llm_obs_experimentation"] = True
with ApiClient(configuration) as api_client:
api_instance = AgentObservabilityApi(api_client)
response = api_instance.simple_search_llm_obs_experimentation(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.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"# Simple search experimentation entities returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.simple_search_llm_obs_experimentation".to_sym] = true
end
api_instance = DatadogAPIClient::V2::AgentObservabilityAPI.new
body = DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchRequest.new({
data: DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchDataRequest.new({
attributes: DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchDataAttributesRequest.new({
content_preview: DatadogAPIClient::V2::LLMObsExperimentationContentPreview.new({
limit: 500,
}),
filter: DatadogAPIClient::V2::LLMObsExperimentationFilter.new({
include_deleted: false,
is_deleted: false,
query: "my experiment",
scope: [
"experiments",
],
version: nil,
}),
include: DatadogAPIClient::V2::LLMObsExperimentationInclude.new({
user_data: false,
}),
page: DatadogAPIClient::V2::LLMObsExperimentationNumberPage.new({
limit: 50,
number: 1,
}),
sort: [
DatadogAPIClient::V2::LLMObsExperimentationSortField.new({
direction: DatadogAPIClient::V2::LLMObsExperimentationSortFieldDirection::DESC,
field: "created_at",
}),
],
}),
type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION,
}),
})
p api_instance.simple_search_llm_obs_experimentation(body)
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
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"// Simple search experimentation entities returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_agent_observability::AgentObservabilityAPI;
use datadog_api_client::datadogV2::model::LLMObsExperimentationContentPreview;
use datadog_api_client::datadogV2::model::LLMObsExperimentationFilter;
use datadog_api_client::datadogV2::model::LLMObsExperimentationInclude;
use datadog_api_client::datadogV2::model::LLMObsExperimentationNumberPage;
use datadog_api_client::datadogV2::model::LLMObsExperimentationSimpleSearchDataAttributesRequest;
use datadog_api_client::datadogV2::model::LLMObsExperimentationSimpleSearchDataRequest;
use datadog_api_client::datadogV2::model::LLMObsExperimentationSimpleSearchRequest;
use datadog_api_client::datadogV2::model::LLMObsExperimentationSortField;
use datadog_api_client::datadogV2::model::LLMObsExperimentationSortFieldDirection;
use datadog_api_client::datadogV2::model::LLMObsExperimentationType;
#[tokio::main]
async fn main() {
let body = LLMObsExperimentationSimpleSearchRequest::new(
LLMObsExperimentationSimpleSearchDataRequest::new(
LLMObsExperimentationSimpleSearchDataAttributesRequest::new(
LLMObsExperimentationFilter::new(vec!["experiments".to_string()])
.include_deleted(false)
.is_deleted(false)
.query("my experiment".to_string())
.version(None),
)
.content_preview(LLMObsExperimentationContentPreview::new().limit(500))
.include(LLMObsExperimentationInclude::new().user_data(false))
.page(LLMObsExperimentationNumberPage::new().limit(50).number(1))
.sort(vec![LLMObsExperimentationSortField::new(
"created_at".to_string(),
)
.direction(LLMObsExperimentationSortFieldDirection::DESC)]),
LLMObsExperimentationType::EXPERIMENTATION,
),
);
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.simple_search_llm_obs_experimentation", true);
let api = AgentObservabilityAPI::with_config(configuration);
let resp = api.simple_search_llm_obs_experimentation(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run/**
* Simple search experimentation entities returns "OK" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
configuration.unstableOperations["v2.simpleSearchLLMObsExperimentation"] = true;
const apiInstance = new v2.AgentObservabilityApi(configuration);
const params: v2.AgentObservabilityApiSimpleSearchLLMObsExperimentationRequest =
{
body: {
data: {
attributes: {
contentPreview: {
limit: 500,
},
filter: {
includeDeleted: false,
isDeleted: false,
query: "my experiment",
scope: ["experiments"],
version: undefined,
},
include: {
userData: false,
},
page: {
limit: 50,
number: 1,
},
sort: [
{
direction: "desc",
field: "created_at",
},
],
},
type: "experimentation",
},
},
};
apiInstance
.simpleSearchLLMObsExperimentation(params)
.then((data: v2.LLMObsExperimentationSimpleSearchResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"