File item¶
Read/write
This resource type refers to a user’s feed file item.
-
GET
/api/v1/files/
(int: file_id)/
¶ Synopsis: Gets a feed file. Example request:
GET /api/v1/files/30/ HTTP/1.1 Host: localhost:8000 Accept: application/vnd.collection+json
Example response:
HTTP/1.1 200 OK Allow: GET, PUT, DELETE Content-Type: application/vnd.collection+json { "collection": { "href": "https://localhost:8000/api/v1/files/30/", "items": [ { "data": [ { "name": "fname", "value": "~/users/jbernal/feed_35/simplefsapp_60/simpledsapp_62/data/new_out.txt" } ], "href": "https://localhost:8000/api/v1/files/30/", "links": [ { "href": "https://localhost:8000/api/v1/files/30/new_out.txt", "rel": "file_resource" }, { "href": "https://localhost:8000/api/v1/35/", "rel": "feed" }, { "href": "https://localhost:8000/api/v1/plugins/instances/62/", "rel": "plugin_inst" } ] } ], "links": [], "template": { "data": [ { "name": "fname", "value": "" } ] }, "version": "1.0" } }
Request Headers: - Accept – application/vnd.collection+json
Response Headers: - Content-Type – application/vnd.collection+json
Status Codes: - 200 OK – no error
- 401 Unauthorized – authentication credentials were not provided
- 403 Forbidden – you do not have permission to perform this action
- 404 Not Found – not found
Properties (API semantic descriptors):
- fname (string) – file’s name. Can be part of the template object in PUT requests
- feed_id (int) – corresponding feed‘s id
- plugin_inst_id (int) – corresponding plugin instance‘s id
- feed – links to the corresponding feed
- file_resource – links to the file’s content
- plugin_inst – links to the plugin instance that created the file