Documentation for using the OSSN API's POST method to upload a new video file and create the associated metadata record. This functionality requires the OSSN Videos component version 7.1 or larger to handle the file submission correctly.
Endpoint
Method:
Parameter:
| Parameter name | Required | Type | Explain |
|---|---|---|---|
| api_key_token | Yes | string | Your API key |
| title | Yes | string | Video title |
| description | Yes | string | Video description |
| video | Yes | file | video file |
| container_type | Yes | string | user or group |
| container_guid | Yes | integer | Guid for container where video belongs (user guid or group guid) |
| uguid | Yes | integer | Loggedin user Guid |
Example Response
{
"merchant": "Premium Social Network",
"url": "http:\/\/local.openteknik.com\/",
"time_token": 1632228340,
"payload": {
"video": {
"guid": 126,
"time_created": 1632228336,
"owner_guid": 1,
"description": "Some description",
"title": "Test",
"type": "user",
"subtype": "video",
"container_guid": "1",
"container_type": "user",
"file:video": "URL for video file",
"file:cover": "URL for video cover image"
}
},
"code": "100",
"message": "Request successfully executed"
}
Return payload parameter description
| Parameter name | Explain |
|---|---|
| video | Newly created video |
You can now use the guid in response to track the conversion status. Videos won't be published unless conversion complete. However it is done auto you don't need to do it via API.
NOTE
The endpoints are updated you will now receive additional parameters total_likes total_comments and cl_entity_guid you will need cl_entity_guid to fetch a comments/likes for type entity