---
title: "Record Audit & Updates"
canonical: "https://support.soutron.net/space/LMSAPI/2228312/Record%20Audit%20%26%20Updates"
format: markdown
---
As well as searching fields in the usual way it is also possible to get only recently updated records, this can be done using the RevisionVersion field.

RevisionVersion is an integer field so can be used in the same way as [number searching](https://soutron.atlassian.net/wiki/spaces/LMSAPI/pages/2228275). Every time a record is created, modified or deleted it is assigned a unique sequential revision number. so by knowing the highest RevisionVersion value from your last query you can get only newly modified records for your next query.


| **Action** | **Example** | **Notes** |
| --- | --- | --- |
| New & Updated Records | **/SoutronAPI/catalogues?search=RevisionVersion:397723<>** | Will find all records created or edited since the specified RevisionVersion number. |
| New & updated records within a range | **/SoutronAPI/catalogues?search=RevisionVersion:397723<>398723** | Same as above but useful if you wish to only get small batches of updates at a time (in this case around 1000 records). you can also use <span style="color: #000000">page-size and page parameters.</span> |
| Deleted Records only | **/SoutronAPI/catalogues?search=RevisionVersion:405722<>&deleted=1** | Will find all records deleted since the specified RevisionVersion number. |

> ✅ If the same record has been modified several times each edit will generate a new RevisionVersion, so while you might be specifying a range of 1000 records the actual number returned could be less.



**<span style="color: #003366">Audit </span>****<span style="color: #003366">values</span>**<span style="color: #003366">: supports action name or value</span>

| **Action name** | **Value** | **Example** | **Notes** |
| --- | --- | --- | --- |
| Action<br>[Required] | 0 | AuditHistory:{0:Created}<br>AuditHistory:{Action:1} | Specify the record actions you are looking for.<br>Created = 1<br>Modified = 2<br>Deleted = 3<br>When searching for deleted records you must also pass the deleted search parameter. **deleted=1 **If you wish to find records which were deleted within a range but are now not deleted you could use **deleted=0** or to find restored and deleted records use **deleted=2** |
| DateFrom | 1 | AuditHistory:{DateFrom:2020-03-21} | Get records actioned FROM a specific date, best used when combined with DateTo. |
| DateTo | 2 | AuditHistory:{2:2020-03-21} | Get records actioned TO a specific date, best used when combined with DateFrom. |
| User | 5 | AuditHistory:{user:12345} | Get records modified by a specific user |

**Request: **/SoutronAPI/catalogues?search=AuditHistory:{user:12345;action:Created;DateFrom:2019-03-21;DateTo:2020-03-21}

<details>
<summary>Response</summary>

```xml
<response searchTime="327" sortTime="10" requestTime="491.5206">
	<resultInfo portalView="https://devtesting.soutron.net/Portal/Default/en-GB/Search/AdvancedSearch/?searchResultId=948" searchId="948">
		<contentTypes>
			<contentType caption="All" count="302" seq="0" current="1"/>
			<contentType id="3" caption="Serial" count="278" seq="1"/>
			<contentType id="1" caption="Printed Material" count="24" seq="2"/>
		</contentTypes>
		<recordTypes>
			<recordType id="1" caption="Books" count="24"/>
			<recordType id="28" caption="Issue" count="278"/>
		</recordTypes>
	</resultInfo>
	<records>
		<record id="405741" type="10" subType="1" rt="1" rtCaption="Books" ct="1" ctCaption="Printed Material" deleted="0" published="1">
			<fs>
				<f id="9" type="1" caption="Title">
					<vs>
						<v id="2561724" seq="1" custom="0">API Download Test</v>
					</vs>
				</f>
				<f id="51" type="1" caption="Document Type">
					<vs>
						<v value="1" caption="Books"/>
					</vs>
				</f>
			</fs>
		</record>
	</records>
</response>

```
</details>