Skip to main content

Using the API wrappers as a library

You can use the Veracode API wrappers as a library, which enables you to call API functions without having to set up web requests and look up the required URL or query string parameters.

Reference the C# API wrapper from Visual Studio

You can reference the C# API wrapper as a library from Visual Studio. Adding the wrapper as a library enables you to call API functions without having to set up web requests and look up the required URL or query string parameters.

To complete this task:

  1. In Visual Studio, select View > Solution Explorer.

  2. Right-click the References folder and select Add Reference.

  3. In the Add Reference window, select the Browse tab.

  4. Locate and select the VeracodeC#API.exe file.

  5. Import the com.veracode.apiwrapper namespace.

  6. Optionally, complete these steps to display the API wrapper documentation in the Visual Studio interface. The documentation XML file must be in the same directory as the VeracodeC#API.exe file.

    a. In Solution Explorer, expand the References folder.

    b. Double-click VeracodeC#API.exe.

Reference the Java API wrapper from Eclipse

You can reference the Java API wrapper as a library from Eclipse. Adding the wrapper as a library enables you to call API functions without having to set up web requests and look up the required URL or query string parameters.

To complete this task:

  1. In Eclipse, select Window > Show View > Package Explorer.

  2. Right-click your project folder and select Build Path > Configure Build Path.

  3. Select the Libraries tab.

  4. Select Add External JARs....

  5. Locate and select the vosp-api-wrapper-java{version}.jar file.

  6. Click Open.

  7. Import the com.veracode.apiwrapper.wrappers package.

  8. Optionally, complete the following steps to display the API wrapper documentation in the Eclipse interface.

    a. In the Configure Build Path window, select the Libraries tab.

    b. Expand the vosp-api-wrapper-java-version.jar node and select Javadoc Location: (None).

    c. Click Edit....

    d. Browse to the folder containing the documentation and select OK.