# Models

## The User object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}}}
```

## The Analyst object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Analyst":{"required":["user","organization"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"user":{"$ref":"#/components/schemas/User"},"organization":{"title":"Organization","type":"integer"},"name":{"title":"Name","type":"string","readOnly":true}}},"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}}}
```

## The UserProgress object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"UserProgress":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"string","minLength":1}},"filters":{"type":"array","items":{"type":"string","minLength":1}},"onboarding":{"type":"array","items":{"type":"string","minLength":1}}}}}}}
```

## The CurrentUser object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"CurrentUser":{"required":["user_progress"],"type":"object","properties":{"consent_given":{"title":"Consent given","type":"boolean"},"user_progress":{"$ref":"#/components/schemas/UserProgress"},"user_uuid":{"title":"User uuid","type":"string","format":"uuid","readOnly":true}}},"UserProgress":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"string","minLength":1}},"filters":{"type":"array","items":{"type":"string","minLength":1}},"onboarding":{"type":"array","items":{"type":"string","minLength":1}}}}}}}
```

## The CurrentUserPatch object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"CurrentUserPatch":{"type":"object","properties":{"consent_given":{"title":"Consent given","type":"boolean"},"user_progress":{"$ref":"#/components/schemas/UserProgress"},"user_uuid":{"title":"User uuid","type":"string","format":"uuid","readOnly":true}}},"UserProgress":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"string","minLength":1}},"filters":{"type":"array","items":{"type":"string","minLength":1}},"onboarding":{"type":"array","items":{"type":"string","minLength":1}}}}}}}
```

## The Group object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Group":{"required":["name"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"name":{"title":"Name","type":"string","maxLength":150,"minLength":1}}}}}}
```

## The OrganizationInvitation object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"OrganizationInvitation":{"required":["invitee_identifier"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"invitee_identifier":{"title":"Invitee identifier","type":"string","minLength":1},"role":{"title":"Role","type":"string","enum":["Analyst","IntegrationAdmin","OrganizationAdmin"]},"invited_by":{"title":"Invited by","type":"string","format":"uuid","readOnly":true},"sent_at":{"title":"Sent at","type":"string","format":"date-time","readOnly":true},"valid_until":{"title":"Valid until","type":"string","format":"date-time","readOnly":true}}}}}}
```

## The Email object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Email":{"required":["email"],"type":"object","properties":{"email":{"title":"Email","type":"string","format":"email","minLength":1}}}}}}
```

## The RateLimit object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}}}
```

## The Organization object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}}}
```

## The DataSourceList object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"DataSourceList":{"required":["name","organization"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"type__history_hours":{"title":"Type  history hours","type":"integer","readOnly":true},"type__slug":{"title":"Type  slug","type":"string","readOnly":true,"minLength":1},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"expiry":{"title":"Expiry","type":"string","format":"date-time"},"created_at":{"title":"Created at","type":"string","format":"date-time","readOnly":true},"enabled":{"title":"Enabled","type":"boolean"},"secret_name":{"title":"Secret name","type":"string","readOnly":true,"minLength":1},"organization":{"$ref":"#/components/schemas/Organization"}}},"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}}}
```

## The ActivityCountByEventType object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityCountByEventType":{"required":["event_type","slug","count"],"type":"object","properties":{"event_type":{"title":"Event type","type":"string","format":"uuid"},"slug":{"title":"Slug","type":"string","minLength":1},"count":{"title":"Count","type":"integer"}}}}}}
```

## The TaggedItem object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"TaggedItem":{"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"integration_type_slug":{"title":"Integration type slug","type":"string","readOnly":true},"eventtype_slug":{"title":"Eventtype slug","type":"string","readOnly":true},"tag_slug":{"title":"Tag slug","type":"string","readOnly":true}}}}}}
```

## The TaggedItemCreate object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"TaggedItemCreate":{"required":["integration_type_slug","eventtype_slug","tag_slug","uuid"],"type":"object","properties":{"integration_type_slug":{"title":"Integration type slug","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","minLength":1},"eventtype_slug":{"title":"Eventtype slug","type":"string","minLength":1},"tag_slug":{"title":"Tag slug","type":"string","minLength":1},"uuid":{"title":"Uuid","type":"string","format":"uuid"}}}}}}
```

