GithubHelp home page GithubHelp logo

emzia / veracode-postman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from veracode/veracode-postman

0.0 0.0 0.0 21 KB

Use Veracode APIs from Postman

License: MIT License

JavaScript 100.00%

veracode-postman's Introduction


Accessing Veracode APIs with Postman

Overview

Using Veracode APIs with Postman requires initial configuration to accommodate HMAC signing. Below are instructions for getting up and running with Veracode APIs in Postman.

Before You Begin

Veracode environment

  1. Generate API credentials for your Veracode user.
  2. Save your API credentials to your credentials file.

Postman environment

  1. Install Postman on your machine. You can download from the Postman web site.
  2. Create a collection in Postman for your API calls, and edit the following settings:
    1. In the Environments section (left nav), add the following variables, selecting the secret type (for more information about secrets in environment variables, see the Postman docs):
      • api_id: (set to your Veracode API ID)
      • api_key: (set to your Veracode API Key)
    2. In the Authorization tab, select Digest Auth.
    3. In the Pre-Request Scripts tab, paste in the script found in pre-request.js.
    4. Recommended: In the Variables tab, define a variable called base_url and enter the base URL for your API calls. The base URL depends on your region and is documented in the REST APIs section in the Region Domains for Veracode Services.

Usage

  1. Go to the newly created collection and choose Add Request from the โ€ฆ. menu.
  2. Give the request a name and click Save to [Collection Name].
  3. Click on the newly created request and enter the request information in the URL fields at the top.
    1. Choose the HTTP method.
    2. Recommended: Enter the URL in the format {{base_url}}/url-string. For instance, to get information about the currently signed in user, enter {{base_url}}/api/authn/v2/users/self. (Note that this requires you to define base_url in the Variables tab for your collection.)
  4. Click on the Authorization tab and verify that it is set to Inherit auth from parent.
  5. Click on the Headers tab and add a header called Authorization with value {{hmacAuthHeader}}.
  6. Add any other information required by the request such as a body.
  7. Click Send.

Postman Example Collection

An example Postman collection is provided here. The Collection is a JSON package and includes a copy of the pre-request script. Upload it into your Postman application by selecting Import and dragging the file into the File window.

License

MIT license See the LICENSE for details

Acknowledgements

This work is indebted to CTCampbell's initial example for how to authenticate with Postman.

veracode-postman's People

Contributors

tjarrettveracode avatar literallyjustroy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.