GetPropertySets API¶
Returns all property set rows that have been applied to a document or folder identified by path. The path is resolved as a document first; if no document is found, it is resolved as a folder. Each applied property set is returned with all its data rows and audit information.
Endpoint¶
Methods¶
- GET
/srv.asmx/GetPropertySets?authenticationTicket=...&Path=... - POST
/srv.asmx/GetPropertySets(form data) - SOAP Action:
http://tempuri.org/GetPropertySets
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
Path |
string | Yes | Full infoRouter path to the target document or folder. |
Response¶
Success Response¶
<response success="true" error="">
<Propertysets>
<propertyset Name="PROJECTMETADATA">
<propertyrow RowNbr="1"
PROJECT_CODE="PRJ-2024-001"
STATUS="Active"
NOTES="Initial entry">
<Log AppliedById="1042" AppliedBy="jsmith" DateApplied="2024-03-15 14:32" />
</propertyrow>
<propertyrow RowNbr="2"
PROJECT_CODE="PRJ-2024-002"
STATUS="Draft"
NOTES="">
<Log AppliedById="4" AppliedBy="admin" DateApplied="2024-03-16 09:10" />
</propertyrow>
</propertyset>
<propertyset Name="AUDITINFO">
<propertyrow RowNbr="1"
AUDITOR="bjones"
AUDIT_DATE="2024-01-01">
<Log AppliedById="4" AppliedBy="admin" DateApplied="2024-01-05 08:00" />
</propertyrow>
</propertyset>
</Propertysets>
</response>
No Applied Property Sets¶
If the document or folder has no property set rows applied, the <Propertysets> element is empty:
Error Response¶
Response Structure¶
<Propertysets>¶
Container element listing all property sets applied to the object.
<propertyset>¶
| Attribute | Description |
|---|---|
Name |
Internal uppercase name of the property set (e.g., PROJECTMETADATA). |
<propertyrow>¶
| Attribute | Description |
|---|---|
RowNbr |
Row number within this property set for this object. |
FIELDNAME |
Each field in the property set is an attribute. Names are uppercase. Values are strings; empty string if no value is stored. |
<Log> (child of <propertyrow>)¶
| Attribute | Description |
|---|---|
AppliedById |
ID of the user who last saved this row. Use this to identify the user - a username is a label, not a key, and 0 where the row predates this being recorded. |
AppliedBy |
Username of the user who last saved this row. |
DateApplied |
Date and time the row was last saved, in YYYY-MM-DD HH:mm UTC format. |
Required Permissions¶
The calling user must have at least read access to the target document or folder.
Anonymous access is supported if the document or folder is publicly accessible.
Example¶
GET Request¶
GET /srv.asmx/GetPropertySets
?authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&Path=/MyLibrary/Projects/Proposal.pdf
HTTP/1.1
Host: yourserver
POST Request¶
POST /srv.asmx/GetPropertySets HTTP/1.1
Host: yourserver
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c&Path=/MyLibrary/Projects/Proposal.pdf
JavaScript¶
Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and
errorCode is the number to report.
async function call(action, params) {
const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
const root = new DOMParser()
.parseFromString(await response.text(), 'text/xml')
.documentElement;
if (root.getAttribute('success') !== 'true') {
throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
}
return root;
}
Reads the property set rows a document or a folder carries. Path resolves to a document first and
to a folder if there is no document there.
const root = await call('GetPropertySets', {
authenticationTicket: ticket,
Path: '/Finance/Projects/proposal.pdf'
});
for (const set of root.querySelectorAll('Propertysets > propertyset')) {
for (const row of set.querySelectorAll('propertyrow')) {
console.log(set.getAttribute('Name'),
row.getAttribute('RowNbr'),
row.getAttribute('PROJECTCODE'),
row.querySelector('Log').getAttribute('AppliedBy'),
row.querySelector('Log').getAttribute('DateApplied'));
}
}
Every field of the set is present on the row, and one that was never written comes back as an empty
attribute rather than a missing one. An object with no rows answers an empty <Propertysets />.
The element names here are not the ones GetPropertySetDefinition uses: rows live under
<Propertysets><propertyset Name="..."><propertyrow RowNbr="...">, while the definition reader
answers <PropertySet Name="..."><Fields><field FieldName="...">.
Notes¶
- The
Pathresolves to a document first; if not found, it is resolved as a folder. If neither is found, an error is returned. - Only property sets that have actually been applied (have at least one row) are included in the response.
- Field values are returned as attribute strings. Date and number values are returned in their stored string representation.
- To add a property set row, use AddPropertySetRow. To update one, use UpdatePropertySetRow. To remove one, use DeletePropertySetRow.
Related APIs¶
- AddPropertySetRow -" Add a property set row to a document or folder.
- UpdatePropertySetRow -" Update an existing property set row.
- DeletePropertySetRow -" Delete a property set row from a document or folder.
- GetPropertySetDefinition -" Get the field definitions of a property set.
- GetPropertySetDefinitions1 -" List property sets filtered by library and object type.
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown |
4041 |
no document and no folder at Path |
4000 |
the ticket is unknown - this operation reports 4000 where its neighbours report 4010 |
4030 |
the caller may not see that document or folder |
HTTP 400 |
a required string parameter was empty; refused by model binding, so there is no error document |