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": "Half a year",
"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 output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
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": "Half a year",
"expires": 180,
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-08-26T10:50:51.80Z"
}
}
]
Getting storage rule data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
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": "Half a year",
"expires": 180,
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-08-26T10:50:51.80Z"
}
}
Modifying 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": "Half a year",
"expires": 182,
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T10:50:51.80Z",
"lwt": "2019-09-11T10:31:09.55Z"
}
}
Deleting a storage rule
Searching for a storage rule identifier
Searches for a resource by the specified key and returns the identifier(s) for building the endpoint.
Key fields for search: id