












Beta Observability Logs Endpoints
(beta) Observability API - logs.












Examples
Real world code examples
Playground
Test the endpoints live
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.logs.search(page_size=50, order="desc")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.logs.search(page_size=50, order="desc")
# Handle response
print(res)
curl https://api.mistral.ai/v1/observability/logs/search \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/observability/logs/search \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'200
{
"logs": {}
}{
"logs": {}
}Get log field definitions
GET /v1/observability/logs/fields#
Get log field definitions
200
Successful Response
Playground
Test the endpoints live
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.logs.list()
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.logs.list()
# Handle response
print(res)
curl https://api.mistral.ai/v1/observability/logs/fields \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/observability/logs/fields \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"field_definitions": [
{
"label": "approved",
"name": "My resource",
"supported_operators": [
"eq"
],
"type": "ENUM"
}
]
}{
"field_definitions": [
{
"label": "approved",
"name": "My resource",
"supported_operators": [
"eq"
],
"type": "ENUM"
}
]
}Get options for a log field
GET /v1/observability/logs/fields/{field_name}/options#
Get options for a log field
200
Successful Response
Playground
Test the endpoints live
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.logs.fetch_options(field_name="<value>")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.observability.logs.fetch_options(field_name="<value>")
# Handle response
print(res)
curl https://api.mistral.ai/v1/observability/logs/fields/{field_name}/options \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/observability/logs/fields/{field_name}/options \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"options": null
}{
"options": null
}