Replace instances of [resources] or [resource] with actual resource name.The config API endpoint is a special case. Because we're using Kohana's config classes under the hood we only really have 2 operations: get - HTTP GET - and set - HTTP PUT. You can use PUT to both create or update a config item.
Excerpt | ||||||
---|---|---|---|---|---|---|
|
Anchor | ||
---|---|---|
|
POST
...
config
The config API does not support POST.
METHOD: POST
ENDPOINT: /api/v2/[resources]/
AUTHENTICATED: No
The request body is a JSON representation of the [resource] being created.
Example request
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
POST https://ushv3.dev/api/v2/[resources]
|
config/
Anchor | ||
---|---|---|
|
GET
...
config/:group
Listing all [resources]config entries
METHOD: GET
ENDPOINT: /api/v2/[resources]config/:group
AUTHENTICATED: No
Query Parameters
Name | Type | Description |
---|---|---|
qgroup | Optional | Only [Resources] containing this search string will be returned, matched against 'tag' property |
type | Optional | Only [resources] of this type will be returned: report, revision, comment or alert |
order | Optional | Returned [resources] will be sorted in this order: ASC or DESC. Default: DESC |
order_by | Optional | Returned [resources] will be sorted by this field. Default: created |
limit | Optional | Limit number of results returned. Default: 50. Max: 500 |
offset | Optional | [Resources] returned will be offset by this number of results |
The group name to return config entries for |
Example Request
Panel | |||||||
---|---|---|---|---|---|---|---|
GET https://ushv3.dev/api/v2/[resources]config
|
...
|
Config group example
Panel | |||||||
---|---|---|---|---|---|---|---|
GET https://ushv3.dev/api/v2/[resources]?q=Davidconfig/test
|
Anchor | ||
---|---|---|
|
GET
...
config/:group/:id
Get a single [resource]single config entry
METHOD: GET
ENDPOINT: /api/v2/[resources]config/:group/:id
AUTHENTICATED: Yes
Query Parameters
Name | Type | Description |
---|---|---|
id | Required | The numerical id config key of the [resource] being updated.config entry |
group | Required | The group name of the config entry |
Example Request
Panel | |||||||
---|---|---|---|---|---|---|---|
GET http://ushv3.dev/api/v2/[resources]/1config/site/site_name
|
Anchor | ||
---|---|---|
|
PUT
...
config/:group/:id
Update a [resource]a config entry
METHOD: PUT
ENDPOINT: /api/v2/[resources]config/:group/:id
AUTHENTICATED: Yes
Query Parameters
Name | Type | Description |
---|---|---|
id | Required | The numerical id config key of the [resource] config entry being updated. |
group | Required | The group name of the config entry |
Example Request
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PUT http://ushv3.dev/api/v2/[resources]/1config/site/site_name
|
Anchor | ||
---|---|---|
|
DELETE
...
config/:
...
group/:id
The config API does not support DELETE.
METHOD: DELETE
ENDPOINT: /api/v2/[resources]config/:id
AUTHENTICATED: YES
Query Parameters
Name | Type | Description |
---|---|---|
id | Required | The numerical id of the [resource] being deleted. |
Example request
Panel | |||||||
---|---|---|---|---|---|---|---|
DELETE /api/v2/[resources]/2
|