## The TagsDatasource object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"TagsDatasource":{"required":["label","uuid","dataSources"],"type":"object","properties":{"label":{"title":"Label","type":"string","minLength":1},"uuid":{"title":"Uuid","type":"string","format":"uuid"},"dataSources":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}}
```

## The TagsByIntegration object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"TagsByIntegration":{"required":["Access","Context","Application"],"type":"object","properties":{"Access":{"type":"array","items":{"$ref":"#/components/schemas/TagsDatasource"}},"Context":{"type":"array","items":{"$ref":"#/components/schemas/TagsDatasource"}},"Application":{"type":"array","items":{"$ref":"#/components/schemas/TagsDatasource"}}}},"TagsDatasource":{"required":["label","uuid","dataSources"],"type":"object","properties":{"label":{"title":"Label","type":"string","minLength":1},"uuid":{"title":"Uuid","type":"string","format":"uuid"},"dataSources":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}}
```

## The Tag object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Tag":{"required":["label","scope"],"type":"object","properties":{"label":{"title":"Label","type":"string","maxLength":255,"minLength":1},"scope":{"title":"Scope","type":"string","minLength":1},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"id":{"title":"ID","type":"integer","readOnly":true}}}}}}
```

## The TagCreate object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"TagCreate":{"required":["label","scope"],"type":"object","properties":{"label":{"title":"Label","type":"string","minLength":1},"scope":{"title":"Scope","type":"string"}}}}}}
```

## The Activity object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Activity":{"required":["timestamp","identity","data_source","event_type","integration_unique"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"identity":{"title":"Identity","type":"string","format":"uuid"},"location":{"title":"Location","type":"string","format":"uuid"},"data_source":{"title":"Data source","type":"string","format":"uuid"},"event_type":{"title":"Event type","type":"string","format":"uuid"},"integration_unique":{"title":"Integration unique","type":"string","maxLength":255,"minLength":1}}}}}}
```

## The Timestamp object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Timestamp":{"required":["timestamp"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"}}}}}}
```

## The ActivityFirstLastTimestamp object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityFirstLastTimestamp":{"required":["first","last"],"type":"object","properties":{"first":{"$ref":"#/components/schemas/Timestamp"},"last":{"$ref":"#/components/schemas/Timestamp"}}},"Timestamp":{"required":["timestamp"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"}}}}}}
```

## The CombinedActivity object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"CombinedActivity":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The ActivityStatsActor object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityStatsActor":{"required":["actor","counts"],"type":"object","properties":{"actor":{"title":"Actor","type":"string","format":"uuid"},"counts":{"type":"array","items":{"$ref":"#/components/schemas/CombinedActivity"}}}},"CombinedActivity":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The ActivityCount object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityCount":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The ActivityStatsDataSource object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityStatsDataSource":{"required":["data_source","counts"],"type":"object","properties":{"data_source":{"title":"Data source","type":"string","format":"uuid"},"counts":{"type":"array","items":{"$ref":"#/components/schemas/ActivityCount"}}}},"ActivityCount":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The ActivityLabel object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityLabel":{"required":["label","counts","total_count"],"type":"object","properties":{"label":{"title":"Label","type":"string","format":"uuid"},"counts":{"type":"array","items":{"$ref":"#/components/schemas/ActivityCount"}},"total_count":{"title":"Total count","type":"integer"}}},"ActivityCount":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The ActivityStatsLabel object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityStatsLabel":{"required":["labels","data_source"],"type":"object","properties":{"labels":{"type":"array","items":{"$ref":"#/components/schemas/ActivityLabel"}},"data_source":{"title":"Data source","type":"string","format":"uuid"}}},"ActivityLabel":{"required":["label","counts","total_count"],"type":"object","properties":{"label":{"title":"Label","type":"string","format":"uuid"},"counts":{"type":"array","items":{"$ref":"#/components/schemas/ActivityCount"}},"total_count":{"title":"Total count","type":"integer"}}},"ActivityCount":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The ActivityStatsLocation object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"ActivityStatsLocation":{"required":["location","counts"],"type":"object","properties":{"location":{"title":"Location","type":"string","format":"uuid"},"counts":{"type":"array","items":{"$ref":"#/components/schemas/CombinedActivity"}}}},"CombinedActivity":{"required":["timestamp","count"],"type":"object","properties":{"timestamp":{"title":"Timestamp","type":"string","format":"date-time"},"count":{"title":"Count","type":"integer"}}}}}}
```

