RASS REST API
From Rambla Wiki
This API describes the manner in which the RAmbla Storage Service (aka RASS) can be addressed. For general information about Rambla Web Services and how to access them, first read the RAWS REST APIs page. To attach metadata to your media items, see our META API.
Contents |
Resources
Overview
The REST API allows HTTP access to a number of exposed resources.
- user : user account information and user-specific settings
- dir : corresponds to a directory on the CDN.
- item : corresponds to a file on the CDN.
- meta : corresponds to a file or directory on the CDN.
- ping : test if the web-service is available.
Restrictions
Some general name conventions apply to these resources:
- A user can only access dir or item resources that are located below his own root directory on the Rambla CDN. The top-level dir can not be deleted or renamed.
- dir and item names may only contain the characters A-Z, a-z, 0-9, '_', '.', and '-'. They are case-sensitive and must be at least 3 characters long, and at most 255 characters long.
- The item name uniquely identifies the media files on the server, together with the dir under which the item is located. Therefore, no two items in a single dir can have the same name.
- It is strongly recommended that all filenames are given an extension suffix, that indicates the mime-type of the media file.
Methods and URIs
The base URI for RASS resource access is http://rass.{cdn0X}.rambla.be/ (e.g. http://rass.cdn02.rambla.be/ for accessing RASS on Cdn02).
Here is an overview of the operations that are supported on the different types of resources.
| URI | GET | POST | PUT | DELETE | HEAD |
|---|---|---|---|---|---|
| /user/{username}/ | Get account info and settings | Edit user settings | |||
| /dir/[{dirname}/...]/ | List files and/or sub-directories for this directory. | Create new directory. | Create new directory. | Delete existing directory. | |
| /item/[{dirname}/.../]{itemname}/ | Download an existing file. | Create new file (also creates directory if required) | Create new file. | Delete existing file. | Retrieve mimetype and size. |
| /meta/{username}/[{dirname}.../{itemname}]/ | Return basic info about files (entry) and directories (feed). | ||||
| /ping/ | Test if the web-service is available. |