This service provides the ability to manipulate documents, the images and attachments associated with them. Among
the things you can do with this service are:
- Create, publish, update, and delete documents, including binary documents. As you can in the UI, you can create a document,
then publish it in
a separate step. Until it's published, it's available to its author (and administrators) as a draft.
- Retrieve lists of documents. You can limit the list to those that are most popular, those in a particular
community/space, those needing approval, and so on.
- List, add and remove the images and attachments associated with a document.
- List, add and remove the approvers both for a document and at a larger scope. Approvers must approve a document
before it can be published. In the UI, they do this by clicking a button on the document.
addAttachmentToDocumentByDocumentID
Adds a new attachment to the specified document.
POST http://domain:port/application_context/rpc/rest/documentService/attachments
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document. |
| name |
xs:string |
The name of the file to add as an attachment. |
| contentType |
xs:string |
The MIME type of the attachment file. |
| source |
xs:base64Binary |
The attachment file's content. |
Arguments Template
<addAttachmentToDocumentByDocumentID>
<documentID>xs:string</documentID>
<name>xs:string</name>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</addAttachmentToDocumentByDocumentID>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| com.jivesoftware.community.AttachmentException |
If there is a problem adding the attachment. |
addAttachmentToDocumentByInternalDocID
Adds a new attachment to the specified document.
POST http://domain:port/application_context/rpc/rest/documentService/attachmentsByInternalDocID
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
ID of the document. |
| name |
xs:string |
The name of the file to add. |
| contentType |
xs:string |
The MIME type of the attachment file. |
| source |
xs:base64Binary |
The attachment file's content. |
Arguments Template
<addAttachmentToDocumentByInternalDocID>
<internalDocID>xs:long</internalDocID>
<name>xs:string</name>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</addAttachmentToDocumentByInternalDocID>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| com.jivesoftware.community.AttachmentException |
If there is a problem adding the attachment. |
addAuthor
Adds the specified user as an author of a document. Once any users have been added, the document is no longer
available for editing by just anyone with the appropriate permissions.
POST http://domain:port/application_context/rpc/rest/documentService/authors
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the user to add as an author. |
| userID |
xs:long |
ID of the document. |
Arguments Template
<addAuthor>
<documentID>xs:long</documentID>
<userID>xs:long</userID>
</addAuthor>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not
exist.
|
| UserNotFound |
If the specified user does not exist. |
| Unauthorized |
If the user does not have permission to modify the document. |
Adds the specified user as a document approver for an entire community.
This user will be required to approve all edits for all documents in this community.
POST http://domain:port/application_context/rpc/rest/documentService/approval/communityUsers
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community. |
| userID |
xs:long |
ID of the user to add as a document approver. |
Arguments Template
<addDocumentApproverOnCommunity>
<communityID>xs:long</communityID>
<userID>xs:long</userID>
</addDocumentApproverOnCommunity>Errors
| Error |
When Returned |
| CommunityNotFound |
If the specified community does not exist. |
| UserNotFound |
If the specified user does not exist. |
| Unauthorized |
If the caller does not have the proper permissions for the container. |
addDocumentApproverOnDocument
Adds a user as an approver for the specified document. If document approval is enabled for this document, the user
must approve it before it can be published after edits.
POST http://domain:port/application_context/rpc/rest/documentService/approval/users
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document. |
| userID |
xs:long |
ID of the user to add as an approver. |
Arguments Template
<addDocumentApproverOnDocument>
<documentID>xs:long</documentID>
<userID>xs:long</userID>
</addDocumentApproverOnDocument>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the document does not exist. |
| UserNotFound |
If the user does not exist. |
| Unauthorized |
If the caller does not have permission to modify the document. |
addImageToDocumentByDocumentID
Adds a new image to the specified document.
POST http://domain:port/application_context/rpc/rest/documentService/images
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document. |
| name |
xs:string |
The name of the image that to add. |
| contentType |
xs:string |
The mime type of the image file. |
| source |
xs:base64Binary |
The image file's content. |
Arguments Template
<addImageToDocumentByDocumentID>
<documentID>xs:string</documentID>
<name>xs:string</name>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</addImageToDocumentByDocumentID>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| com.jivesoftware.community.ImageException |
If there is a problem adding the image. |
| Unauthorized |
If the caller is not allowed to create images. |
addImageToDocumentByInternalDocID
Adds a new image to the document with the specified internal ID.
POST http://domain:port/application_context/rpc/rest/documentService/imagesByInternalDocID
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
Internal ID of the document. |
| name |
xs:string |
The name of the image to add. |
| contentType |
xs:string |
The mime type of the image file. |
| source |
xs:base64Binary |
The file content. |
Arguments Template
<addImageToDocumentByInternalDocID>
<internalDocID>xs:long</internalDocID>
<name>xs:string</name>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</addImageToDocumentByInternalDocID>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| com.jivesoftware.community.ImageException |
If there is a problem adding the image. |
| Unauthorized |
If the caller is not allowed to create images. |
createBinaryDocument
Creates a new binary document in the specified community.
If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
POST http://domain:port/application_context/rpc/rest/documentService/binaryDocument
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community in which to create the document. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| filename |
xs:string |
The name to use for the uploaded binary file. |
| contentType |
xs:string |
The file's MIME content type. |
| source |
xs:base64Binary |
The content of the binary file to upload. |
Arguments Template
<createBinaryDocument>
<communityID>xs:long</communityID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<filename>xs:string</filename>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</createBinaryDocument>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<createBinaryDocumentResponse>
<return>
<!-- Contents of Document -->
<return>
</createBinaryDocumentResponse>Errors
| Error |
When Returned |
| NotFound |
If the specified community does not exist. |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| com.jivesoftware.community.BinaryBodyException |
If the document does not have a binary body. |
| java.io.IOException |
If there are issues reading the binary document. |
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| Unauthorized |
If the caller doesn't have permission to view the community. |
| com.jivesoftware.community.AttachmentException |
|
createBinaryDocumentInContainer
Creates a new binary document in the specified container.
If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
POST http://domain:port/application_context/rpc/rest/documentService/createBinaryDocumentInContainer
Arguments
| Name |
Type |
Description |
| containerType |
xs:int |
The type of the container to create the document in. |
| containerID |
xs:long |
ID of the container to create the document in. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| filename |
xs:string |
The name to use for the uploaded binary file. |
| contentType |
xs:string |
The file's MIME content type. |
| source |
xs:base64Binary |
The content of the binary file to upload. |
Arguments Template
<createBinaryDocumentInContainer>
<containerType>xs:int</containerType>
<containerID>xs:long</containerID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<filename>xs:string</filename>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</createBinaryDocumentInContainer>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<createBinaryDocumentInContainerResponse>
<return>
<!-- Contents of Document -->
<return>
</createBinaryDocumentInContainerResponse>Errors
| Error |
When Returned |
| NotFound |
If the specified community does not exist. |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| com.jivesoftware.community.BinaryBodyException |
If the document does not have a binary body. |
| java.io.IOException |
If there are issues reading the binary document. |
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| Unauthorized |
If the caller doesn't have permission to view the community. |
| com.jivesoftware.community.AttachmentException |
|
createDocument
Creates a new document in the specified community. This does not publish the document; it will remain in a draft
state (not visible to others) until it is published.
If the body is in HTML format it must be contained in <body>
or <p> tags. If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
To create a document in a container other than a community/space, see the createDocument method that takes
a container type as a parameter.
POST http://domain:port/application_context/rpc/rest/documentService/documents
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community in which to create the document. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| body |
xs:string |
The body of the new document. |
Arguments Template
<createDocument>
<communityID>xs:long</communityID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<body>xs:string</body>
</createDocument>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<createDocumentResponse>
<return>
<!-- Contents of Document -->
<return>
</createDocumentResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| NotFound |
|
| UserNotFound |
If userID does not correspond to an existing user account. |
| CommunityNotFound |
If the specified community does not exist. |
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| java.lang.IllegalArgumentException |
If documentID not valid as a document ID. |
| Unauthorized |
If the caller doesn't have permission to view the community. |
createDocumentInContainer
Create a new document in the specified container. This does not publish the document; it will remain in a draft
state (not visible to others) until it is published.
If the body is in HTML format it must be contained in <body>
or <p> tags. If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
POST http://domain:port/application_context/rpc/rest/documentService/createDocumentInContainer
Arguments
| Name |
Type |
Description |
| containerType |
xs:int |
The type of container to create the document in. |
| containerID |
xs:long |
ID of the container to create the document in. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| body |
xs:string |
The body of the new document. |
Arguments Template
<createDocumentInContainer>
<containerType>xs:int</containerType>
<containerID>xs:long</containerID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<body>xs:string</body>
</createDocumentInContainer>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<createDocumentInContainerResponse>
<return>
<!-- Contents of Document -->
<return>
</createDocumentInContainerResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| NotFound |
|
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| java.lang.IllegalArgumentException |
If documentID not valid as a document ID. |
| Unauthorized |
If the caller doesn't have permission to view the container. |
deleteDocument
Deletes a document. Once a document is deleted, the document object should no longer be used. The search index
and other resources that referenced the document and its comments will also be updated appropriately.
Note that since documents are versioned you may want to just delete or archive a specific version of the
document instead of deleting the document, which will delete all of its versions. For more on deleting a version,
see
DELETE http://domain:port/application_context/rpc/rest/documentService/documents/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document to delete. |
Arguments Template
<deleteDocument>
<documentID>xs:long</documentID>
</deleteDocument>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not
exist.
|
| Unauthorized |
If the caller does not have administrator permissions for the community. |
deleteDocumentProperty
Deletes the specified property from the specified document.
DELETE http://domain:port/application_context/rpc/rest/documentService/properties/{documentID}/{name}
Arguments
| Name |
Type |
Description |
| name |
xs:string |
The name of the property to delete. |
| documentID |
xs:long |
ID of the document to delete the property from. |
Arguments Template
<deleteDocumentProperty>
<name>xs:string</name>
<documentID>xs:long</documentID>
</deleteDocumentProperty>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified message does not
exist.
|
| Unauthorized |
If the user does not have permission to modify the document. |
getApprovalStatusForDocument
Returns a list of
ApprovalStatus
that show which users have approved the specified document and which
haven't.
GET http://domain:port/application_context/rpc/rest/documentService/approval/status/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document for which to retrieve approval status. |
Arguments Template
<getApprovalStatusForDocument>
<documentID>xs:long</documentID>
</getApprovalStatusForDocument>Response
Response Template
<getApprovalStatusForDocumentResponse>
<!-- List of ... -->
<return>
<!-- Contents of ApprovalStatus -->
<return>
</getApprovalStatusForDocumentResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not
exist.
|
| Unauthorized |
If the caller doesn't have permissions to view the document. |
getAttachmentCountByDocumentID
Returns the number of attachments on the specified document.
GET http://domain:port/application_context/rpc/rest/documentService/attachmentCount/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document. |
Arguments Template
<getAttachmentCountByDocumentID>
<documentID>xs:string</documentID>
</getAttachmentCountByDocumentID>Response
| Type |
Description |
| xs:int |
The number of attachments. |
Response Template
<getAttachmentCountByDocumentIDResponse>
<return>xs:int</return>
</getAttachmentCountByDocumentIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getAttachmentCountByInternalDocID
Returns the number of attachments on the document with the specified internal ID.
GET http://domain:port/application_context/rpc/rest/documentService/attachmentCountByInternalDocID/{internalDocID}
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
ID of the document. |
Arguments Template
<getAttachmentCountByInternalDocID>
<internalDocID>xs:long</internalDocID>
</getAttachmentCountByInternalDocID>Response
| Type |
Description |
| xs:int |
The number of attachments. |
Response Template
<getAttachmentCountByInternalDocIDResponse>
<return>xs:int</return>
</getAttachmentCountByInternalDocIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getAttachmentsByDocumentID
Returns the attachments for the specified document.
GET http://domain:port/application_context/rpc/rest/documentService/attachments/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document. |
Arguments Template
<getAttachmentsByDocumentID>
<documentID>xs:string</documentID>
</getAttachmentsByDocumentID>Response
| Type |
Description |
| List of Attachment |
The attachments associated with the specified document. |
Response Template
<getAttachmentsByDocumentIDResponse>
<!-- List of ... -->
<return>
<!-- Contents of Attachment -->
<return>
</getAttachmentsByDocumentIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getAttachmentsByInternalDocID
Returns the attachments for the document with the specified internal document ID.
GET http://domain:port/application_context/rpc/rest/documentService/attachementsByInternalDocID/{internalDocID}
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
Internal ID of the document. |
Arguments Template
<getAttachmentsByInternalDocID>
<internalDocID>xs:long</internalDocID>
</getAttachmentsByInternalDocID>Response
| Type |
Description |
| List of Attachment |
The attachments associated with the specified document. |
Response Template
<getAttachmentsByInternalDocIDResponse>
<!-- List of ... -->
<return>
<!-- Contents of Attachment -->
<return>
</getAttachmentsByInternalDocIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getAuthors
Returns the users who are allowed to edit the document. If no users are specifically allowed to edit, then
anyone with appropriate permissions can do so.
GET http://domain:port/application_context/rpc/rest/documentService/authors/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document. |
Arguments Template
<getAuthors>
<documentID>xs:long</documentID>
</getAuthors>Response
| Type |
Description |
| List of User |
A list of the users who are allowed to edit the document. If no users are specifically allowed to edit,
then anyone with appropriate permissions can do so.
|
Response Template
<getAuthorsResponse>
<!-- List of ... -->
<return>
<!-- Contents of User -->
<return>
</getAuthorsResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller is not allowed to view the document. |
getBinaryDocumentContent
Returns the content of the specified binary document.
GET http://domain:port/application_context/rpc/rest/documentService/binaryDocument/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document. |
Arguments Template
<getBinaryDocumentContent>
<documentID>xs:string</documentID>
</getBinaryDocumentContent>Response
| Type |
Description |
| BinaryBody |
The binary document's data. |
Response Template
<getBinaryDocumentContentResponse>
<return>
<!-- Contents of BinaryBody -->
<return>
</getBinaryDocumentContentResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If documentID doesn't correspond to an existing
document.
|
| Unauthorized |
If the caller doesn't have permission to view the document. |
Returns all of the users who must approve new documents before they can be published.
GET http://domain:port/application_context/rpc/rest/documentService/approval/communityUsers/{communityID}
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community. |
Arguments Template
<getDocumentApproversOnCommunity>
<communityID>xs:long</communityID>
</getDocumentApproversOnCommunity>Response
| Type |
Description |
| List of User |
All of the document approvers. |
Response Template
<getDocumentApproversOnCommunityResponse>
<!-- List of ... -->
<return>
<!-- Contents of User -->
<return>
</getDocumentApproversOnCommunityResponse>Errors
| Error |
When Returned |
| CommunityNotFound |
If the specified community does not exist. |
| Unauthorized |
If the caller does not have permission to view the community. |
getDocumentApproversOnDocument
Returns all of the users who must approve the specified document before it can be published.
GET http://domain:port/application_context/rpc/rest/documentService/approval/users/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document. |
Arguments Template
<getDocumentApproversOnDocument>
<documentID>xs:long</documentID>
</getDocumentApproversOnDocument>Response
| Type |
Description |
| List of User |
All of the document approvers. |
Response Template
<getDocumentApproversOnDocumentResponse>
<!-- List of ... -->
<return>
<!-- Contents of User -->
<return>
</getDocumentApproversOnDocumentResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the document does not
exist.
|
getDocumentByDocumentID
Returns the specified document from a community.
GET http://domain:port/application_context/rpc/rest/documentService/documents/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document to retrieve. |
Arguments Template
<getDocumentByDocumentID>
<documentID>xs:string</documentID>
</getDocumentByDocumentID>Response
| Type |
Description |
| Document |
The document object. |
Response Template
<getDocumentByDocumentIDResponse>
<return>
<!-- Contents of Document -->
<return>
</getDocumentByDocumentIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If no document with the specified ID can be found. |
| Unauthorized |
If the caller doesn't have permissions to view the document. |
getDocumentByDocumentIDAndVersion
Returns the specified version of a document.
GET http://domain:port/application_context/rpc/rest/documentService/documents/{documentID}/{version}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document to retrieve. |
| version |
xs:int |
Number of the desired version. |
Arguments Template
<getDocumentByDocumentIDAndVersion>
<documentID>xs:string</documentID>
<version>xs:int</version>
</getDocumentByDocumentIDAndVersion>Response
| Type |
Description |
| Document |
The document version. |
Response Template
<getDocumentByDocumentIDAndVersionResponse>
<return>
<!-- Contents of Document -->
<return>
</getDocumentByDocumentIDAndVersionResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If no document with the specified ID can be found. |
| Unauthorized |
If the caller doesn't have permission to view the document. |
getDocumentByInternalDocID
Returns the specified document. Because it's a good idea to only display the string version of IDs to
users, most often this method will be used only internally to the API.
GET http://domain:port/application_context/rpc/rest/documentService/documentsByInternalDocID/{internalDocID}
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
The document's long doc ID. |
Arguments Template
<getDocumentByInternalDocID>
<internalDocID>xs:long</internalDocID>
</getDocumentByInternalDocID>Response
| Type |
Description |
| Document |
The document with the specified ID. |
Response Template
<getDocumentByInternalDocIDResponse>
<return>
<!-- Contents of Document -->
<return>
</getDocumentByInternalDocIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If no document with the specified ID can be found. |
| Unauthorized |
If the caller doesn't have permissions to view the document. |
getDocumentByInternalDocIDAndVersion
Returns the specified version of a document. Because it's a good idea to only display the string version of IDs to
users, most often this method will be used only internally to the API.
GET http://domain:port/application_context/rpc/rest/documentService/documentsByInternalDocID/{internalDocID}/{version}
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
The document's long doc ID. |
| version |
xs:int |
The number of the desired version. |
Arguments Template
<getDocumentByInternalDocIDAndVersion>
<internalDocID>xs:long</internalDocID>
<version>xs:int</version>
</getDocumentByInternalDocIDAndVersion>Response
| Type |
Description |
| Document |
The document version. |
Response Template
<getDocumentByInternalDocIDAndVersionResponse>
<return>
<!-- Contents of Document -->
<return>
</getDocumentByInternalDocIDAndVersionResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If no document with the specified ID can be found. |
| Unauthorized |
If the caller doesn't have permissions to view the document. |
getDocumentProperties
Returns the extended properties for the specified document.
GET http://domain:port/application_context/rpc/rest/documentService/properties/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document to retrieve properties for. |
Arguments Template
<getDocumentProperties>
<documentID>xs:long</documentID>
</getDocumentProperties>Response
| Type |
Description |
| List of Property |
A list of properties for the document. |
Response Template
<getDocumentPropertiesResponse>
<!-- List of ... -->
<return>
<!-- Contents of Property -->
<return>
</getDocumentPropertiesResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not
exist.
|
| Unauthorized |
If the caller is not allowed to view the document. |
getDocumentProperty
Returns the value of the specified extended property for a document.
GET http://domain:port/application_context/rpc/rest/documentService/properties/{documentID}/{name}
Arguments
| Name |
Type |
Description |
| name |
xs:string |
The name of the property. |
| documentID |
xs:long |
ID of the document to retrieve the property for. |
Arguments Template
<getDocumentProperty>
<name>xs:string</name>
<documentID>xs:long</documentID>
</getDocumentProperty>Response
| Type |
Description |
|
The value of the property; null if the property is not found. |
Response Template
<getDocumentPropertyResponse>
<return>xs:string</return>
</getDocumentPropertyResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not
exist.
|
| Unauthorized |
If the caller is not allowed to view the document. |
Returns all of the documents for the specified community.
GET http://domain:port/application_context/rpc/rest/documentService/documentsByCommunity/{communityID}
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community whose documents should be returned. |
Arguments Template
<getDocumentsByCommunity>
<communityID>xs:long</communityID>
</getDocumentsByCommunity>Response
| Type |
Description |
| List of Document |
returns The community's documents. |
Response Template
<getDocumentsByCommunityResponse>
<!-- List of ... -->
<return>
<!-- Contents of Document -->
<return>
</getDocumentsByCommunityResponse>Errors
| Error |
When Returned |
| CommunityNotFound |
If the specified community does not exist. |
| Unauthorized |
If the caller doesn't have permissions to view the community. |
getDocumentsByCommunityAndFilter
Returns all of the documents in the specified community and constrained by the specified filter.
POST http://domain:port/application_context/rpc/rest/documentService/documentsByCommunityAndFilter
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community whose documents should be returned. |
| filter |
Contents of DocumentResultFilter
|
The filter with which to constrain the results. |
Arguments Template
<getDocumentsByCommunityAndFilter>
<communityID>xs:long</communityID>
<filter>
<!-- Contents of DocumentResultFilter -->
<filter>
</getDocumentsByCommunityAndFilter>Response
| Type |
Description |
| List of Document |
A list of the documents in the community as constrained by the filter. |
Response Template
<getDocumentsByCommunityAndFilterResponse>
<!-- List of ... -->
<return>
<!-- Contents of Document -->
<return>
</getDocumentsByCommunityAndFilterResponse>Errors
| Error |
When Returned |
| CommunityNotFound |
If the specified community does not exist. |
| Unauthorized |
If the caller doesn't have permissions to view the community. |
getImageCountByDocumentID
Returns the number of images on the specified document.
GET http://domain:port/application_context/rpc/rest/documentService/imageCount/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
ID of the document. |
Arguments Template
<getImageCountByDocumentID>
<documentID>xs:string</documentID>
</getImageCountByDocumentID>Response
| Type |
Description |
| xs:int |
The number of images. |
Response Template
<getImageCountByDocumentIDResponse>
<return>xs:int</return>
</getImageCountByDocumentIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getImageCountByInternalDocID
Returns the number of images on the document with the specified internal ID.
GET http://domain:port/application_context/rpc/rest/documentService/imageCountByInternalDocID/{internalDocID}
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
Internal ID of the document. |
Arguments Template
<getImageCountByInternalDocID>
<internalDocID>xs:long</internalDocID>
</getImageCountByInternalDocID>Response
| Type |
Description |
| xs:int |
The number of images. |
Response Template
<getImageCountByInternalDocIDResponse>
<return>xs:int</return>
</getImageCountByInternalDocIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getImagesByDocumentID
Acquire the images for a document by the document id.
GET http://domain:port/application_context/rpc/rest/documentService/images/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
The id of the document. |
Arguments Template
<getImagesByDocumentID>
<documentID>xs:string</documentID>
</getImagesByDocumentID>Response
| Type |
Description |
| List of Image |
Images associated with the specified document. |
Response Template
<getImagesByDocumentIDResponse>
<!-- List of ... -->
<return>
<!-- Contents of Image -->
<return>
</getImagesByDocumentIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the document specified does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getImagesByInternalDocID
Returns the images for the document specified by its internal ID.
GET http://domain:port/application_context/rpc/rest/documentService/imagesByInternalDocID/{internalDocID}
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
Internal ID of the document. |
Arguments Template
<getImagesByInternalDocID>
<internalDocID>xs:long</internalDocID>
</getImagesByInternalDocID>Response
| Type |
Description |
| List of Image |
Images associated with the specified document. |
Response Template
<getImagesByInternalDocIDResponse>
<!-- List of ... -->
<return>
<!-- Contents of Image -->
<return>
</getImagesByInternalDocIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| Unauthorized |
If the caller does not have permission to view the document. |
getPopularDocuments
Returns the most popular documents from across all communities according to ratings, document views and time passed since
the document was created. The algorithm is as follows:
Top documents where ((document views) * (document mean rating+2)) * 1/(1 + number of days since creation date)
The number of documents returned is determined by the property popularDocuments.number, defaulting to
5 if the property is not specified. Popular documents are only calculated once every 15 minutes.
GET http://domain:port/application_context/rpc/rest/documentService/popularDocuments
Response
| Type |
Description |
| List of Document |
A list of the most popular documents. |
Response Template
<getPopularDocumentsResponse>
<!-- List of ... -->
<return>
<!-- Contents of Document -->
<return>
</getPopularDocumentsResponse>Returns the most popular documents in the given community according to ratings, document views and
time passed since the document was created. The algorithm is as follows:
Top documents where ((document views) * (document mean rating+2)) * 1/(1 + number of days since creation date)
The number of documents returned is determined by the property popularDocuments.number, defaulting to
5 if the property is not specified. Popular documents are only calculated once every 15 minutes.
GET http://domain:port/application_context/rpc/rest/documentService/popularDocumentsByCommunity/{communityID}
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community to fetch documents for. |
Arguments Template
<getPopularDocumentsByCommunity>
<communityID>xs:long</communityID>
</getPopularDocumentsByCommunity>Response
| Type |
Description |
| List of Document |
A list of the most popular documents in the community. |
Response Template
<getPopularDocumentsByCommunityResponse>
<!-- List of ... -->
<return>
<!-- Contents of Document -->
<return>
</getPopularDocumentsByCommunityResponse>Errors
| Error |
When Returned |
| CommunityNotFound |
If the specified community does not exist. |
| Unauthorized |
If the caller doesn't have permissions to view the community. |
getPopularDocumentsByLanguage
Returns the most popular documents in the given community according to ratings, document views and
time passed since the document was created in the specified languages. The algorithm is as follows:
Top documents where ((document views) * (document mean rating+2)) * 1/(1 + number of days since creation date)
The number of documents returned is determined by the property popularDocuments.number, defaulting to
5 if the property is not specified. Popular documents are only calculated once every 15 minutes.
GET http://domain:port/application_context/rpc/rest/documentService/documentsByLanguage/{languages}
Arguments
| Name |
Type |
Description |
| languages |
xs:string |
A list of ISO-639 language codes to constrain returned documents. |
Arguments Template
<getPopularDocumentsByLanguage>
<!-- List of ... -->
<languages>xs:string</languages>
</getPopularDocumentsByLanguage>Response
| Type |
Description |
| List of Document |
A list of the most popular documents in the specified languages. |
Response Template
<getPopularDocumentsByLanguageResponse>
<!-- List of ... -->
<return>
<!-- Contents of Document -->
<return>
</getPopularDocumentsByLanguageResponse>getUser
Returns the user who authored the document. If the document was created anonymously, this method will return
null.
GET http://domain:port/application_context/rpc/rest/documentService/user/{documentID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document. |
Arguments Template
<getUser>
<documentID>xs:long</documentID>
</getUser>Response
| Type |
Description |
| User |
The document's author. |
Response Template
<getUserResponse>
<return>
<!-- Contents of User -->
<return>
</getUserResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the document could not be found. |
| Unauthorized |
If the caller doesn't have permission to view the document. |
getUserApprovalDocuments
Returns a list of the documents that the specified user must approve before they can be published.
GET http://domain:port/application_context/rpc/rest/documentService/approvers/{userID}
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user. |
Arguments Template
<getUserApprovalDocuments>
<userID>xs:long</userID>
</getUserApprovalDocuments>Response
| Type |
Description |
| List of Document |
A list of the documents the user needs to approve. |
Response Template
<getUserApprovalDocumentsResponse>
<!-- List of ... -->
<return>
<!-- Contents of Document -->
<return>
</getUserApprovalDocumentsResponse>Errors
| Error |
When Returned |
| UserNotFound |
If userID doesn't correspond to a user in the system. |
Returns true if the comments feature is turned on. When comments are disabled, all individual
document comment settings are disabled as well.
GET http://domain:port/application_context/rpc/rest/documentService/commentsEnabled
Response
| Type |
Description |
| xs:boolean |
true if comments are enabled; otherwise false. |
Response Template
<isCommentsEnabledResponse>
<return>xs:boolean</return>
</isCommentsEnabledResponse>isTrackbacksEnabled
Returns true if the trackbacks feature is turned on. When trackbacks are disabled on the system, all individual
document trackback settings are disabled as well.
GET http://domain:port/application_context/rpc/rest/documentService/trackbacksEnabled
Response
| Type |
Description |
| xs:boolean |
true if trackbacks are enabled; otherwise false. |
Response Template
<isTrackbacksEnabledResponse>
<return>xs:boolean</return>
</isTrackbacksEnabledResponse>moveDocument
Moves a document from its current community to another one.
POST http://domain:port/application_context/rpc/rest/documentService/moveDocument
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document to move. |
| communityID |
xs:long |
ID of the community to move the document to. |
Arguments Template
<moveDocument>
<documentID>xs:long</documentID>
<communityID>xs:long</communityID>
</moveDocument>Errors
| Error |
When Returned |
| Unauthorized |
If the caller does not have administrator permissions for the
document's current community.
|
| NotFound |
If the specified community does not exist. |
moveDocumentToContainer
Moves a document from its current container to another.
POST http://domain:port/application_context/rpc/rest/documentService/moveDocumentToContainer
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document to move. |
| containerType |
xs:int |
Type of container to move the document to. |
| containerID |
xs:long |
ID of the container to move the document to. |
Arguments Template
<moveDocumentToContainer>
<documentID>xs:long</documentID>
<containerType>xs:int</containerType>
<containerID>xs:long</containerID>
</moveDocumentToContainer>Errors
| Error |
When Returned |
| Unauthorized |
If the caller does not have administrator permissions for the
document's current community.
|
| NotFound |
If the specified container does not exist. |
publishBinaryDocument
Publishes the specified binary document in the specified community. Whereas one of the createBinaryDocument* methods will
create the document but not publish it, this method both creates and publishes the document.
If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
To publish a binary document in a container other than a community/space, see the publishBinaryDocument method that takes
a container type as a parameter.
POST http://domain:port/application_context/rpc/rest/documentService/publishBinaryDocument
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community in which to create the document. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| filename |
xs:string |
The name to use for the uploaded binary file. |
| contentType |
xs:string |
The file's MIME content type. |
| source |
xs:base64Binary |
The content of the binary file to upload. |
Arguments Template
<publishBinaryDocument>
<communityID>xs:long</communityID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<filename>xs:string</filename>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</publishBinaryDocument>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<publishBinaryDocumentResponse>
<return>
<!-- Contents of Document -->
<return>
</publishBinaryDocumentResponse>Errors
| Error |
When Returned |
| NotFound |
If the specified community does not exist. |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| com.jivesoftware.community.BinaryBodyException |
If the document does not have a binary body. |
| java.io.IOException |
If there are issues reading the binary document. |
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| Unauthorized |
If the caller doesn't have permission to view the community. |
| com.jivesoftware.community.AttachmentException |
|
publishBinaryDocumentInContainer
Publishes the specified binary document in the specified container. Whereas one of the createBinaryDocument* methods will
create the document but not publish it, this method both creates and publishes the document.
If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
POST http://domain:port/application_context/rpc/rest/documentService/publishBinaryDocumentInContainer
Arguments
| Name |
Type |
Description |
| containerType |
xs:int |
The type of the container to create the document in. |
| containerID |
xs:long |
ID of the container to create the document in. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| filename |
xs:string |
The name to use for the uploaded binary file. |
| contentType |
xs:string |
The file's MIME content type. |
| source |
xs:base64Binary |
The content of the binary file to upload. |
Arguments Template
<publishBinaryDocumentInContainer>
<containerType>xs:int</containerType>
<containerID>xs:long</containerID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<filename>xs:string</filename>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</publishBinaryDocumentInContainer>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<publishBinaryDocumentInContainerResponse>
<return>
<!-- Contents of Document -->
<return>
</publishBinaryDocumentInContainerResponse>Errors
| Error |
When Returned |
| NotFound |
If the specified community does not exist. |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| com.jivesoftware.community.BinaryBodyException |
If the document does not have a binary body. |
| java.io.IOException |
If there are issues reading the binary document. |
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| Unauthorized |
If the caller doesn't have permission to view the community. |
| com.jivesoftware.community.AttachmentException |
|
publishDocument
Publishes the specified document in the specified community. Whereas one of the createDocument* methods will
create the document but not publish it, this method both creates and publishes the document.
If the body is in HTML format it must be contained in <body>
or <p> tags. If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
To publish a document in a container other than a community/space, see the publishDocument method that takes
a container type as a parameter.
PUT http://domain:port/application_context/rpc/rest/documentService/publish
Arguments
| Name |
Type |
Description |
| communityID |
xs:long |
ID of the community in which to create the document. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| body |
xs:string |
The body of the new document. |
Arguments Template
<publishDocument>
<communityID>xs:long</communityID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<body>xs:string</body>
</publishDocument>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<publishDocumentResponse>
<return>
<!-- Contents of Document -->
<return>
</publishDocumentResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| NotFound |
|
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| java.lang.IllegalArgumentException |
If documentID not valid as a document ID. |
| Unauthorized |
If the caller doesn't have permission to view the community. |
publishDocumentInContainer
Publishes the specified document in the specified container. Whereas one of the createDocument* methods will
create the document but not publish it, this method both creates and publishes the document.
If the body is in HTML format it must be contained in <body>
or <p> tags. If a documentID is not provided (for example, it's null or an empty string) one will be
automatically created. By default the autogenerated ID will in the form "tempDOC-#". However, the "tempDOC-"
prefix can be controlled by changing the jive.temporaryDocPrefix system property. If a documentID is provided,
it must start with "tempDoc-" or the prefix value in the jive.temporaryDocPrefix system property.
PUT http://domain:port/application_context/rpc/rest/documentService/publishDocumentInContainer
Arguments
| Name |
Type |
Description |
| containerType |
xs:int |
The type of container to create the document in. |
| containerID |
xs:long |
ID of the container to create the document in. |
| userID |
xs:long |
ID of the new document's author. |
| documentTypeID |
xs:long |
ID of the new document's document type. |
| documentID |
xs:string |
ID of the new document. null to create a default ID; otherwise, must start with "tempDoc-"
or the prefix value in the jive.temporaryDocPrefix system property.
|
| title |
xs:string |
The new document's title. |
| body |
xs:string |
The body of the new document. |
Arguments Template
<publishDocumentInContainer>
<containerType>xs:int</containerType>
<containerID>xs:long</containerID>
<userID>xs:long</userID>
<documentTypeID>xs:long</documentTypeID>
<documentID>xs:string</documentID>
<title>xs:string</title>
<body>xs:string</body>
</publishDocumentInContainer>Response
| Type |
Description |
| Document |
The newly created document. |
Response Template
<publishDocumentInContainerResponse>
<return>
<!-- Contents of Document -->
<return>
</publishDocumentInContainerResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DuplicateIDException |
If documentID is the same as an existing document. |
| NotFound |
If the specified container or user does not exist. |
| com.jivesoftware.community.DocumentAlreadyExistsException |
If documentID corresponds to a document that
already exists.
|
| com.jivesoftware.community.RejectedException |
If the document can not be added for some unknown
reason.
|
| java.lang.IllegalArgumentException |
If documentID not valid as a document ID. |
| Unauthorized |
If the caller doesn't have permission to view the container. |
removeAttachment
Removes the specified attachment. Only administrators or the document's creator are allowed to call this method.
DELETE http://domain:port/application_context/rpc/rest/documentService/attachments/{attachmentID}
Arguments
| Name |
Type |
Description |
| attachmentID |
xs:long |
ID of the attachment to remove. |
Arguments Template
<removeAttachment>
<attachmentID>xs:long</attachmentID>
</removeAttachment>Errors
| Error |
When Returned |
| com.jivesoftware.community.AttachmentNotFoundException |
If the specified attachment does not exist. |
| com.jivesoftware.community.AttachmentException |
If there is a problem deleting the attachment. |
| Unauthorized |
If the caller is not authorized to delete the attachment. |
removeAuthor
Removes the specified user as an author of the specified document.
DELETE http://domain:port/application_context/rpc/rest/documentService/authors/{documentID}/{userID}
Arguments
| Name |
Type |
Description |
| documentID |
xs:long |
ID of the document. |
| userID |
xs:long |
ID of the user to remove as a document author. |
Arguments Template
<removeAuthor>
<documentID>xs:long</documentID>
<userID>xs:long</userID>
</removeAuthor>Errors
| Error |
When Returned |
| UserNotFound |
If the user does not exist. |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the document does not exist. |
| Unauthorized |
If the user does not have permission to modify the document. |
Enables or disables the comments feature system wide.
POST http://domain:port/application_context/rpc/rest/documentService/commentsEnabled
Arguments
| Name |
Type |
Description |
| enableComments |
xs:boolean |
true to enable the comments feature; false to disable it. |
Arguments Template
<setCommentsEnabled>
<enableComments>xs:boolean</enableComments>
</setCommentsEnabled>Errors
| Error |
When Returned |
| Unauthorized |
If the caller is not a system administrator. |
setDocumentProperty
Sets the specified extended property for a document.
POST http://domain:port/application_context/rpc/rest/documentService/properties
Arguments
| Name |
Type |
Description |
| name |
xs:string |
The name of the property. |
| value |
xs:string |
The value of the property. |
| documentID |
xs:long |
ID of the document. |
Arguments Template
<setDocumentProperty>
<name>xs:string</name>
<value>xs:string</value>
<documentID>xs:long</documentID>
</setDocumentProperty>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified message does not
exist.
|
| Unauthorized |
If the caller does not have permission to modify the document. |
setTrackbacksEnabled
Enables or disables the trackbacks feature system wide.
POST http://domain:port/application_context/rpc/rest/documentService/trackbacksEnabled
Arguments
| Name |
Type |
Description |
| enableTrackbacks |
xs:boolean |
true to enableTrackbacks the trackback feature, false to disable |
Arguments Template
<setTrackbacksEnabled>
<enableTrackbacks>xs:boolean</enableTrackbacks>
</setTrackbacksEnabled>Errors
| Error |
When Returned |
| Unauthorized |
If the caller is not a system administrator |
updateDocument
Updates the specified document with the
document parameter value. The document passed as a parameter
should have the same ID as the document to be updated. For example, you could retrieve a document using one
of the get* methods, change values in its body content, then use this method to update the same document with
the changed version,
This method creates a new version of the existing document.
Note that a container will not allow two documents with the same subject. If you attempt to update a
document whose new subject is the same as a document already in the container, this method will return an
error.
PUT http://domain:port/application_context/rpc/rest/documentService/documents
Arguments
| Name |
Type |
Description |
| document |
Contents of Document
|
The document with which to update. |
Arguments Template
<updateDocument>
<document>
<!-- Contents of Document -->
<document>
</updateDocument>Errors
| Error |
When Returned |
| UserNotFound |
If userID does not correspond to an existing user account. |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If documentID does not correspond to a document
already in the system.
|
| com.jivesoftware.community.DocumentAlreadyExistsException |
If the <em>document</em> parameter has a subject
that is the same as a document in the same container as one you're trying to update.
|
| Unauthorized |
If the caller doesn't have permission to edit the document. |
uploadAttachmentToDocumentByDocumentID
Uploads a file as an attachment to the specified document.
POST http://domain:port/application_context/rpc/rest/documentService/attachmentUpload
Arguments
| Name |
Type |
Description |
| documentID |
xs:string |
The id of the document. |
| name |
xs:string |
The name of the file that is being added as an attachment. |
| contentType |
xs:string |
The mime type of the file. |
| source |
xs:base64Binary |
The file content. |
Arguments Template
<uploadAttachmentToDocumentByDocumentID>
<documentID>xs:string</documentID>
<name>xs:string</name>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</uploadAttachmentToDocumentByDocumentID>Response
| Type |
Description |
| Attachment |
The attachment created. |
Response Template
<uploadAttachmentToDocumentByDocumentIDResponse>
<return>
<!-- Contents of Attachment -->
<return>
</uploadAttachmentToDocumentByDocumentIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| com.jivesoftware.community.AttachmentException |
If there is a problem adding the attachment. |
| java.io.IOException |
If there is a problem storing the attachment. |
| Unauthorized |
If the caller is not allowed to create attachments. |
uploadAttachmentToDocumentByInternalDocID
Uploads a file as an attachment to the document specified internal ID.
POST http://domain:port/application_context/rpc/rest/documentService/attachmentUploadByInternalDocID
Arguments
| Name |
Type |
Description |
| internalDocID |
xs:long |
ID of the document. |
| name |
xs:string |
The name of the file that is being added as an attachment. |
| contentType |
xs:string |
The mime type of the file. |
| source |
xs:base64Binary |
The file content. |
Arguments Template
<uploadAttachmentToDocumentByInternalDocID>
<internalDocID>xs:long</internalDocID>
<name>xs:string</name>
<contentType>xs:string</contentType>
<!-- List of ... -->
<source>xs:base64Binary</source>
</uploadAttachmentToDocumentByInternalDocID>Response
| Type |
Description |
| Attachment |
The attachment created. |
Response Template
<uploadAttachmentToDocumentByInternalDocIDResponse>
<return>
<!-- Contents of Attachment -->
<return>
</uploadAttachmentToDocumentByInternalDocIDResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.DocumentObjectNotFoundException |
If the specified document does not exist. |
| com.jivesoftware.community.AttachmentException |
If there is a problem adding the attachment. |
| java.io.IOException |
If there is a problem storing the attachment. |
| Unauthorized |
If the caller is not allowed to create attachments. |