## The RawActivity object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"RawActivity":{"required":["activity_uuid","json_data"],"type":"object","properties":{"activity_uuid":{"title":"Activity uuid","type":"string","format":"uuid"},"json_data":{"title":"Json data","type":"object","additionalProperties":true}}}}}}
```

## The RawActivityDetailsField object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"RawActivityDetailsField":{"required":["field_name","value"],"type":"object","properties":{"field_name":{"title":"Field name","type":"string","maxLength":255,"minLength":1},"value":{"title":"Value","type":"string","maxLength":255,"minLength":1}}}}}}
```

## The RawActivityDetails object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"RawActivityDetails":{"required":["details"],"type":"object","properties":{"details":{"type":"array","items":{"$ref":"#/components/schemas/RawActivityDetailsField"}}}},"RawActivityDetailsField":{"required":["field_name","value"],"type":"object","properties":{"field_name":{"title":"Field name","type":"string","maxLength":255,"minLength":1},"value":{"title":"Value","type":"string","maxLength":255,"minLength":1}}}}}}
```

## The Actor object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Actor":{"required":["organization"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"given_name":{"title":"Given name","type":"string","maxLength":255},"family_name":{"title":"Family name","type":"string","maxLength":255},"organization":{"title":"Organization","type":"string","format":"uuid"},"identities":{"type":"array","items":{"type":"string","format":"uuid"},"readOnly":true}}}}}}
```

## The EventType object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"EventType":{"required":["integration_type","name","slug"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"integration_type":{"title":"Integration type","type":"string","format":"uuid"},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"slug":{"title":"Slug","type":"string","maxLength":255,"minLength":1},"discard":{"title":"Discard","type":"boolean"},"linked_tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"},"readOnly":true}}},"Tag":{"required":["label","scope"],"type":"object","properties":{"label":{"title":"Label","type":"string","maxLength":255,"minLength":1},"scope":{"title":"Scope","type":"string","minLength":1},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"id":{"title":"ID","type":"integer","readOnly":true}}}}}}
```

## The EventTypeDescription object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"EventTypeDescription":{"required":["event_type_uuid","description"],"type":"object","properties":{"event_type_uuid":{"title":"Event type uuid","type":"string","format":"uuid"},"description":{"title":"Description","type":"string","minLength":1}}}}}}
```

