Skip to content

Pritunl API Shell - a Curl wrapper for secure and simplified command-line requests

License

Notifications You must be signed in to change notification settings

nathanielvarona/pritunl-api-shell

Repository files navigation

pritunl-api-shell

Pritunl API Shell - a Curl wrapper for secure and simplified command-line requests

Usage

./pritunl-api-shell <method> <path> [payload]

Examples

GET request:

./pritunl-api-shell GET /entity-uri

POST request with payload:

./pritunl-api-shell POST /entity-uri '{"name":"New Entity"}'

PUT request with payload:

./pritunl-api-shell PUT /entity-uri '{"name":"Update Entity"}'

DELETE request:

./pritunl-api-shell DELETE /entity-uri

Note:

  • Replace <method> with the desired HTTP method (GET, POST, PUT, DELETE, etc.)
  • Replace <path> 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:

  • Postman Users
    • For a seamless API authentication experience, check out the pritunl-api-auth-postman-pre-request.js 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!