Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nathanielvarona/pritunl-api-shell
A Curl wrapper for secure and simplified command-line requests
https://github.com/nathanielvarona/pritunl-api-shell
bash bash-script bash-scripting curl curl-wrapper pritunl pritunl-api pritunl-server pritunl-vpn shell shell-script
Last synced: about 1 month ago
JSON representation
A Curl wrapper for secure and simplified command-line requests
- Host: GitHub
- URL: https://github.com/nathanielvarona/pritunl-api-shell
- Owner: nathanielvarona
- License: mit
- Created: 2024-04-23T17:17:49.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-11T00:30:31.000Z (5 months ago)
- Last Synced: 2024-09-27T14:02:38.087Z (about 2 months ago)
- Topics: bash, bash-script, bash-scripting, curl, curl-wrapper, pritunl, pritunl-api, pritunl-server, pritunl-vpn, shell, shell-script
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pritunl-api-shell
Pritunl API Shell - a Curl wrapper for secure and simplified command-line requests## Usage
```bash
./pritunl-api-shell [payload]
```## Examples
### GET request:
```bash
./pritunl-api-shell GET /entity-uri
```### POST request with payload:
```bash
./pritunl-api-shell POST /entity-uri '{"name":"New Entity"}'
```### PUT request with payload:
```bash
./pritunl-api-shell PUT /entity-uri '{"name":"Update Entity"}'
```### DELETE request:
```bash
./pritunl-api-shell DELETE /entity-uri
```### Note:
* Replace `` with the desired HTTP method (`GET`, `POST`, `PUT`, `DELETE`, etc.)
* Replace `` with the Pritunl API endpoint path
* Replace `[payload]` with the optional request payload in JSON format## Installation:
* Make the script executable: `chmod +x pritunl-api-shell`
* Place the script in your preferred location, such as `~/bin` or `/usr/local/bin`## Configuration:
* Set the `PRITUNL_API_TOKEN`, `PRITUNL_API_SECRET`, and `PRITUNL_BASE_URL` environment variables to authenticate with the Pritunl API## Alternatives:
* For [Postman](https://www.postman.com/) Users
+ For a seamless API authentication experience, check out the [Pritunl API Authentication (for Postman Pre-Request Script)](./postman) script. This Postman pre-request script generates the necessary authentication headers for Pritunl API requests. Simply import the script into your Postman collection and enjoy effortless authentication!