|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.contrastsecurity.rest.ContrastConnection
public class ContrastConnection
Entry point for using the Contrast REST API. Make an instance of this class and call methods. Easy!
| Constructor Summary | |
|---|---|
ContrastConnection(String user,
String serviceKey,
String apiKey)
Create a ContrastConnection object that attempts to use the Contrast SaaS service. |
|
ContrastConnection(String user,
String serviceKey,
String apiKey,
String restApiURL)
Create a ContrastConnection object that will attempt to use the Contrast installation in the |
|
| Method Summary | |
|---|---|
int |
checkForTrace(String appId,
String conditions)
|
byte[] |
getAgent(AgentType type)
Download a Contrast agent associated with this account and the platform passed in. |
byte[] |
getAgent(AgentType type,
String profileName)
Download a contrast.jar agent associated with this account. |
Application |
getApplication(String appId)
Get summary information about a single app. |
List<Application> |
getApplications()
Get the list of applications being monitored by Contrast. |
Coverage |
getCoverage(String appId)
Return coverage data about the monitored Contrast application. |
List<Library> |
getLibraries(String appId)
Return the libraries of the monitored Contrast application. |
List<Trace> |
getTraces(String appId)
Get the vulnerabilities in the application whose ID is passed in. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContrastConnection(String user,
String serviceKey,
String apiKey,
String restApiURL)
throws IllegalArgumentException
user - Username (e.g., joe@acme.com)serviceKey - User service keyapiKey - API KeyrestApiURL - the base Contrast API URL
IllegalArgumentException - if the API URL is malformed
public ContrastConnection(String user,
String serviceKey,
String apiKey)
| Method Detail |
|---|
public Application getApplication(String appId)
throws IOException,
UnauthorizedException,
ResourceNotFoundException
appId - the ID of the application
UnauthorizedException - if the Contrast account failed to authorize
IOException - if there was a communication problem
ResourceNotFoundException
public List<Application> getApplications()
throws UnauthorizedException,
IOException
UnauthorizedException - if the Contrast account failed to authorize
IOException - if there was a communication problem
public Coverage getCoverage(String appId)
throws IOException,
UnauthorizedException
appId - the ID of the application
UnauthorizedException - if the Contrast account failed to authorize
IOException - if there was a communication problem
public List<Library> getLibraries(String appId)
throws IOException,
UnauthorizedException
appId - the ID of the application
UnauthorizedException - if the Contrast account failed to authorize
IOException - if there was a communication problem
public List<Trace> getTraces(String appId)
throws IOException,
UnauthorizedException
appId - the ID of the application
UnauthorizedException - if the Contrast account failed to authorize
IOException - if there was a communication problem
public int checkForTrace(String appId,
String conditions)
throws IOException,
UnauthorizedException
appId - the ID of the applicationconditions - a name=value pair querystring of trace conditions
UnauthorizedException - if the Contrast account failed to authorize
IOException - if there was a communication problem
public byte[] getAgent(AgentType type,
String profileName)
throws IOException
profileName - the name of the saved engine profile to download,
IOException - if there was a communication problem
public byte[] getAgent(AgentType type)
throws IOException
IOException
public static void main(String[] args)
throws UnauthorizedException,
IOException
UnauthorizedException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||