Reputation: 11
I am using Jive REST API to upload video. Based on the Jive REST documentation, I am following the process to submit the request.
POST:
https://{Community_Url}/api/core/v3/contents
Body (JSON format):
{
"content": {
"type": "text/html",
"text": "<body><p>Upload a file using API </p></body>"
},
"subject": "Test Video Aug 21 - 2",
"visibility": "place",
"categories" : [ "support" ],
"tags" : ["exit"],
"type": "video",
"attachments" : [{
"name" : "dolbycanyon.mp4",
"url" : "http://mirrors.standaloneinstaller.com/video-sample/dolbycanyon.mp4",
"doUpload" : "true"}]
}
Headers:
Content-Type: application/json
Authorization: "Basic {username and password}"
Unfortunately the response I am getting is a server issue.
Response:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>System Error</title>
<style>
body {
font-family : arial, helvetica, sans-serif;
font-size: 81.25%;
}
td, th, p, div, span, li, a { font-size : 1em; }
h1 { font-size : 1.72em; }
code {
font-family : courier new, monospace;
font-size : .8em;
}}
</style>
</head>
<body>
<div id="jive-header">
<h1>System Error</h1>
</div>
<p>
We're sorry but a serious error has occurred in the system.
</body>
</html>
Somehow, the "type":"video" in JSON request is not working. Can anybody provide some suggestions how to go about it
Upvotes: 1
Views: 393
Reputation: 724
To upload videos in Jive you need to use a different endpoint. Please check the API documentation below:
https://developers.jivesoftware.com/api/v3/cloud/rest/VideoService.html#uploadVideo(MultipartBody)
If you want to upload the video as a file (i.e. not to be rendered by Jive) you need to use the type "file":
https://developers.jivesoftware.com/api/v3/cloud/rest/FileEntity.html
Hope this helps.
Upvotes: 0