View the Protegrity REST API Specification Document

Access and view the REST API specification document. Use an OpenAPI specification editor, such as Swagger Editor, to generate samples.

The steps mentioned in this section contains the usage of Docker containers and services to download and launch the images for Swagger Editor within a Docker container.

For more information about Docker, refer to the Docker documentation.

The following example uses Swagger Editor to view the REST API specification document. In this example, JSON Web Token (JWT) is used to authenticate the REST API.

  1. Install and start the Swagger Editor.

  2. Download the Swagger Editor image within a Docker container using the following command.

    docker pull swaggerapi/swagger-editor
    
  3. Launch the Docker container using the following command.

    docker run -d -p 8888:8080 swaggerapi/swagger-editor
    
  4. Paste the following address on a browser window to access the Swagger Editor using the specified host port.

    http://localhost:8888/
    
  5. Download the REST API specification document using the following command.

    curl -H "Authorization: Bearer ${TOKEN}" "https://<Appliance IP address or Hostname>/pty/<Version>/<API>/doc" -H "accept: application/x-yaml" --output <api-doc>.yaml 
    

    In this command, TOKEN is the environment variable that contains the JWT token used to authenticate the REST API.

  6. Drag and drop the downloaded <api-doc>.yaml file into a browser window of the Swagger Editor.

Generating the REST API Samples Using the Swagger Editor

Perform the following steps to generate samples using the Swagger Editor.

  1. Open the <api-doc>.yaml file in the Swagger Editor.

  2. On the Swagger Editor UI, click on the required API request.

  3. Click Try it out.

  4. Enter the parameters for the API request.

  5. Click Execute.

    The generated Curl command and the URL for the request appears in the Responses section.

Last modified : April 28, 2025