events_events_create
POST/api/v3//events/events/
Event Read-Only Viewset
Request
- application/json
Body
required
Possible values: [login, login_failed, logout, user_write, suspicious_request, password_set, secret_view, secret_rotate, invitation_used, authorize_application, source_linked, impersonation_started, impersonation_ended, flow_execution, policy_execution, policy_exception, property_mapping_exception, system_task_execution, system_task_exception, system_exception, configuration_error, model_created, model_updated, model_deleted, email_sent, update_available, custom_]
Possible values: non-empty
Possible values: non-empty
Responses
- 201
- 400
- 403
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [login, login_failed, logout, user_write, suspicious_request, password_set, secret_view, secret_rotate, invitation_used, authorize_application, source_linked, impersonation_started, impersonation_ended, flow_execution, policy_execution, policy_exception, property_mapping_exception, system_task_execution, system_task_exception, system_exception, configuration_error, model_created, model_updated, model_deleted, email_sent, update_available, custom_]
{
"pk": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user": {},
"action": "login",
"app": "string",
"context": {},
"client_ip": "string",
"created": "2024-07-29T15:51:28.071Z",
"expires": "2024-07-29T15:51:28.071Z",
"brand": {}
}
- application/json
- Schema
- Example (from schema)
Schema
Validation Error
{
"non_field_errors": [
"string"
],
"code": "string"
}
- application/json
- Schema
- Example (from schema)
Schema
{
"detail": "string",
"code": "string"
}
Authorization: http
name: authentiktype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "/api/v3/events/events/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"user\": {},\n \"action\": \"login\",\n \"app\": \"string\",\n \"context\": {},\n \"client_ip\": \"string\",\n \"expires\": \"2024-07-29T15:51:28.071Z\",\n \"brand\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());