베타 Observability 데이터셋 레코드 엔드포인트

베타 Observability 데이터셋 레코드 엔드포인트 (Beta Observability Datasets Records Endpoints)

(beta) Observability API - dataset records입니다. 데이터셋에 저장된 개별 레코드의 내용을 조회·삭제·갱신하고, 레코드에 대해 라이브 저지(live judging)를 실행하는 엔드포인트예요.

출처: 문서

본문

데이터셋 안의 개별 레코드(한 건의 대화나 입력)를 다루는 API예요. 레코드 내용을 가져오고, 삭제하거나 일괄 삭제하고, payload·properties를 갱신하며, 특정 옵션으로 레코드를 저지할 수 있답니다.

GET /v1/observability/dataset-records/{dataset_record_id} — Get the content of a given dataset record (레코드 조회)

주어진 데이터셋 레코드의 내용을 가져옵니다.

경로 파라미터:

  • dataset_record_id#string (필수)

응답 필드 (200 Successful Response):

  • id#string (필수)
  • dataset_id#string (필수)
  • payload#map<any> (필수) — 호출자가 작성해 레코드에 저장한 입력 객체.
  • properties#map<any> (필수)
  • source#"EXPLORER"|"UPLOADED_FILE"|"DIRECT_INPUT"|"PLAYGROUND"|"TELEMETRY_SPAN" (필수)
  • created_at#date-time (필수)
  • updated_at#date-time (필수)
  • deleted_at#date-time|null (필수)

TypeScript:

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: proces...EY"] ?? "",
});

async function run() {
  const result = await mistral.beta.observability.datasets.records.fetch({
    datasetRecordId: "ce995349-abbf-45c0-be75-885fc1c4b4c0",
  });

  console.log(result);
}

run();

Python:

from mistralai.client import Mistral
import os

with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.datasets.records.fetch(dataset_record_id="ce995349-abbf-45c0-be75-885fc1c4b4c0")

    # Handle response
    print(res)

curl:

curl https://api.mistral.ai/v1/observability/dataset-records/{dataset_record_id} \
 -X GET \
 -H 'Authorization: Bearer ***'

응답 예시 (200):

{
  "created_at": "2025-12-17T10:25:07.818693Z",
  "dataset_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "deleted_at": null,
  "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "payload": [
    null
  ],
  "properties": [
    null
  ],
  "source": "EXPLORER",
  "updated_at": "2025-12-17T10:41:03.469341Z"
}

DELETE /v1/observability/dataset-records/{dataset_record_id} — Delete a record from a dataset (레코드 삭제)

데이터셋에서 레코드를 삭제합니다.

경로 파라미터:

  • dataset_record_id#string (필수)

TypeScript:

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: proces...EY"] ?? "",
});

async function run() {
  await mistral.beta.observability.datasets.records.delete({
    datasetRecordId: "799fed99-80b4-4a9a-a15e-05352b811702",
  });

}

run();

Python:

from mistralai.client import Mistral
import os

with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    mistral.beta.observability.datasets.records.delete(dataset_record_id="799fed99-80b4-4a9a-a15e-05352b811702")

    # Use the SDK ...

curl:

curl https://api.mistral.ai/v1/observability/dataset-records/{dataset_record_id} \
 -X DELETE \
 -H 'Authorization: Bearer ***' \
 -H 'Content-Type: application/json'

POST /v1/observability/dataset-records/bulk-delete — Delete multiple records from datasets (레코드 일괄 삭제)

여러 데이터셋에서 여러 레코드를 삭제합니다.

요청 본문:

  • dataset_record_ids#array<string> (필수) — 삭제할 레코드 ID 목록.

TypeScript:

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: proces...EY"] ?? "",
});

async function run() {
  await mistral.beta.observability.datasets.records.bulkDelete({
    datasetRecordIds: [
      "22fc78f7-e774-4ab5-b1ea-63852992ef31",
      "1c533b4f-882e-4bd0-9ef6-9933b825f8b1",
    ],
  });

}

run();

Python:

from mistralai.client import Mistral
import os

with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    mistral.beta.observability.datasets.records.bulk_delete(dataset_record_ids=[
        "22fc78f7-e774-4ab5-b1ea-63852992ef31",
        "1c533b4f-882e-4bd0-9ef6-9933b825f8b1",
    ])

    # Use the SDK ...

curl:

curl https://api.mistral.ai/v1/observability/dataset-records/bulk-delete \
 -X POST \
 -H 'Authorization: Bearer ***' \
 -H 'Content-Type: application/json' \
 -d '{
  "dataset_record_ids": [
    "019b2bd7-96e7-7219-8c0b-45a73da50088"
  ]
}'

POST /v1/observability/dataset-records/{dataset_record_id}/live-judging — Run Judge on a dataset record (레코드 라이브 저지)

주어진 옵션에 따라 데이터셋 레코드에 대해 Judge를 실행합니다.

경로 파라미터:

  • dataset_record_id#string (필수)

요청 본문:

  • judge_definition#CreateJudgeRequest (필수) — 사용할 Judge 정의(이름, 설명, 모델, 출력 옵션, 지시, 도구 등).

