public class ContrastSDK
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ContrastSDK.Builder |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT
Default connection timeout.
|
static int |
DEFAULT_READ_TIMEOUT
Default read timeout.
|
| Modifier and Type | Method and Description |
|---|---|
GenericResponse |
clearNotifications(java.lang.String organizationId)
Clear notifications for the org.
|
Application |
createApplication(java.lang.String organizationId,
ApplicationCreateRequest request)
Creates an application without a server that is meant to be instrumented later.
|
TagsResponse |
createTag(java.lang.String organizationId,
Tags tags)
Create a vulnerability tag for the organization whose ID is passed in.
|
TagsResponse |
deleteVulnerabilityTag(java.lang.String organizationId,
java.lang.String traceId,
Tag tag)
Delete the tag for the vulnerability whose ID is passed in.
|
void |
downloadAttestationReport(java.lang.String organizationId,
java.lang.String userId,
java.lang.String reportId)
Get the vulnerabilities in the organization whose ID is passed in.
|
void |
downloadFile(HttpMethod method,
java.lang.String path,
java.lang.String saveDir) |
GenericResponse |
generateAttestationReport(java.lang.String organizationId,
java.lang.String appId,
AttestationCreateRequest request)
Generate an attestation report for the application whose ID is passed in.
|
byte[] |
getAgent(AgentType type,
java.lang.String organizationId)
Download a contrast.jar agent associated with this account.
|
byte[] |
getAgent(AgentType type,
java.lang.String organizationId,
java.lang.String profileName)
Download a contrast.jar agent associated with this account.
|
Applications |
getApplication(java.lang.String organizationId,
java.lang.String appId)
Get summary information about a single app without expandValues.
|
Applications |
getApplication(java.lang.String organizationId,
java.lang.String appId,
java.util.EnumSet<FilterForm.ApplicationExpandValues> expandValues)
Get summary information about a single app.
|
Application |
getApplicationByNameAndLanguage(java.lang.String orgId,
java.lang.String appName,
AgentType language)
Gets a single application based on the org, name, and language
|
Applications |
getApplications(java.lang.String organizationId)
Get the list of applications being monitored by Contrast.
|
Applications |
getApplicationsNames(java.lang.String organizationId) |
AssessLicenseOverview |
getAssessLicensing(java.lang.String organizationId)
Get all Assess Licensing for an Organizations.
|
Coverage |
getCoverage(java.lang.String organizationId,
java.lang.String appId)
Return coverage data about the monitored Contrast application.
|
java.util.List<JobOutcomePolicy> |
getEnabledJobOutcomePolicies(java.lang.String organizationId)
Gets a list of enabled Job Outcome policies in an organization
|
java.util.List<JobOutcomePolicy> |
getEnabledJoboutcomePoliciesByApplication(java.lang.String organizationId,
java.lang.String appId)
Gets a list of enabeld Job Outcome Policies in an organization that applies to an application
|
EventSummaryResponse |
getEventSummary(java.lang.String organizationId,
java.lang.String traceId)
Get the event for the vulnerability ID that is passed in.
|
Applications |
getFilteredApplications(java.lang.String organizationId,
ApplicationFilterForm applicationFilterForm)
Get the list of filtered applications being monitored by Contrast.
|
GlobalProperties |
getGlobalProperties()
Gets the global properties from TeamServer.
|
HttpRequestResponse |
getHttpRequest(java.lang.String organizationId,
java.lang.String traceId)
Get the http request for the vulnerability ID that is passed in.
|
Libraries |
getLibraries(java.lang.String organizationId,
LibraryFilterForm filterForm)
Return the libraries of the Contrast organization.
|
Libraries |
getLibraries(java.lang.String organizationId,
java.lang.String appId) |
Libraries |
getLibraries(java.lang.String organizationId,
java.lang.String appId,
java.util.EnumSet<FilterForm.LibrariesExpandValues> expandValues)
Return the libraries of the monitored Contrast application.
|
Libraries |
getLibrariesWithFilter(java.lang.String organizationId,
LibraryFilterForm filterForm)
Return the libraries of the Contrast organization.
|
Libraries |
getLibrariesWithFilter(java.lang.String organizationId,
java.lang.String appId,
LibraryFilterForm filterForm)
Return the libraries of the monitored Contrast application.
|
LibraryScores |
getLibraryScores(java.lang.String organizationId)
Return the library Scores for an Organization.
|
LibraryStats |
getLibraryStats(java.lang.String organizationId)
Return the library Stats for an Organization.
|
Applications |
getLicensedApplications(java.lang.String organizationId)
Get the list of licensed applications being monitored by Contrast.
|
TraceNotesResponse |
getNotes(java.lang.String organizationId,
java.lang.String appId,
java.lang.String traceId,
TraceFilterForm form)
Get the notes (discussion) for the vulnerability ID in the application whose ID is passed in.
|
NotificationsResponse |
getNotifications(java.lang.String organizationId,
TraceFilterForm form)
Get notifications for the org.
|
Users |
getOrganizationUsers(java.lang.String organizationId)
Get all users for an organization.
|
Organizations |
getProfileDefaultOrganizations()
Get the default organization for the user profile.
|
Organizations |
getProfileOrganizations()
Get all organizations for the user profile.
|
RecommendationResponse |
getRecommendation(java.lang.String organizationId,
java.lang.String traceId)
Get the recommendation for the vulnerability ID that is passed in.
|
RouteCoverageResponse |
getRouteCoverage(java.lang.String organizationId,
java.lang.String appId,
RouteCoverageBySessionIDAndMetadataRequest metadata)
Return route coverage data about the monitored Contrast application.
|
Rules |
getRules(java.lang.String organizationId)
Get the rules for an organization
|
Servers |
getServers(java.lang.String organizationId,
ServerFilterForm filterForm)
Return the servers of the monitored Contrast application.
|
Servers |
getServersWithFilter(java.lang.String organizationId,
ServerFilterForm filterForm)
Return the servers of the monitored Contrast application.
|
ServerTagsResponse |
getServerTags(java.lang.String organizationId,
java.lang.String appId)
Get server tags for the org.
|
MetadataFilterResponse |
getSessionMetadataForApplication(java.lang.String organizationId,
java.lang.String appId,
TraceFilterForm form)
Get the available session metadata values in the application whose ID is passed in.
|
StoryResponse |
getStory(java.lang.String organizationId,
java.lang.String traceId)
Get the story for the vulnerability ID that is passed in.
|
TagsResponse |
getTagsByTrace(java.lang.String organizationId,
java.lang.String traceId)
Get the tags for the vulnerability whose ID is passed in.
|
Traces |
getTraceFilterByRule(java.lang.String organizationId,
java.lang.String appId,
java.util.List<java.lang.String> ruleNames)
Deprecated.
|
TraceListing |
getTraceFilters(java.lang.String organizationId,
java.lang.String appId)
Get the filters for the traces in the application.
|
TraceListing |
getTraceFiltersByType(java.lang.String organizationId,
java.lang.String appId,
TraceFilterType type) |
Traces |
getTraces(java.lang.String organizationId,
java.lang.String appId,
TraceFilterBody filters)
Get the vulnerabilities in the application that match specific metadata filters.
|
Traces |
getTraces(java.lang.String organizationId,
java.lang.String appId,
TraceFilterForm form)
Deprecated.
Use
getTraces instead. |
Traces |
getTracesInOrg(java.lang.String organizationId,
TraceFilterForm form)
Get the vulnerabilities in the organization whose ID is passed in.
|
Traces |
getTracesWithFilter(java.lang.String organizationId,
java.lang.String appId,
TraceFilterType traceFilterType,
TraceFilterKeycode keycode,
TraceFilterForm form)
Get the vulnerabilities in the application whose ID is passed in with a filter.
|
TracesWithResponse |
getTracesWithResponse(java.lang.String organizationId,
java.lang.String appId,
TraceFilterForm form)
Get the vulnerabilities in the application whose ID is passed in.
|
TagsResponse |
getTraceTagsByOrganization(java.lang.String organizationId)
Get the vulnerability tags for the organization whose ID is passed in.
|
TagsResponse |
getVulnTagsByApplication(java.lang.String organizationId,
java.lang.String appId)
Get the available vulnerability tags in the application whose ID is passed in.
|
VulnerabilityTrend |
getYearlyNewVulnTrend(java.lang.String organizationId)
Get New (New Open and New Closed each month) Vulnerability Trend for an Organizations.
|
VulnerabilityTrend |
getYearlyVulnTrend(java.lang.String organizationId)
Get Total (Total Open and Total Closed each month) Vulnerability Trend for an Organizations.
|
VulnerabilityTrend |
getYearlyVulnTrendForApplication(java.lang.String organizationId,
java.lang.String appId)
Get all Vulnerability Trend for an Application.
|
java.net.HttpURLConnection |
makeConnection(java.lang.String url,
java.lang.String method) |
java.io.InputStream |
makeRequest(HttpMethod method,
java.lang.String path) |
java.io.InputStream |
makeRequestWithBody(HttpMethod method,
java.lang.String path,
java.lang.String body,
MediaType mediaType) |
MakeRequestResponse |
makeRequestWithResponse(HttpMethod method,
java.lang.String path) |
SecurityCheck |
makeSecurityCheck(java.lang.String organizationId,
SecurityCheckForm securityCheckForm)
Make a security check in a given organization by the security check form
|
ScanManager |
scan(java.lang.String organizationId) |
void |
setConnectionTimeout(int timeout)
Sets a custom connection timeout for all SDK requests.
|
void |
setReadTimeout(int timeout)
Set a custom read timeout for all SDK requests.
|
GenericResponse |
setTraceStatus(java.lang.String organizationId,
java.lang.String statusRequest) |
public static final int DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_READ_TIMEOUT
public ScanManager scan(java.lang.String organizationId)
public GlobalProperties getGlobalProperties() throws java.io.IOException, UnauthorizedException
UnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic AssessLicenseOverview getAssessLicensing(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic VulnerabilityTrend getYearlyVulnTrend(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic VulnerabilityTrend getYearlyNewVulnTrend(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic VulnerabilityTrend getYearlyVulnTrendForApplication(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Organizations getProfileOrganizations() throws java.io.IOException, UnauthorizedException
UnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Users getOrganizationUsers(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Organizations getProfileDefaultOrganizations() throws java.io.IOException, UnauthorizedException
UnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Application createApplication(java.lang.String organizationId, ApplicationCreateRequest request) throws java.io.IOException, UnauthorizedException, ApplicationCreateException
organizationId - request - java.io.IOExceptionUnauthorizedExceptionApplicationCreateExceptionpublic Application getApplicationByNameAndLanguage(java.lang.String orgId, java.lang.String appName, AgentType language) throws java.io.IOException, UnauthorizedException
orgId - ID of the organizationappName - Application name when the application was first createdlanguage - Language of the applicationjava.io.IOExceptionUnauthorizedExceptionpublic Applications getApplication(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Applications getApplication(java.lang.String organizationId, java.lang.String appId, java.util.EnumSet<FilterForm.ApplicationExpandValues> expandValues) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationexpandValues - Expand values to filter onUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Applications getApplications(java.lang.String organizationId) throws UnauthorizedException, java.io.IOException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Applications getFilteredApplications(java.lang.String organizationId, ApplicationFilterForm applicationFilterForm) throws UnauthorizedException, java.io.IOException
organizationId - the ID of the organizationapplicationFilterForm - Query params to add more info to responseUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Applications getLicensedApplications(java.lang.String organizationId) throws UnauthorizedException, java.io.IOException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Applications getApplicationsNames(java.lang.String organizationId) throws UnauthorizedException, java.io.IOException
UnauthorizedExceptionjava.io.IOExceptionpublic RouteCoverageResponse getRouteCoverage(java.lang.String organizationId, java.lang.String appId, RouteCoverageBySessionIDAndMetadataRequest metadata) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationmetadata - option session metadata keys and values to return route coverage based onUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Coverage getCoverage(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Libraries getLibraries(java.lang.String organizationId, LibraryFilterForm filterForm) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationfilterForm - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Libraries getLibrariesWithFilter(java.lang.String organizationId, LibraryFilterForm filterForm) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationfilterForm - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Libraries getLibraries(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedExceptionpublic Libraries getLibraries(java.lang.String organizationId, java.lang.String appId, java.util.EnumSet<FilterForm.LibrariesExpandValues> expandValues) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationexpandValues - Query params to add more info to responseUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Libraries getLibrariesWithFilter(java.lang.String organizationId, java.lang.String appId, LibraryFilterForm filterForm) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationfilterForm - FilterForm query parametersjava.io.IOException - if there was a communication problemUnauthorizedExceptionpublic LibraryScores getLibraryScores(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic LibraryStats getLibraryStats(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Servers getServers(java.lang.String organizationId, ServerFilterForm filterForm) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationfilterForm - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Servers getServersWithFilter(java.lang.String organizationId, ServerFilterForm filterForm) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationfilterForm - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problem@Deprecated public Traces getTraces(java.lang.String organizationId, java.lang.String appId, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
getTraces instead.organizationId - the ID of the organizationappId - the ID of the applicationform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Traces getTraces(java.lang.String organizationId, java.lang.String appId, TraceFilterBody filters) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationfilters - TraceMetadataFilters filters to query onUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TracesWithResponse getTracesWithResponse(java.lang.String organizationId, java.lang.String appId, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TraceNotesResponse getNotes(java.lang.String organizationId, java.lang.String appId, java.lang.String traceId, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationtraceId - the ID of the vulnerabilityform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic RecommendationResponse getRecommendation(java.lang.String organizationId, java.lang.String traceId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationtraceId - the ID of the vulnerabilityUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic StoryResponse getStory(java.lang.String organizationId, java.lang.String traceId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationtraceId - the ID of the vulnerabilityUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic EventSummaryResponse getEventSummary(java.lang.String organizationId, java.lang.String traceId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationtraceId - the ID of the vulnerabilityUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic HttpRequestResponse getHttpRequest(java.lang.String organizationId, java.lang.String traceId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationtraceId - the ID of the vulnerabilityUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TagsResponse getVulnTagsByApplication(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic MetadataFilterResponse getSessionMetadataForApplication(java.lang.String organizationId, java.lang.String appId, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic GenericResponse generateAttestationReport(java.lang.String organizationId, java.lang.String appId, AttestationCreateRequest request) throws java.io.IOException, UnauthorizedException, ApplicationCreateException
organizationId - the ID of the organizationappId - the ID of the applicationrequest - java.io.IOExceptionUnauthorizedExceptionApplicationCreateExceptionpublic void downloadAttestationReport(java.lang.String organizationId,
java.lang.String userId,
java.lang.String reportId)
throws java.io.IOException,
UnauthorizedException
organizationId - the ID of the organizationuserId - the id of the user who requested the reportreportId - the id of the report that was generatedUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic NotificationsResponse getNotifications(java.lang.String organizationId, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic ServerTagsResponse getServerTags(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the appUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TagsResponse deleteVulnerabilityTag(java.lang.String organizationId, java.lang.String traceId, Tag tag) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationtraceId - the ID of the vulnerabilitytag - the tag name/value to deleteUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TagsResponse getTagsByTrace(java.lang.String organizationId, java.lang.String traceId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationtraceId - the ID of the vulnerabilityUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TagsResponse getTraceTagsByOrganization(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TagsResponse createTag(java.lang.String organizationId, Tags tags) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic GenericResponse clearNotifications(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic Traces getTracesInOrg(java.lang.String organizationId, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TraceListing getTraceFilters(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic TraceListing getTraceFiltersByType(java.lang.String organizationId, java.lang.String appId, TraceFilterType type) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedExceptionpublic Traces getTracesWithFilter(java.lang.String organizationId, java.lang.String appId, TraceFilterType traceFilterType, TraceFilterKeycode keycode, TraceFilterForm form) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationtraceFilterType - filter typekeycode - id or key to filter onform - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic GenericResponse setTraceStatus(java.lang.String organizationId, java.lang.String statusRequest) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedException@Deprecated public Traces getTraceFilterByRule(java.lang.String organizationId, java.lang.String appId, java.util.List<java.lang.String> ruleNames) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationappId - the ID of the applicationruleNames - FilterForm query parametersUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic SecurityCheck makeSecurityCheck(java.lang.String organizationId, SecurityCheckForm securityCheckForm) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationsecurityCheckForm - the security check formjava.io.IOExceptionUnauthorizedExceptionpublic java.util.List<JobOutcomePolicy> getEnabledJobOutcomePolicies(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - The organization IDjava.io.IOExceptionUnauthorizedExceptionpublic java.util.List<JobOutcomePolicy> getEnabledJoboutcomePoliciesByApplication(java.lang.String organizationId, java.lang.String appId) throws java.io.IOException, UnauthorizedException
organizationId - The organization IDappId - The Application IDjava.io.IOExceptionUnauthorizedExceptionpublic Rules getRules(java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
organizationId - the ID of the organizationUnauthorizedException - if the Contrast account failed to authorizejava.io.IOException - if there was a communication problempublic byte[] getAgent(AgentType type, java.lang.String organizationId, java.lang.String profileName) throws java.io.IOException, UnauthorizedException
type - the type of agent you want to download; Java, Java 1.5, .NET, or NodeprofileName - the name of the saved engine profile to download,organizationId - the ID of the organization,java.io.IOException - if there was a communication problemUnauthorizedException - if authentication failspublic byte[] getAgent(AgentType type, java.lang.String organizationId) throws java.io.IOException, UnauthorizedException
This uses 'default' as the profile name.
type - the type of agent you want to download; Java, Java 1.5, .NET, or NodeorganizationId - the ID of the organization,java.io.IOException - if there was a communication problemUnauthorizedException - if authentication failspublic java.io.InputStream makeRequestWithBody(HttpMethod method, java.lang.String path, java.lang.String body, MediaType mediaType) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedExceptionpublic java.io.InputStream makeRequest(HttpMethod method, java.lang.String path) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedExceptionpublic MakeRequestResponse makeRequestWithResponse(HttpMethod method, java.lang.String path) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedExceptionpublic void downloadFile(HttpMethod method, java.lang.String path, java.lang.String saveDir) throws java.io.IOException, UnauthorizedException
java.io.IOExceptionUnauthorizedExceptionpublic java.net.HttpURLConnection makeConnection(java.lang.String url,
java.lang.String method)
throws java.io.IOException
java.io.IOExceptionpublic void setConnectionTimeout(int timeout)
timeout - Timeout value in milliseconds.public void setReadTimeout(int timeout)
timeout - TImeout value in millisecondsCopyright © 2022 Contrast Security, Inc.. All rights reserved.