Oracle® Beehive RESTful Web Services API Reference Release 2 (2.0.1.7) E16658-04 |
The Utilities category consists of various resources that enable you to more efficiently use Oracle Beehive RESTful Web Services.
The /comb/v1/d/my
resource enables you to retrieve information about the current, logged in user.
Tips:
/my/workspace
retrieves the current, logged in user's personal workspace. However, the POST method /wstm/list
retrieves a list of team workspaces for the current, logged in user./wstm/directory
resource.Creating a Document
, EmailMessage
, or WikiPage
involves uploading their associated content first and then creating the artifact with the previously uploaded content.
In the POST method /session/upload
, specify a unique identifier for the content_id
parameter. This arbitrary string value is used to associate the content with a part of an EmailMessage
. Although you must specify this parameter when uploading content, it is not used if the uploaded content is used to create Document
or WikiPage
artifacts. Specify the scope of the upload in the uploadscope
parameter. The value of uploadscope
is an arbitrary string that binds together multiple content that are uploaded for the same intent, such as multiple parts of an e-mail message. In the payload of the POST request, specify the content you want to upload as raw (binary) data or use the format defined in RFC 1867: Form-based File Upload in HTML:
POST /comb/v1/d/session/upload?content_id=unique_identifier&uploadscope=unique_scope
Creating a Document artifact
If you are creating a Document
artifact, in the POST method /adoc
, specify the uploadscope
parameter with the same value you used in the previous step:
POST /comb/v1/d/adoc?uploadscope=unique_scope
The Document resource create method creates a new Document
artifact with the content you uploaded in the previous step.
Creating a WikiPage artifact
If you are creating a WikiPage
artifact, in the POST method /wiki
, specify the uploadscope
parameter with the same value you used in the previous step:
POST /comb/v1/d/wiki?uploadscope=unique_scope
The Wiki Page resource create method creates a new WikiPage
artifact with the content you uploaded in the previous step.
Creating an EmailMessage artifact
If you are sending an EmailMessage
artifact, in the POST method /emsg/send
, specify the uploadscope
parameter with the same value you used in the previous step:
POST /comb/v1/d/emsg/send?uploadscope=unique_scope
The payload to this method uses the content_id
parameters used in the previous step to associate uploaded content with the appropriate parts of the e-mail message. The following is an example of such a payload. The example assumes that the e-mail message is being sent with two parts: a text/plain part previously uploaded with a content_id
value of content_id_1 and an image/jpeg part previously uploaded with a content_id
value of content_id_2:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <obh:emailMessageContentUpdater xmlns:obh="http://www.oracle.com/beehive"> <mediaType>multipart/mixed</mediaType> <bodyUpdater xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="obh:multiContentUpdater"> <parts> <add xsi:type="obh:streamedSimpleContentUpdater"> <mediaType>text/plain</mediaType> <characterEncoding>utf-8</characterEncoding> <contentStreamId>content_id_1</contentStreamId> </add> <add xsi:type="obh:streamedSimpleContentUpdater"> <contentDisposition>ATTACHMENT</contentDisposition> <mediaType>image/jpeg</mediaType> <contentStreamId>content_id_2</contentStreamId> </add> </parts> </bodyUpdater> <subject> <string>Test subject</string> </subject> <toReceivers> <add> <address> <unparsed>john@example.com</unparsed> </address> </add> </toReceivers> </obh:emailMessageContentUpdater>
Notes:
It is possible to update the content of a previously created Document
or WikiPage
artifact. To do this, use the same two-step approach as described for creating objects with content. First, upload the content to be updated as in Step 1. Finally, call the appropriate update method with the same upload_scope
value as used in the previous step.
Copyright © 2008, 2012, Oracle and/or its affiliates. All rights reserved.
Legal Notices