Configurations (configurations)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new configuration
Request
Field Description: configuration entity
POST /rest/v1/master/configurations HTTP/1.1
Content-Type: application/json; charset=utf-8
configuration entity
Response
Field Description: configuration entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "ebff89d8-016b-d6e3-c598-e0d55e0cd13e",
"name": "my config",
"state": "initial",
"content": {
"general": {},
"aliases": {},
"domains": [],
"sites": [],
"servers": [],
"roles": [],
"structure": []
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-07-23T10:09:57.73Z",
"lwt": "2019-07-23T10:09:57.73Z"
}
}
Getting the list of configurations
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, state, ext.lwt, ext.ct, ext.version. |
|
|
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/master/configurations?filter={"state":"valid"}&offset=0&limit=2 HTTP/1.1
Response
Field Description: configuration entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "24be56bc-016c-1e4f-1fec-e0d55e0cd13e",
"name": "autogenerated",
"state": "valid",
"ext": {
"ct": "2019-07-09T13:19:39.92Z",
"ext.lwt": "2019-07-09T13:19:39.92Z"
}
},
{
"id": "ebff89d8-016b-d6e3-c598-e0d55e0cd13e",
"name": "my config",
"state": "valid",
"ext": {
"ct": "2019-07-23T10:09:57.73Z",
"lwt": "2019-09-10T16:06:22.15Z"
}
}
]
Retrieving configuration data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/master/configurations/ebff89d8-016b-d6e3-c598-e0d55e0cd13e HTTP/1.1
Response
Field Description: configuration entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "ebff89d8-016b-d6e3-c598-e0d55e0cd13e",
"name": "my config",
"state": "valid",
"content": {
"general": {},
"aliases": {},
"domains": [],
"sites": [],
"servers": [],
"roles": [],
"structure": []
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-07-23T10:09:57.73Z",
"lwt": "2019-07-23T10:09:57.73Z",
"version": "3.0",
"warnings": "",
"errormsg": ""
}
}
Changing configuration data
Fields prohibited for modification: id
Request
Field Description: configuration entity
PATCH /rest/v1/master/configurations/ebff89d8-016b-d6e3-c598-e0d55e0cd13e HTTP/1.1
Content-Type: application/json; charset=utf-8
configuration entity
Response
Field Description: configuration entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "ebff89d8-016b-d6e3-c598-e0d55e0cd13e",
"name": "my config",
"state": "valid",
"content": {
"general": {},
"aliases": {},
"domains": [],
"sites": [],
"servers": [],
"roles": [],
"structure": []
},
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-07-23T10:09:57.73Z",
"lwt": "2019-09-10T16:06:22.15Z",
"version": "3.0",
"warnings": "",
"errormsg": ""
}
}
Deleting a configuration
Searching for a configuration ID
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/master/configurations HTTP/1.1
Content-Type: application/json; charset=utf-8
"ebff89d8-016b-d6e3-c598-e0d55e0cd13e"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"ebff89d8-016b-d6e3-c598-e0d55e0cd13e"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}