## The EventTypeDetails object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"EventTypeDetails":{"required":["description"],"type":"object","properties":{"description":{"title":"Description","type":"string","minLength":1}}}}}}
```

## The FilterJsonLabel object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The FilterJson object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"FilterJson":{"type":"object","properties":{"filter_name":{"title":"Filter name","type":"string","minLength":0},"filter_icon":{"title":"Filter icon","type":"string","minLength":0},"filter_description":{"title":"Filter description","type":"string","minLength":0},"actors":{"title":"Actors","type":"object","additionalProperties":{"type":"string"}},"data_sources":{"title":"Data sources","type":"object","additionalProperties":{"type":"string"}},"event_types":{"title":"Event types","type":"object","additionalProperties":{"type":"string"}},"locations":{"title":"Locations","type":"object","additionalProperties":{"type":"string"}},"labels":{"$ref":"#/components/schemas/FilterJsonLabel"},"date_range":{"title":"Date range","type":"object","additionalProperties":{"type":"string"}}}},"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The BuiltInFilter object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"BuiltInFilter":{"required":["filter_json"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"filter_json":{"$ref":"#/components/schemas/FilterJson"},"highlight":{"type":"array","items":{"type":"string","minLength":1}},"is_template":{"title":"Is template","type":"boolean","readOnly":true,"default":true}}},"FilterJson":{"type":"object","properties":{"filter_name":{"title":"Filter name","type":"string","minLength":0},"filter_icon":{"title":"Filter icon","type":"string","minLength":0},"filter_description":{"title":"Filter description","type":"string","minLength":0},"actors":{"title":"Actors","type":"object","additionalProperties":{"type":"string"}},"data_sources":{"title":"Data sources","type":"object","additionalProperties":{"type":"string"}},"event_types":{"title":"Event types","type":"object","additionalProperties":{"type":"string"}},"locations":{"title":"Locations","type":"object","additionalProperties":{"type":"string"}},"labels":{"$ref":"#/components/schemas/FilterJsonLabel"},"date_range":{"title":"Date range","type":"object","additionalProperties":{"type":"string"}}}},"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The UserFilterCreate object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"UserFilterCreate":{"required":["filter_json"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"user":{"title":"User","type":"string","format":"uuid","readOnly":true},"last_user_editor":{"title":"Last user editor","type":"string","format":"uuid","readOnly":true},"analyst":{"type":"integer","title":"Analyst"},"last_analyst_editor":{"type":"integer","title":"Last analyst editor"},"filter_json":{"$ref":"#/components/schemas/FilterJson"},"organization":{"type":"integer","title":"Organization"},"visibility":{"title":"Visibility","type":"string","enum":["user","organization"]},"is_temporary":{"title":"Is temporary","type":"boolean"},"created_at":{"title":"Created at","type":"string","format":"date-time","readOnly":true},"updated_at":{"title":"Updated at","type":"string","format":"date-time","readOnly":true}}},"FilterJson":{"type":"object","properties":{"filter_name":{"title":"Filter name","type":"string","minLength":0},"filter_icon":{"title":"Filter icon","type":"string","minLength":0},"filter_description":{"title":"Filter description","type":"string","minLength":0},"actors":{"title":"Actors","type":"object","additionalProperties":{"type":"string"}},"data_sources":{"title":"Data sources","type":"object","additionalProperties":{"type":"string"}},"event_types":{"title":"Event types","type":"object","additionalProperties":{"type":"string"}},"locations":{"title":"Locations","type":"object","additionalProperties":{"type":"string"}},"labels":{"$ref":"#/components/schemas/FilterJsonLabel"},"date_range":{"title":"Date range","type":"object","additionalProperties":{"type":"string"}}}},"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The UserFilterSwagger object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"UserFilterSwagger":{"required":["uuid","user","last_user_editor","filter_json","visibility","is_temporary","created_at","updated_at"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid"},"user":{"title":"User","type":"string","format":"uuid"},"last_user_editor":{"title":"Last user editor","type":"string","format":"uuid"},"filter_json":{"$ref":"#/components/schemas/FilterJson"},"visibility":{"title":"Visibility","type":"string","enum":["user","organization"]},"is_temporary":{"title":"Is temporary","type":"boolean"},"created_at":{"title":"Created at","type":"string","format":"date-time"},"updated_at":{"title":"Updated at","type":"string","format":"date-time"}}},"FilterJson":{"type":"object","properties":{"filter_name":{"title":"Filter name","type":"string","minLength":0},"filter_icon":{"title":"Filter icon","type":"string","minLength":0},"filter_description":{"title":"Filter description","type":"string","minLength":0},"actors":{"title":"Actors","type":"object","additionalProperties":{"type":"string"}},"data_sources":{"title":"Data sources","type":"object","additionalProperties":{"type":"string"}},"event_types":{"title":"Event types","type":"object","additionalProperties":{"type":"string"}},"locations":{"title":"Locations","type":"object","additionalProperties":{"type":"string"}},"labels":{"$ref":"#/components/schemas/FilterJsonLabel"},"date_range":{"title":"Date range","type":"object","additionalProperties":{"type":"string"}}}},"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The UserFilter object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"UserFilter":{"required":["filter_json","visibility"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"user":{"title":"User","type":"string","format":"uuid","readOnly":true},"last_user_editor":{"title":"Last user editor","type":"string","format":"uuid","readOnly":true},"analyst":{"type":"integer","title":"Analyst"},"last_analyst_editor":{"type":"integer","title":"Last analyst editor"},"filter_json":{"$ref":"#/components/schemas/FilterJson"},"organization":{"type":"integer","title":"Organization"},"visibility":{"title":"Visibility","type":"string","enum":["user","organization"]},"is_temporary":{"title":"Is temporary","type":"boolean"},"created_at":{"title":"Created at","type":"string","format":"date-time","readOnly":true},"updated_at":{"title":"Updated at","type":"string","format":"date-time","readOnly":true}}},"FilterJson":{"type":"object","properties":{"filter_name":{"title":"Filter name","type":"string","minLength":0},"filter_icon":{"title":"Filter icon","type":"string","minLength":0},"filter_description":{"title":"Filter description","type":"string","minLength":0},"actors":{"title":"Actors","type":"object","additionalProperties":{"type":"string"}},"data_sources":{"title":"Data sources","type":"object","additionalProperties":{"type":"string"}},"event_types":{"title":"Event types","type":"object","additionalProperties":{"type":"string"}},"locations":{"title":"Locations","type":"object","additionalProperties":{"type":"string"}},"labels":{"$ref":"#/components/schemas/FilterJsonLabel"},"date_range":{"title":"Date range","type":"object","additionalProperties":{"type":"string"}}}},"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The UserFilterPatchSwagger object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"UserFilterPatchSwagger":{"required":["filter_json"],"type":"object","properties":{"filter_json":{"$ref":"#/components/schemas/FilterJson"},"visibility":{"title":"Visibility","type":"string","enum":["user","organization"]}}},"FilterJson":{"type":"object","properties":{"filter_name":{"title":"Filter name","type":"string","minLength":0},"filter_icon":{"title":"Filter icon","type":"string","minLength":0},"filter_description":{"title":"Filter description","type":"string","minLength":0},"actors":{"title":"Actors","type":"object","additionalProperties":{"type":"string"}},"data_sources":{"title":"Data sources","type":"object","additionalProperties":{"type":"string"}},"event_types":{"title":"Event types","type":"object","additionalProperties":{"type":"string"}},"locations":{"title":"Locations","type":"object","additionalProperties":{"type":"string"}},"labels":{"$ref":"#/components/schemas/FilterJsonLabel"},"date_range":{"title":"Date range","type":"object","additionalProperties":{"type":"string"}}}},"FilterJsonLabel":{"type":"object","properties":{"Application":{"title":"Application","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Context":{"title":"Context","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}},"Access":{"title":"Access","type":"object","additionalProperties":{"type":"string","enum":["with","not"]}}}}}}}
```

