Create File Conversation

post

/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

Supported Media Types
Path Parameters
Header Parameters
  • 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.

  • Applink ID authorizing the current user to access the parent folder or this file. Any time the parameter appLinkID is used, a parameter accessToken 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.

  • 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>

  • 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.

Body ()
The request body defines details of the create file conversation request. Bold indicates a required value.
Root Schema : FileCreateConversationBody
Type: object
The request body defines details of the create file conversation request.
Show Source
Example Request (application/json)
{
    "conversationName":"File Conversation Test"
}
Back to Top

Response

Supported Media Types

200 Response

The request was fulfilled.

Body ()
Root Schema : FileCreateConversationResponse
Type: object
Show Source
Example Response (application/json)
{
    "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.

Back to Top

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"
}
Back to Top