Quota Requests¶
-
class
nla_control.views.
QuotaView
(**kwargs)¶ :rest-api
Requests to resources which return information about a users Quota in the NLA system
-
get
(request, *args, **kwargs)¶ :rest-api
-
GET
/nla_control/api/v1/quota/id
¶ Get information about the user, specifically their quota, request and user details.
- Parameters
id (string) -- unique id for the user - currently the same as their JASMIN user-id
- Response JSON Array of Objects
id (integer) -- numeric id for the user
user (string) -- user name (as on JASMIN) for the user, the same as the quota name
size (integer) -- quota size in bytes
used (integer) -- amount used from quota, in bytes
email (string) -- email address of the user
notes (string) -- any notes on the user (project associated with, etc.)
requests (List[Dictionary]) -- list of requests submitted by the user. Each dictionary contains:
id (integer): the id of the request
request_date (DateTime): the date and time the request was made
retention (DateTime): the date and time the request will expire on
label (string): the label assigned to the request by the user, or a default of the request pattern or first file in a listing request
storaged_request_start (DateTime): (optional) the date and time the retrieval request started on StorageD
storaged_request_end (DateTime): (optional) the date and time the retrieval request concluded on StorageD
first_files_on_disk (DateTime): (optional) the date and time the first files arrived on the restore disk
last_files_on_disk (DateTime): (optional) the date and time the last files arrived on the restore disk
- Status Codes
200 OK -- request completed successfully.
404 Not Found -- user with id not found.
Example request
GET /nla_control/api/v1/quota/dhk63261 HTTP/1.1 Host: nla.ceda.ac.uk Accept: application/json
Example response
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json [ { "used": 1981562009, "notes": "Test user account for Neil Massey", "id": 6, "user": "dhk63261", "requests": [ { "last_files_on_disk": "2017-02-08T14:01:49.679483", "request_date": "2017-02-08T14:00:56.786661", "first_files_on_disk": "2017-02-08T14:01:49.652354", "label": "/neodc/sentinel1a/data/IW/L1_GRD/h/IPF_v2/2016/02/23/S1A_IW_GRDH_1SSV_20160223T132730_20160223T132755_010074_00ED60_3761", "storaged_request_start": "2017-02-08T14:01:28.614195", "storaged_request_end": "2017-02-08T14:01:49.679476", "id": 225, "retention": "2017-03-10T00:00:00" }, { "last_files_on_disk": "2017-02-06T12:16:29.912293", "request_date": "2017-02-06T11:02:17.498464", "first_files_on_disk": "2017-02-06T12:15:21.549330", "label": "/neodc/sentinel2a/data/L1C_MSI/2016/10/07/S2A_OPER_PRD_MSIL1C_PDMC_20161007T232231_R040_V20161007T162332_20161007T163154.zip", "storaged_request_start": "2017-02-06T11:57:49.437537", "storaged_request_end": "2017-02-06T12:16:29.912284", "id": 212, "retention": "2017-03-30T00:00:00" } ], "email": "neil.massey@stfc.ac.uk", "size": 1099511627776 } ]
-
-