Skip to content

GetDocumentKeywords API

Returns the keywords assigned to a document. Keywords are returned as a comma-separated list inside a single <Keywords> element.

A document carries two kinds of keyword and this API returns both, the ones the user curated first and the generated ones after them. Keywords a user entered are never touched when generated ones are produced or replaced, which is why the two are kept apart.

Changed in 9.0. Earlier builds returned only the user-defined keywords. Keywords generated by infoRouter Connect are now included in the same list. A keyword may also be a phrase of several words, such as acceptance letter, rather than a single word.

Endpoint

/srv.asmx/GetDocumentKeywords

Methods

  • GET /srv.asmx/GetDocumentKeywords?AuthenticationTicket=...&Path=...

  • POST /srv.asmx/GetDocumentKeywords (form data)

  • SOAP Action: http://tempuri.org/GetDocumentKeywords

Parameters

Parameter Type Required Description
AuthenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
Path string Yes Full infoRouter path to the document (e.g. /Finance/Reports/Q1-Report.pdf), or a short document ID path (~D{id} or ~D{id}.ext).

Response

Success Response

Returns a <response> root element containing a <Keywords> child element whose text content is a comma-separated list of all keywords assigned to the document.

<response success="true" error="">

  <Keywords>finance,quarterly,2024,approved</Keywords>

</response>
Element / Attribute Description
success "true" on success.
error Empty string on success.
<Keywords> Comma-separated list of keywords, the user's own first and the generated ones after. Empty text if no keywords are assigned.

No Keywords Response

When the document exists but has no keywords assigned:

<response success="true" error="">

  <Keywords></Keywords>

</response>

Error Response

<response success="false" error="[900] Authentication failed" />

Required Permissions

The calling user must have at least read access to the document.


Example

GET Request

GET /srv.asmx/GetDocumentKeywords

  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

  &Path=/Finance/Reports/Q1-2024-Report.pdf

HTTP/1.1

GET Request (short ID path)

GET /srv.asmx/GetDocumentKeywords

  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

  &Path=~D1051

HTTP/1.1

POST Request

POST /srv.asmx/GetDocumentKeywords HTTP/1.1

Content-Type: application/x-www-form-urlencoded



AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

&Path=/Finance/Reports/Q1-2024-Report.pdf

SOAP Request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

               xmlns:tns="http://tempuri.org/">

  <soap:Body>

    <tns:GetDocumentKeywords>

      <tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>

      <tns:Path>/Finance/Reports/Q1-2024-Report.pdf</tns:Path>

    </tns:GetDocumentKeywords>

  </soap:Body>

</soap:Envelope>

Notes

  • Keywords are returned as a single comma-separated string inside <Keywords>, not as individual child elements.

  • The list holds both kinds of keyword and does not say which is which. Use UpdateDocumentKeywords to set the user's own, and GetConnectProfile with IncludeKeywords=true to have generated ones produced.

  • A keyword may be a phrase and may contain spaces, so split the list on commas rather than on whitespace.

  • If the document has no keywords, <Keywords> is present but contains empty text.

  • Both full infoRouter paths and short document ID paths (~D{id} or ~D{id}.ext) are accepted for the Path parameter.



Error Codes

Error Description
[900] Authentication failed Invalid or missing authentication ticket.
[901] Session expired or Invalid ticket The ticket has expired or does not exist.
Document not found The specified path does not resolve to an existing document.
SystemError:... An unexpected server-side error occurred.