## The Identity object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Identity":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"given_name":{"title":"Given name","type":"string","maxLength":255},"family_name":{"title":"Family name","type":"string","maxLength":255},"identifier":{"title":"Identifier","type":"string","format":"email","readOnly":true,"minLength":1},"data_source":{"title":"Data source","type":"integer"}}}}}}
```

## The Location object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Location":{"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"ip_address":{"title":"Ip address","type":"string","readOnly":true,"minLength":1},"city":{"title":"City","type":"string","readOnly":true,"minLength":1},"region":{"title":"Region","type":"string","readOnly":true,"minLength":1},"country":{"title":"Country","type":"string","readOnly":true,"minLength":1},"country_code":{"title":"Country code","type":"string","readOnly":true,"minLength":1},"latitude":{"title":"Latitude","type":"number","readOnly":true},"longitude":{"title":"Longitude","type":"number","readOnly":true},"category":{"title":"Category","type":"string","enum":["Unknown","Malicious","Trusted"],"readOnly":true}}}}}}
```

## The LocationPatch object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"LocationPatch":{"required":["category"],"type":"object","properties":{"category":{"title":"Category","type":"string","enum":["Unknown","Malicious","Trusted"]}}}}}}
```

## The UserQuery object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"UserQuery":{"required":["filter_json"],"type":"object","properties":{"filter":{"title":"Filter","type":"string","readOnly":true},"filter_json":{"title":"Filter json","type":"object","additionalProperties":true},"is_temporary":{"title":"Is temporary","type":"boolean"},"executed_at":{"title":"Executed at","type":"string","format":"date-time","readOnly":true}}}}}}
```

