Git Product home page Git Product logo

contrast-sdk-java's Introduction

Contrast TeamServer Java SDK

This SDK gives you a quick start for programmatically accessing the Contrast REST API using Java.

Requirements

  • JDK 7/8
  • Maven
  • TeamServer account

How to use this SDK

  1. Clone the project

  2. 'mvn clean install' Maven goals to build the artifact with the latest code

  3. Add contrast-sdk-java to your project dependency:

    <dependency>
        <groupId>com.contrastsecurity</groupId>
        <artifactId>contrast-sdk-java</artifactId>
    </dependency>
    
  4. Look up the following information from Contrast under "Your Account"

Code example:

ContrastSDK contrastSDK = new ContrastSDK.Builder("contrast_admin", "demo", "demo")
        .withApiUrl("http://localhost:19080/Contrast/api")
        .build();

String orgUuid = contrastSDK.getProfileDefaultOrganizations().getOrganization().getOrgUuid();

Applications apps = contrastSDK.getApplications(orgUuid);
for (Application app : apps.getApplications()) {
    System.out.println(app.getName() + " (" + app.getCodeShorthand() + " LOC)");
}

Sample output:

Aneritx (48K LOC)
Default Web Site (0k LOC)
EnterpriseTPS (48K LOC)
Feynmann (48K LOC)
jhipster-sample (0k LOC)
JSPWiki (48K LOC)
Liferay (48K LOC)
OpenMRS (65K LOC)
OracleFS (48K LOC)
Security Test (< 1K LOC)
Ticketbook (2K LOC)
WebGoat (48K LOC)
WebGoat7 (106K LOC)

Deprecation

The old-style constructor new ContrastSDK() has been deprecated in version 2.15. Please migrate your code to use new ContrastSDK.Builder()

We will remove the deprecated constructors in version 3.

contrast-sdk-java's People

Contributors

aliaandersen avatar andersonshatch avatar atzawada avatar cg-iwa avatar chrisisbeef avatar ddooleycontrast avatar dependabot[bot] avatar gmoore avatar hmcginnis avatar jleo32 avatar meg23 avatar nahsra avatar prashantmishracontrast avatar rduran0 avatar serge17 avatar sergeib-gmail avatar sethjackson avatar

Stargazers

 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.