Links

Last updated 29 days ago

Links are obscured, secure URLs to Onehub folders and files. They are created via unique tokens and are designed to provide shortcuts to Onehub content without requiring an account. You can read and update links.

https://ws-api.onehub.com
/:item/:item_id/link
Retrieves the link object from an :item (folder or file) specified via :item_id.
Request
Response
Path Parameters
:item
required
integer
The type of item. Can either be folders or files.
:item_id
required
integer
The unique identifier of the item you would like to retrieve the link from.
201: Created
Returns the link object and a 201 if the call succeeds.
{
"content_item_link": {
"token": "3mxsktkk",
"token_accessible": false,
"token_expires": false,
"token_expires_at": null,
"require_password": false,
"role_id": null,
"link": "/files/3mxsktkk",
"url": "/files/849607/link"
}
}
https://ws-api.onehub.com
/:item/:item_id/link
Updates the link object on the :item (folder or file) specified via :item_id.
Request
Response
Path Parameters
:item
optional
integer
The type of item. Can either be folders or files.
:item_id
optional
integer
The unique identifier of the item you would like to update the link on.
Body Parameters
require_password
optional
boolean
Should a password be required to access the link? Defaults to false.
password
optional
string
Set the required password that must be entered before the link can be accessed. Required if require_password is true.
token_accessible
optional
boolean
Is the link enabled? Defaults to false.
201: Created
Returns the updated link object and a 201 if the call succeeds.
{
"content_item_link": {
"token": "3mxsktkk",
"token_accessible": true,
"token_expires": false,
"token_expires_at": null,
"require_password": true,
"role_id": null,
"link": "/files/3mxsktkk",
"url": "/files/849607/link"
}
}