You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The REST API has been designed to support multiple content and accept types to allow for flexibility in the data being sent and received. This document outlines the content and accept types supported by the REST API.
4
+
5
+
## Content Types
6
+
7
+
Content types are used to specify the format of the data being sent in your request. You must specify the content type in the `Content-Type` header of your request. The REST API supports the following content types:
8
+
9
+
### application/json
10
+
- MIME Type: `application/json`
11
+
- Description: Use this content type to send JSON data in the body of your request. The data should be formatted as a JSON object or array.
12
+
- Example: ```{"key": "value"}```
13
+
14
+
### application/x-www-form-urlencoded
15
+
- MIME Type: `application/x-www-form-urlencoded`
16
+
- Description: Use this content type to send form data in the URL of the request. The data is sent as key-value pairs separated by an ampersand `&`.
The `application/x-www-form-urlencoded` content-type is not fully suitable for requests other than `GET` and `DELETE` requests. It is recommended to use `application/json` for all other request types.
21
+
22
+
## Accept Types
23
+
24
+
Accept types are used to specify the format of the data you would like to receive in the response. You can specify the accept type in the `Accept` header of your request, or the response will default to `application/json`. The REST API supports the following accept types:
25
+
26
+
### application/json
27
+
- MIME Type: `application/json`
28
+
- Description: Use this accept type to receive JSON data in the response. The data will be formatted as a JSON object or array.
You can bypass the Dispatcher spawning processes in the background by setting the ['async' control parameter](https://pfrest.org/COMMON_CONTROL_PARAMETERS/#async)
17
+
You can bypass the Dispatcher process spawning in the background in your API calls by setting the ['async' control parameter](https://pfrest.org/COMMON_CONTROL_PARAMETERS/#async)
18
18
to `false`. This will cause the Dispatcher to execute the operation within the main process and wait for the operation to
Copy file name to clipboardExpand all lines: docs/INSTALL_AND_CONFIG.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ Overall, the REST API package is designed to be as lightweight as possible and s
8
8
run pfSense. It's recommended to follow Netgate's [minimum hardware requirements](https://docs.netgate.com/pfsense/en/latest/hardware/minimum-requirements.html).
9
9
10
10
!!! Warning
11
-
While the package should behave identically on architectures other than amd64, it has only been tested on amd64
11
+
While the package should behave identically on architectures other than amd64, automated testing only covers amd64
12
12
builds of pfSense. Support on other architectures is not guaranteed.
13
13
14
14
### Supported pfSense versions
15
15
16
-
- pfSense CE 2.7.2 (amd64)
17
-
- pfSense Plus 24.03 (amd64)
16
+
- pfSense CE 2.7.2
17
+
- pfSense Plus 24.03
18
18
19
19
!!! Tip
20
20
Don't see your version of pfSense? Older versions of pfSense may be supported by older versions of this package.
When updating pfSense, **you must reinstall this package afterward** as pfSense removes unofficial packages during
39
-
system updates.
39
+
system updates and has no way to automatically reinstall them.
40
40
41
41
## Configuring the package
42
42
43
-
The REST API is designed to be used out of the box. However, there are a number of configuration options available to
43
+
The REST API is designed to be ready to use out of the box. However, there are a number of configuration options available to
44
44
you to customize the API to your needs. The REST API settings can be configured in pfSense webConfigurator under
45
45
'System' -> 'REST API' or via `PATCH` request to the [/api/v2/system/restapi/settings](https://pfrest.org/api-docs/#/SYSTEM/patchSystemRESTAPISettingsEndpoint)
0 commit comments