public class AnywhereAPI
extends java.lang.Object
AnywhereFileAPI, AnywhereFolderAPI
and AnywhereLinkAPI.
In order to make calls to the sub APIs, you must first authenticate with HCP Anywhere to retrieve
an AuthToken. An AuthToken can be acquired from the server by
calling the authenticate
method, which requires you to provide the username and password or valid certificate you use to access HCP Anywhere
The returned AuthToken can be saved for later use.
Once an AuthToken is acquired, you can make calls to the sub APIs by supplying the token and any other required arguments of the sub APIs.
| Modifier and Type | Class and Description |
|---|---|
static class |
AnywhereAPI.Builder
Builds an instance of an
AnywhereAPI. |
| Modifier and Type | Method and Description |
|---|---|
AuthToken |
authenticate(java.lang.String username,
java.lang.String password)
Authenticates the user with HCP Anywhere and returns an AuthToken, which can then be used to
make calls to the sub APIs on behalf of the user.
|
AuthToken |
authenticateCertificate()
Authenticates the user with HCP Anywhere with a client certificate and returns an AuthToken, which can then
be used to make calls to the sub APIs on behalf of the user.
|
AnywhereActivityAPI |
getActivityAPI()
Generates an instance of the
AnywhereActivityAPI that can be
used to perform operations for activities |
AnywhereClientAPI |
getClientAPI()
Generates an instance of the
AnywhereClientAPI that can be used
to perform operations for clients |
AnywhereFileAPI |
getFileAPI()
Generates an instance of the
AnywhereFileAPI that can be used
to perform operations on files. |
AnywhereFolderAPI |
getFolderAPI()
Generates an instance of the
AnywhereFolderAPI that can be used
to perform operations on folders. |
AnywhereLinkAPI |
getLinkAPI()
Generates an instance of the
AnywhereLinkAPI that can be used
to perform operations on links. |
AnywherePathAPI |
getPathAPI()
Generates an instance of the
AnywherePathAPI that can be used
to perform operations on paths (files or folders). |
AnywhereProviderAPI |
getProviderAPI()
Generates an instance of the
AnywhereProviderAPI that can be
used to perform operations for providers |
AnywhereSamlAPI |
getSamlAPI()
Generates an instance of the
AnywhereSamlAPI that can be used
to perform SAML operations |
AnywhereShareAPI |
getShareAPI()
Generates an instance of the
AnywhereShareAPI that can be used
to perform operations for share folders |
AnywhereUserAPI |
getUserAPI()
Generates an instance of the
AnywhereUserAPI that can be used
to perform operations on the user. |
boolean |
status()
Obtains whether the system provided in the builder used to create this API is online and a
valid HCP Anywhere system
|
public AuthToken authenticate(java.lang.String username, java.lang.String password) throws java.io.IOException, AnywhereException
username - HCP Anywhere usernamepassword - HCP Anywhere passwordAuthToken to use in subsequent
requests to identify and authenticate the userjava.io.IOExceptionAnywhereExceptionpublic AuthToken authenticateCertificate() throws java.io.IOException, AnywhereException
AuthToken to use in subsequent
requests to identify and authenticate the userjava.io.IOExceptionAnywhereExceptionpublic boolean status()
public AnywhereFolderAPI getFolderAPI()
AnywhereFolderAPI that can be used
to perform operations on folders.public AnywhereFileAPI getFileAPI()
AnywhereFileAPI that can be used
to perform operations on files.public AnywherePathAPI getPathAPI()
AnywherePathAPI that can be used
to perform operations on paths (files or folders).public AnywhereLinkAPI getLinkAPI()
AnywhereLinkAPI that can be used
to perform operations on links.public AnywhereUserAPI getUserAPI()
AnywhereUserAPI that can be used
to perform operations on the user.public AnywhereProviderAPI getProviderAPI()
AnywhereProviderAPI that can be
used to perform operations for providerspublic AnywhereShareAPI getShareAPI()
AnywhereShareAPI that can be used
to perform operations for share folderspublic AnywhereClientAPI getClientAPI()
AnywhereClientAPI that can be used
to perform operations for clientspublic AnywhereActivityAPI getActivityAPI()
AnywhereActivityAPI that can be
used to perform operations for activitiespublic AnywhereSamlAPI getSamlAPI()
AnywhereSamlAPI that can be used
to perform SAML operations