응답 필드 (200 Successful Response):

  • analysis#string (필수) — 분석 텍스트.
  • answer#string|number (필수) — 저지 판정 답변.

TypeScript:

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: proces...EY"] ?? "",
});

async function run() {
  const result = await mistral.beta.observability.datasets.records.judge({
    datasetRecordId: "9de5d7a1-787a-45dd-b668-9f3407e76d8b",
    judgeDatasetRecordRequest: {
      judgeDefinition: {
        name: "<value>",
        description: "wisely railway deceivingly arcade minion back what yowza outrun service",
        modelName: "<value>",
        output: {
          type: "CLASSIFICATION",
          options: [
            {
              value: "<value>",
              description: "spork excluding without retrospectivity bah next yearly",
            },
          ],
        },
        instructions: "<value>",
        tools: [
          "<value 1>",
        ],
      },
    },
  });

  console.log(result);
}

run();

Python:

from mistralai.client import Mistral
import os

with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.observability.datasets.records.judge(dataset_record_id="9de5d7a1-787a-45dd-b668-9f3407e76d8b", judge_definition={
        "name": "<value>",
        "description": "wisely railway deceivingly arcade minion back what yowza outrun service",
        "model_name": "<value>",
        "output": {
            "type": "CLASSIFICATION",
            "options": [
                {
                    "value": "<value>",
                    "description": "spork excluding without retrospectivity bah next yearly",
                },
            ],
        },
        "instructions": "<value>",
        "tools": [
            "<value 1>",
        ],
    })

    # Handle response
    print(res)

curl:

curl https://api.mistral.ai/v1/observability/dataset-records/{dataset_record_id}/live-judging \
 -X POST \
 -H 'Authorization: Bearer ***' \
 -H 'Content-Type: application/json' \
 -d '{
  "judge_definition": {
    "description": "My Judge description.",
    "instructions": "Evaluate the response.",
    "model_name": "mistral-small-latest",
    "name": "My Judge",
    "output": {
      "options": [
        {
          "description": "My Judge",
          "value": "approved"
        }
      ]
    },
    "tools": [
      "approved"
    ]
  }
}'

응답 예시 (200):

{
  "analysis": "Example analysis.",
  "answer": "Example answer."
}

PUT /v1/observability/dataset-records/{dataset_record_id}/payload — Update a dataset record payload (payload 갱신)

데이터셋 레코드의 payload를 갱신합니다.

경로 파라미터:

  • dataset_record_id#string (필수)

요청 본문:

  • payload#map<any> (필수) — 호출자가 작성해 레코드에 저장하는 입력 객체.

TypeScript:

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: proces...EY"] ?? "",
});

async function run() {
  await mistral.beta.observability.datasets.records.updatePayload({
    datasetRecordId: "17506b15-748e-4e7c-9737-c97c44d04b0f",
    updateDatasetRecordPayloadRequest: {
      payload: {
        "messages": [
          {
            "key": "<value>",
          },
          {

          },
          {
            "key": "<value>",
          },
        ],
      },
    },
  });

}

run();

Python:

from mistralai.client import Mistral, models
import os

with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    mistral.beta.observability.datasets.records.update_payload(dataset_record_id="17506b15-748e-4e7c-9737-c97c44d04b0f", payload=models.ConversationPayload(
        messages=[
            {
                "key": "<value>",
            },
            {

            },
            {
                "key": "<value>",
            },
        ],
    ))

    # Use the SDK ...

curl:

curl https://api.mistral.ai/v1/observability/dataset-records/{dataset_record_id}/payload \
 -X PUT \
 -H 'Authorization: Bearer ***' \
 -H 'Content-Type: application/json' \
 -d '{
  "payload": [
    null
  ]
}'

PUT /v1/observability/dataset-records/{dataset_record_id}/properties — Update dataset record properties (properties 갱신)

데이터셋 레코드의 properties를 갱신합니다.

경로 파라미터:

  • dataset_record_id#string (필수)

요청 본문:

  • properties#map<any> (필수)

TypeScript:

import { Mistral } from "@mistralai/mistralai";

const mistral = new Mistral({
  apiKey: proces...EY"] ?? "",
});

async function run() {
  await mistral.beta.observability.datasets.records.updateProperties({
    datasetRecordId: "a4deefc5-0905-427e-ad15-1090ef9e216d",
    updateDatasetRecordPropertiesRequest: {
      properties: {
        "key": "<value>",
        "key1": "<value>",
        "key2": "<value>",
      },
    },
  });

}

run();

Python:

from mistralai.client import Mistral
import os

with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    mistral.beta.observability.datasets.records.update_properties(dataset_record_id="a4deefc5-0905-427e-ad15-1090ef9e216d", properties={
        "key": "<value>",
        "key1": "<value>",
        "key2": "<value>",
    })

    # Use the SDK ...

curl:

curl https://api.mistral.ai/v1/observability/dataset-records/{dataset_record_id}/properties \
 -X PUT \
 -H 'Authorization: Bearer ***' \
 -H 'Content-Type: application/json' \
 -d '{
  "properties": [
    null
  ]
}'

더 알아보기 (Learn more)