## The Version object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"Version":{"required":["version"],"type":"object","properties":{"version":{"title":"Version","type":"string","minLength":1}}}}}}
```

## The IntegrationType object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"IntegrationType":{"required":["name"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"slug":{"title":"Slug","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":50},"token_def":{"title":"Token def","type":"object"},"logo_data":{"title":"Logo data","type":"string"},"difficulty":{"title":"Difficulty","type":"integer","maximum":2147483647,"minimum":0},"oauth_start_url":{"title":"Oauth start url","type":"string","readOnly":true},"oauth_form":{"title":"Oauth form","type":"object","readOnly":true}}}}}}
```

## The DataSource object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"DataSource":{"required":["uuid","type","name"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid"},"type":{"$ref":"#/components/schemas/IntegrationType"},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"expiry":{"title":"Expiry","type":"string","format":"date-time"},"created_at":{"title":"Created at","type":"string","format":"date-time","readOnly":true},"secret_name":{"title":"Secret name","type":"string","readOnly":true,"minLength":1},"enabled":{"title":"Enabled","type":"boolean"}}},"IntegrationType":{"required":["name"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"slug":{"title":"Slug","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":50},"token_def":{"title":"Token def","type":"object"},"logo_data":{"title":"Logo data","type":"string"},"difficulty":{"title":"Difficulty","type":"integer","maximum":2147483647,"minimum":0},"oauth_start_url":{"title":"Oauth start url","type":"string","readOnly":true},"oauth_form":{"title":"Oauth form","type":"object","readOnly":true}}}}}}
```

## The DataSourceCreate object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"DataSourceCreate":{"required":["name"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid"},"organization":{"type":"integer","title":"Organization"},"type":{"type":"integer","title":"Type"},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"secret_name":{"title":"Secret name","type":"string","readOnly":true,"minLength":1},"enabled":{"title":"Enabled","type":"boolean"},"expiry":{"title":"Expiry","type":"string","format":"date-time"},"token":{"title":"Token","type":"object"},"code":{"title":"Code","description":"Authorization code from OAuth2 flow","type":"string","minLength":1},"state":{"title":"State","description":"State from /start endpoint","type":"string","minLength":1}}}}}}
```

## The DataSourceUpdate object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"DataSourceUpdate":{"required":["uuid","name"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid"},"type":{"$ref":"#/components/schemas/IntegrationType"},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"expiry":{"title":"Expiry","type":"string","format":"date-time"},"created_at":{"title":"Created at","type":"string","format":"date-time","readOnly":true},"secret_name":{"title":"Secret name","type":"string","readOnly":true,"minLength":1},"enabled":{"title":"Enabled","type":"boolean"}}},"IntegrationType":{"required":["name"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","type":"string","maxLength":255,"minLength":1},"slug":{"title":"Slug","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":50},"token_def":{"title":"Token def","type":"object"},"logo_data":{"title":"Logo data","type":"string"},"difficulty":{"title":"Difficulty","type":"integer","maximum":2147483647,"minimum":0},"oauth_start_url":{"title":"Oauth start url","type":"string","readOnly":true},"oauth_form":{"title":"Oauth form","type":"object","readOnly":true}}}}}}
```

## The SetupMarkdown object

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"components":{"schemas":{"SetupMarkdown":{"required":["title","markdown"],"type":"object","properties":{"title":{"title":"Title","type":"string","maxLength":255,"minLength":1},"markdown":{"title":"Markdown","type":"string","minLength":1}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.turngate.io/api-documentation/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
