Indivo Audit Log Schema
From Indivo
[edit] Beta 3 Schema
As of Beta 3, the schema will be returned as Indivo Reports according to the Indivo Reporting Schema. Each report item will be of type <AuditEntry>, as defined below:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
<xs:element name="AuditEntry">
<xs:complexType>
<xs:sequence>
<xs:element name="BasicInfo" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="datetime" type="xs:dateTime" use="required" />
<xs:attribute name="view_func" type="xs:string" use="required" />
<xs:attribute name="request_successful" type="xs:boolean" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="PrincipalInfo" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="effective_principal" type="xs:string" use="required" />
<xs:attribute name="proxied_principal" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="Resources" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="carenet_id" type="xs:string" use="required" />
<xs:attribute name="record_id" type="xs:string" use="required" />
<xs:attribute name="pha_id" type="xs:string" use="required" />
<xs:attribute name="document_id" type="xs:string" use="required" />
<xs:attribute name="external_id" type="xs:string" use="required" />
<xs:attribute name="message_id" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="RequestInfo" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="req_url" type="xs:string" use="required" />
<xs:attribute name="req_ip_address" type="xs:string" use="required" />
<xs:attribute name="req_domain" type="xs:string" use="required" />
<xs:attribute name="req_method" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="ResponseInfo" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:attribute name="resp_code" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
example:
<AuditEntry> <BasicInfo datetime="2011-04-27T17:32:23Z" view_func="get_document" request_successful="true" /> <PrincipalInfo effective_principal="myapp@apps.indivoheatlh.org" proxied_principal="me@indivohealth.org" /> <Resources carenet_id="" record_id="123" pha_id="" document_id="acd" external_id="" message_id="" /> <RequestInfo req_url="/records/123/documents/acd/" req_ip_address="127.0.0.1" req_domain="localhost" req_method="GET" /> <ResponseInfo resp_code="200" /> </AuditEntry>
[edit] Pre Beta3 Schema
Before the Beta 3 release, the audit schema looked like:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
<xs:element name="AuditLog">
<xs:complexType>
<xs:sequence>
<xs:element name="Entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="request_datetime" type="xs:dateTime" use="required" />
<xs:attribute name="effective_principal" type="xs:string" use="required" />
<xs:attribute name="proxied_principal" type="xs:string" use="required" />
<xs:attribute name="record_id" type="xs:string" use="required" />
<xs:attribute name="document_id" type="xs:string" use="required" />
<xs:attribute name="function" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
example:
<AuditLog>
<Entry request_datetime="2010-09-03T12:30:01Z" effective_principal="joeuser@indivo.example.org"
proxied_principal="problems@apps.indivo.org" record_id="123" document_id="456" function="document" />
<Entry request_datetime="2010-09-03T12:32:01Z" effective_principal="joeuser@indivo.example.org"
proxied_principal="problems@apps.indivo.org" record_id="123" document_id="456" function="document_update" />
</AuditLog>
