create Audit Log With Id

POST {{baseUrl}}/api/system/audit-log

Creates an audit log with the message and user name (usually an email). Audit logs should be written anytime you make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically written to the audit log. However, if you are accessing the API, you must write the audit logs yourself.

Request Body

{"auditLog"=>{"id"=>"<long>", "insertInstant"=>"<long>", "insertUser"=>"<string>", "message"=>"<string>", "reason"=>"<string>"}, "eventInfo"=>{"deviceDescription"=>"<string>", "deviceName"=>"<string>", "deviceType"=>"<string>", "ipAddress"=>"<string>", "location"=>{"city"=>"<string>", "country"=>"<string>", "latitude"=>"<double>", "longitude"=>"<double>", "region"=>"<string>", "zipcode"=>"<string>", "displayString"=>"<string>"}, "os"=>"<string>", "userAgent"=>"<string>"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;auditLog&quot;:{&quot;data&quot;:{&quot;Lorem732&quot;:{},&quot;sint_974&quot;:{},&quot;irureec&quot;:{}},&quot;id&quot;:&quot;\u003clong\u003e&quot;,&quot;insertInstant&quot;:&quot;\u003clong\u003e&quot;,&quot;insertUser&quot;:&quot;\u003cstring\u003e&quot;,&quot;message&quot;:&quot;\u003cstring\u003e&quot;,&quot;newValue&quot;:{},&quot;oldValue&quot;:{},&quot;reason&quot;:&quot;\u003cstring\u003e&quot;}}