> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# वर्कस्पेस ऑडिट लॉग्स पाएं

GET https://api.elevenlabs.io/v1/workspace/audit-logs

वर्कस्पेस का ऑडिट लॉग लौटाता है। इसके लिए एंटरप्राइज़ टियर और audit_log_read परमिशन चाहिए।

Reference: https://elevenlabs.io/docs/api-reference/workspace/audit-logs/list

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Query parameters

- `limit` (integer, optional, default: 50) — हर पेज पर एंट्री की अधिकतम संख्या
- `cursor` (string, optional, nullable) — अगले पेज का कर्सर (पिछले रिस्पॉन्स से)
- `time_from_unix_ms` (integer, optional, nullable) — केवल इस समय पर या इसके बाद की entries शामिल करें (epoch से ms)
- `time_to_unix_ms` (integer, optional, nullable) — केवल इस समय पर या इससे पहले की entries शामिल करें (epoch से ms)
- `actor_uid` (string, optional, nullable) — actor यूज़र ID के आधार पर फ़िल्टर करें
- `class_name` (string, optional, nullable) — OCSF इवेंट क्लास नाम के आधार पर फ़िल्टर करें (जैसे Account Change)
- `activity_name` (string, optional, nullable) — ऑडिट गतिविधि नाम के आधार पर फ़िल्टर करें (जैसे Subscription Creation)

## Response

### 200

सफल रिस्पॉन्स

- `entries` (list of WorkspaceAuditLogEntryResponse, required)
- `has_more` (boolean, required)
- `next_cursor` (string, required, nullable)

## Errors

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### WorkspaceAuditLogEntryResponse

API रिस्पॉन्स के लिए Firestore दस्तावेज़ ID वाली ऑडिट लॉग एंट्री।

- `activity_id` (WorkspaceAuditLogEntryResponseActivityId, required) — गतिविधि ID
- `activity_name` (string, required) — गतिविधि नाम
- `status_id` (enum, required) — कार्रवाई का स्टेटस
  - Allowed values: `0`, `1`, `2`, `99`
- `actor` (ActorModel, required) — कार्रवाई करने वाला अभिनेता
- `message` (string, required) — मानव-पठनीय इवेंट विवरण
- `id` (string, required) — Firestore दस्तावेज़ ID
- `time_dt` (string, required) — 'time' से लिया गया, मानव-पठनीय RFC 3339 फ़ॉर्मैट में इवेंट समय।
- `type_uid` (integer, required) — OCSF type_uid, class_uid * 100 + activity_id है।
- `type_name` (string, required) — OCSF type_name, class_name और activity_name को जोड़ता है।
- `metadata` (map from string to any, optional) — इवेंट मेटाडेटा
- `time` (integer, optional) — epoch के बाद से मिलीसेकंड में इवेंट समय
- `category_name` (string, optional, default: Identity & Access Management) — इवेंट श्रेणी
- `category_uid` (integer, optional, default: 3) — IAM के लिए श्रेणी UID
- `class_name` (string, optional, default: ) — इवेंट क्लास नाम
- `class_uid` (integer, optional, default: 0) — इवेंट क्लास UID
- `severity_id` (enum, optional) — severity level
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `99`
- `device` (DeviceModel, optional, nullable) — डिवाइस जानकारी
- `http_request` (HttpRequestModel, optional, nullable) — HTTP रिक्वेस्ट विवरण
- `unmapped` (map from string to any, optional) — OCSF से मैप न किए गए एट्रिब्यूट

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### WorkspaceAuditLogEntryResponseActivityId

गतिविधि ID

### ActorModel

OCSF Actor object - कार्रवाई करने वाली entity का वर्णन करता है। Spec: https://schema.ocsf.io/1.6.0/objects/actor

- `user` (UserModel, required) — कार्रवाई करने वाला यूज़र
- `app_name` (string, optional, nullable) — क्लाइंट एप्लिकेशन या सर्विस का नाम
- `app_uid` (string, optional, nullable) — क्लाइंट एप्लिकेशन का यूनीक आइडेंटिफ़ायर
- `session` (map from string to any, optional, nullable) — session की जानकारी

### DeviceModel

डिवाइस जानकारी। स्पेसिफ़िकेशन: https://schema.ocsf.io/1.6.0/objects/device

- `ip` (string, optional, nullable) — IP पता
- `hostname` (string, optional, nullable) — डिवाइस होस्टनेम
- `type_id` (integer, optional, default: 99) — डिवाइस प्रकार ID (99 = अज्ञात)

### HttpRequestModel

HTTP रिक्वेस्ट विवरण। स्पेसिफ़िकेशन: https://schema.ocsf.io/1.6.0/objects/http_request

- `http_method` (string, required) — HTTP मेथड (GET, POST आदि)
- `url` (UrlModel, required) — रिक्वेस्ट URL ऑब्जेक्ट
- `user_agent` (string, optional, nullable) — यूज़र एजेंट स्ट्रिंग
- `x_forwarded_for` (list of string, optional, nullable) — सूची के रूप में X-Forwarded-For हेडर

### ValidationErrorLocItems

### UserModel

OCSF User object। Spec: https://schema.ocsf.io/1.6.0/objects/user

- `name` (string, optional, nullable) — Username
- `uid` (string, optional, nullable) — विशिष्ट यूज़र पहचानकर्ता
- `type_id` (enum, optional) — अकाउंट प्रकार आइडेंटिफ़ायर
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `99`
- `type` (string, optional, nullable) — अकाउंट प्रकार का विवरण
- `email_addr` (string, optional, nullable) — यूज़र का ईमेल पता
- `full_name` (string, optional, nullable) — यूज़र का पूरा नाम
- `domain` (string, optional, nullable) — यूज़र का डोमेन

### UrlModel

OCSF URL object। Spec: https://schema.ocsf.io/1.6.0/objects/url

- `url_string` (string, optional, nullable) — पूरा URL स्ट्रिंग
- `scheme` (string, optional, nullable) — URL स्कीम (जैसे, https)
- `hostname` (string, optional, nullable) — URL होस्टनेम
- `port` (integer, optional, nullable) — URL पोर्ट
- `path` (string, optional, nullable) — URL पाथ
- `query_string` (string, optional, nullable) — URL क्वेरी स्ट्रिंग

## Examples

**Response**

```json
{
  "entries": [
    {
      "activity_id": 0,
      "activity_name": "string",
      "status_id": 0,
      "actor": {
        "user": {
          "name": "string",
          "uid": "string",
          "type_id": 0,
          "type": "string",
          "email_addr": "string",
          "full_name": "string",
          "domain": "string"
        },
        "app_name": "string",
        "app_uid": "string",
        "session": {}
      },
      "message": "string",
      "id": "string",
      "time_dt": "string",
      "type_uid": 1,
      "type_name": "string",
      "metadata": {},
      "time": 1,
      "category_name": "Identity & Access Management",
      "category_uid": 3,
      "class_name": "",
      "class_uid": 0,
      "severity_id": 0,
      "device": {
        "ip": "string",
        "hostname": "string",
        "type_id": 99
      },
      "http_request": {
        "http_method": "string",
        "url": {
          "url_string": "string",
          "scheme": "string",
          "hostname": "string",
          "port": 1,
          "path": "string",
          "query_string": "string"
        },
        "user_agent": "string",
        "x_forwarded_for": [
          "string"
        ]
      },
      "unmapped": {}
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/workspace/audit-logs"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/workspace/audit-logs';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/workspace/audit-logs"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/workspace/audit-logs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/workspace/audit-logs")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/workspace/audit-logs');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/workspace/audit-logs");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/workspace/audit-logs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```