Storage rules (storagerules)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new storage rule
Request
Field Description: storagerule entity
POST /rest/v1/domain/storagerules HTTP/1.1
Content-Type: application/json; charset=utf-8
storagerule entity
Response
Field Description: storagerule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"name": "Six months",
"expires": 180,
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-08-26T10:50:51.80Z"
}
}
Getting the list of storage rules
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, expires, opts.title, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/domain/storagerules?offset=0&limit=2 HTTP/1.1
Response
Field Description: storagerule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"name": "Month",
"expires": 30,
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-26T10:51:21.16Z",
"lwt": "2019-08-26T10:51:21.16Z"
}
},
{
"id": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"name": "Six months",
"expires": 180,
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-08-26T10:50:51.80Z"
}
}
]
Retrieving data storage rules
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/domain/storagerules/f8d1d8d6-016c-cd8c-ca1d-50e54938780c HTTP/1.1
Response
Field Description: storagerule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"name": "Six months",
"expires": 180,
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-08-26T10:50:51.80Z"
}
}
Change of storage rule data
Fields prohibited for modification: id
Request
Field Description: storagerule entity
PATCH /rest/v1/domain/storagerules/f8d1d8d6-016c-cd8c-ca1d-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
storagerule entity
Response
Field Description: storagerule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"name": "Six months",
"expires": 182,
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-09-11T10:31:09.55Z"
}
}
Removal of storage rules
Searching for storage rule identifier
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id
Request
LOOKUP /rest/v1/domain/storagerules HTTP/1.1
Content-Type: application/json; charset=utf-8
"f8d1d8d6-016c-cd8c-ca1d-50e54938780c"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"f8d1d8d6-016c-cd8c-ca1d-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}