HTTP Requests: JSON APIs
Summary
This module contains functions for sending HTTP requests & processing JSON responses.
It can be used to integrate PPA tasks with systems & applications that have JSON APIs.
Actions
http_requests.json.
delete
Make a DELETE request to a URL that returns a JSON response.
Minimum Plugin Version: 3.1.0
Input
-
url: the full url that you want to request
-
headers: an optional dictionary with the request headers
-
params: an optional dictionary with the query parameters
-
cookies: an optional dictionary with the request cookies
-
basic_auth: an optional BasicAuth dictionary
-
form_data: optional form data to send in the request
-
json_data: optional JSON data to send in the request
-
verify: set to
false
to skip certificate checking (defaults totrue
)
Output
A JsonResponse dictionary.
Request Data
You cannot supply values for both the form_data
& json_data
parameters to this action.
Supplying Credentials
You should always use a PPA Vault integration to provide credentials to a plugin action.
Example
Make an HTTP DELETE request with some query parameters.
1 2 3 4 5 6 7 8 9 |
|
http_requests.json.
get
Make a GET request to a URL that returns a JSON response.
Minimum Plugin Version: 1.0.0
Input
-
url: the full url that you want to request
-
headers: an optional dictionary with the request headers
-
params: an optional dictionary with the query parameters
-
cookies: an optional dictionary with the request cookies
-
basic_auth: an optional BasicAuth dictionary
-
verify: set to
false
to skip certificate checking (defaults totrue
)
Output
A JsonResponse dictionary.
Supplying Credentials
You should always use a PPA Vault integration to provide credentials to a plugin action.
Example
Make an HTTP GET request using basic authentication.
1 2 3 4 5 6 7 8 9 |
|
http_requests.json.
patch
Make a PATCH request to a URL that returns a JSON response.
Minimum Plugin Version: 3.1.0
Input
-
url: the full url that you want to request
-
headers: an optional dictionary with the request headers
-
params: an optional dictionary with the query parameters
-
cookies: an optional dictionary with the request cookies
-
basic_auth: an optional BasicAuth dictionary
-
form_data: optional form data to send in the request
-
json_data: optional JSON data to send in the request
-
verify: set to
false
to skip certificate checking (defaults totrue
)
Output
A JsonResponse dictionary.
Request Data
You cannot supply values for both the form_data
& json_data
parameters to this action.
Supplying Credentials
You should always use a PPA Vault integration to provide credentials to a plugin action.
Example
Make an HTTP PATCH request with some query parameters.
1 2 3 4 5 6 7 8 9 |
|
http_requests.json.
post
Make a POST request to a URL that returns a JSON response.
Minimum Plugin Version: 3.1.0
Input
-
url: the full url that you want to request
-
headers: an optional dictionary with the request headers
-
params: an optional dictionary with the query parameters
-
cookies: an optional dictionary with the request cookies
-
basic_auth: an optional BasicAuth dictionary
-
form_data: optional form data to send in the request
-
json_data: optional JSON data to send in the request
-
verify: set to
false
to skip certificate checking (defaults totrue
)
Output
A JsonResponse dictionary.
Request Data
You cannot supply values for both the form_data
& json_data
parameters to this action.
Supplying Credentials
You should always use a PPA Vault integration to provide credentials to a plugin action.
Example
Making an HTTP POST request to fill in a form.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|