Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document Sysctl system resource

  • Loading branch information...
commit 539ef3170be48a4b39cd1221713ef8c44fe24e13 1 parent fbcea73
@williambr williambr authored
Showing with 155 additions and 0 deletions.
  1. +155 −0 docs/api/resources/system.rst
View
155 docs/api/resources/system.rst
@@ -977,3 +977,158 @@ Delete resource
Content-Type: application/json
:statuscode 204: no error
+
+
+Sysctl
+----------
+
+The Sysctl resource represents sysctl(8), get or set kernel state.
+
+List resource
++++++++++++++
+
+.. http:get:: /api/v1.0/system/sysctl/
+
+ Returns a list of all sysctls.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ GET /api/v1.0/system/sysctl/ HTTP/1.1
+ Content-Type: application/json
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Vary: Accept
+ Content-Type: application/json
+
+ [
+ {
+ "sysctl_mib": "net.inet.tcp.rfc1323",
+ "sysctl_comment": "",
+ "sysctl_value": "0",
+ "sysctl_enabled": true
+ "id": 1,
+ }
+ ]
+
+ :query offset: offset number. default is 0
+ :query limit: limit number. default is 30
+ :resheader Content-Type: content type of the response
+ :statuscode 200: no error
+
+
+Create resource
++++++++++++++++
+
+.. http:post:: /api/v1.0/system/sysctl/
+
+ Creates a new sysctl and returns the new sysctl object.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ POST /api/v1.0/system/sysctl/ HTTP/1.1
+ Content-Type: application/json
+
+ {
+ "sysctl_mib": "net.inet.tcp.rfc1323",
+ "sysctl_value": "0",
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 201 Created
+ Vary: Accept
+ Content-Type: application/json
+
+ {
+ "sysctl_mib": "net.inet.tcp.rfc1323",
+ "sysctl_comment": "",
+ "sysctl_value": "0",
+ "sysctl_enabled": true
+ "id": 1,
+ }
+
+ :json string sysctl_mib: name of the sysctl
+ :json string sysctl_value: value of the sysctl
+ :json string sysctl_comment: user comment for the entry
+ :json boolean sysctl_enabled: whether the entry is enabled
+ :reqheader Content-Type: the request content type
+ :resheader Content-Type: the response content type
+ :statuscode 201: no error
+
+
+Update resource
++++++++++++++++
+
+.. http:put:: /api/v1.0/system/sysctl/(int:id)/
+
+ Update sysctl `id`.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ PUT /api/v1.0/system/sysctl/1/ HTTP/1.1
+ Content-Type: application/json
+
+ {
+ "sysctl_value": "1",
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 202 Accepted
+ Vary: Accept
+ Content-Type: application/json
+
+ {
+ "sysctl_mib": "net.inet.tcp.rfc1323",
+ "sysctl_comment": "",
+ "sysctl_value": "1",
+ "sysctl_enabled": true
+ "id": 1,
+ }
+
+ :json string sysctl_mib: name of the sysctl
+ :json string sysctl_value: value of the sysctl
+ :json string sysctl_comment: user comment for the entry
+ :json boolean sysctl_enabled: whether the entry is enabled
+ :reqheader Content-Type: the request content type
+ :resheader Content-Type: the response content type
+ :statuscode 202: no error
+
+
+Delete resource
++++++++++++++++
+
+.. http:delete:: /api/v1.0/system/sysctl/(int:id)/
+
+ Delete sysctl `id`.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ DELETE /api/v1.0/system/sysctl/1/ HTTP/1.1
+ Content-Type: application/json
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 204 No Response
+ Vary: Accept
+ Content-Type: application/json
+
+ :statuscode 204: no error

0 comments on commit 539ef31

Please sign in to comment.
Something went wrong with that request. Please try again.