File add

Documentation for using the OSSN API's POST method to handle file uploads. Submit the file data via the request to add common formats (e.g., DOCX, PDF, MP4, MP3) to the OSSN system and create the associated file object.

Endpoint

Method:

  • POST / GET

Parameter:

Parameter name Required Type Explain
api_key_token Yes string Your API key
container_type Yes string user or group
container_guid Yes integer container guid
file Yes file Send file file (docx,pdf,doc,mp3,mp4,zip,xlsx,xls)
uguid Yes integer guid of user trying to add a file

Example Response

{
    "merchant": "Premium Social Network",
    "url": "http:\/\/local.openteknik.com\/",
    "time_token": 1632343677,
    "payload": {
        "file": {
            "guid": 132,
            "time_created": 1632343672,
            "owner_guid": 1,
            "description": "Desc",
            "title": "somefile.pdf",
            "type": "user",
            "subtype": "file",
            "container_type": "user",
            "container_guid": "1",
            "file:File": "http:\/\/local.openteknik.com\/files\/download\/132",
            "icon": "http:\/\/local.openteknik.com\/components\/Files\/images\/icons\/pdf-icon-128x128.png"
        }
    },
    "code": "100",
    "message": "Request successfully executed"
}

Services View All