Changes the state of a Web Intelligence document referenced by its ID.
The state of a document in the WACS server can be one of the following:
State | Description |
---|---|
Unused | An unused document is a document that has not been loaded to the server. |
Original | An original document is a document that has been loaded to the server, but has not been modified. Its state can be changed to Unused to release the available memory, closing the document. |
Modified | A modified document is a document that has been loaded and modified. Its state can be changed to Unused. The document is closed to release the available memory. |
As soon as you open a document, its status becomes Original. You can move a document from a Modified or Original to Unused state to discard all document changes and close the document. This releases the memory of the WACS server.
PUT <webiURL>/documents/{documentId}
Where:
Request body:
<document> <state>Unused</state> </document>
Document State Change | Result |
---|---|
From Original to Unused |
The document is not modified and closed. |
From Original with no body or an empty body |
The document is not modified. |
From Modified to Unused |
The document is updated and closed. |
From Modified with no body or an empty body |
The document is updated and saved. |
Response body: application/xml or application/json
The response is a message stating the success or failure of the request.
PUT <webiURL>/documents/8008
Request body:
<document> <state>Unused</state> </document>
Response:
<success> <message>The resource of type 'document' with identifier '8008' has not been modified.</message> <id>8008</id> </success>
PUT <webiURL>/documents/9326
<success> <message>The resource of type 'document' with identifier '9326' has been successfully updated.</message> <id>9326</id> </success>