Create File Conversation
/documents/api/1.2/files/{fileId}/conversation
Create a new conversation and associate it with the specified file. This request will also generate a conversation applink for the creator.
Request
- application/json
- application/xml
-
fileId: string
Globally unique identifier (GUID) for the file.
-
accessToken(optional): string
Applink access token authorizing the current user to access the parent folder or this file. This parameter is mandatory if
appLinkID
is used. It can be used as accessToken or AccessToken. -
appLinkID(optional): string
Applink ID authorizing the current user to access the parent folder or this file. Any time the parameter
appLinkID
is used, a parameteraccessToken
must be provided as well. To work, this applink must have at least the contributor role granted. It can be used as appLinkID or AppLinkID. -
dAccessCode(optional): string
Access code needed to use protected public links. It needs to be sent as part of a Cookie header in the following format:
dAccessCode-<linkID>=<passcodeValue>
-
linkID(optional): string
Public link ID of a public link authorizing the current user to access this file. To work, this public link must have the contributor role granted. It can be used as linkID or LinkID.
object
-
conversationName:
string
Maximum Length:
256
Specify the name of the newly created file conversation.
{
"conversationName":"File Conversation Test"
}
Response
- application/json
- application/xml
200 Response
The request was fulfilled.
object
-
conversationAppLink(optional):
string
Applink for the conversation.
-
conversationAppLinkToken(optional):
string
Access token that is valid for this applink for a limited duration.
-
conversationID(optional):
string
Globally unique identifier (GUID) of the newly created conversation.
-
conversationName(optional):
string
Conversation name.
-
errorCode(optional):
string
An error code of zero (0) indicates no errors.
-
id(optional):
string
Globally unique identifier (GUID) for the file.
-
listOfRemovedInactiveUsers(optional):
string
List of inactive users.
-
listOfUnknownUsers(optional):
string
List of unknown users.
-
type(optional):
string
Item type
file
.
{
"id":"DFCCA263ED167730B7824BFF98503556E71E89DE95CC",
"type":"file",
"errorCode":"0",
"conversationID":"13865",
"conversationName":"File Conversation Test",
"conversationAppLink":"http://service1-tenant1.dly.gemmain.shared.cec.oraclecorp.com:19200/osn/web/cList/conversations/13865",
"conversationAppLinkToken":"2842038cbf8b9c5db8ec37db134b5af44e9240d20f79891a0eb18e3df90b6684s"
}
400 Response
Request parameter is not formatted correctly.
403 Response
Forbidden if the user does not have read permission.
404 Response
File ID is not found.
Examples
The following example creates a conversation for a file.
POST .../files/DFCCA263ED167730B7824BFF98503556E71E89DE95CC/conversation
Request Header
None.
Request Body
{ "conversationName": "File Conversation Test" }
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{ "conversationAppLink": "http://service1-tenant1.dly.gemmain.shared.osn.oraclecorp.com:19200/osn/web/cList/conversations/13865", "conversationAppLinkToken": "2842038cbf8b9c5db8ec37db134b5af44e9240d20f79891a0eb18e3df90b6684", "conversationID": "13865", "conversationName": "File Conversation Test", "errorCode": "0", "id": "DFCCA263ED167730B7824BFF98503556E71E89DE95CC", "type": "file" }
Example 2
The following example creates a conversation for a file. The example uses an applink ID because this file is under a folder structure not owned by or shared with the current user. The applink ID and access token are submitted in the request header.
POST .../files/DED694950C14AFF280419F9AB5D17B95F47087F4E518/conversation
Request Header
appLinkID: LF5Bxj4TPo_p4n4qWn0tbKTicR2cTUJKv7X_ng9E7ry93rRuDokPqS1d6-wKwhb_wtcGYFDsI_cNMxeKQ-HR-FXQhiVoGRTYM_MPZY8qpICfYU94mmnMjM_cvsRhKMzc0NJgvwEJfqqDwPsAVrhc8cmg== accessToken: 352FpiMmW66PeYI1Gh5b83I9CXRwZhLfYAu4TXdqpzD8uNKUBMZVVJ3ZvivUW8kQ
Request Body
{ "conversationName": "Applink File Conversation Test" }
HTTP Status Code
HTTP_STATUS = 200
JSON Response
{ "conversationAppLink": "http://service1-twebcli.myhost.us.oracle.com:19200/osn/web/cList/conversations/12081", "conversationAppLinkToken": "088dc118855dd4056ee68d79d265353e4d87dc88f1806cf80dc400e23cb0c148", "conversationID": "12081", "conversationName": "Applink File Conversation Test", "errorCode": "0", "id": "DED694950C14AFF280419F9AB5D17B95F47087F4E518", "type": "file" }