public class PublicRESTAPIRequests
extends java.lang.Object
Constructor and Description |
---|
PublicRESTAPIRequests() |
Modifier and Type | Method and Description |
---|---|
static com.ibm.json.java.JSONObject |
accessToken(org.apache.http.client.HttpClient client,
CloudEnv env,
java.lang.String authCode)
With a valid authentication code, get an access token.
|
static boolean |
deleteDatasetPublicApi(org.apache.http.client.HttpClient httpClient,
CloudEnv env,
java.lang.String id) |
static void |
dumpErrorFile(java.lang.Exception ex,
org.apache.http.client.methods.HttpRequestBase req,
RESTAPIResponse resp) |
static RESTAPIResponse |
execute(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpRequestBase method) |
static boolean |
getDatasetCSVPublicApi(org.apache.http.client.HttpClient httpClient,
CloudEnv env,
java.lang.String id) |
static boolean |
getDatasetsPublicApi(org.apache.http.client.HttpClient httpClient,
CloudEnv env) |
static com.ibm.json.java.JSONObject |
me(org.apache.http.client.HttpClient client,
CloudEnv env)
Get information about the logged in user.
|
static java.lang.String |
uploadDatasetPublicAPI(org.apache.http.client.HttpClient client,
CloudEnv env,
java.lang.String datasetID,
java.io.File file,
java.lang.String datasetName,
UploadProgressIndicator uploadIndicator)
Upload a sample CSV dataset in a single operation.
|
static java.lang.String |
uploadDatasetPublicAPIUsingSegments(org.apache.http.client.HttpClient client,
CloudEnv env,
java.lang.String datasetID,
java.io.File file,
java.lang.String datasetName)
Upload a sample CSV dataset using multiple segment operation.
|
public static com.ibm.json.java.JSONObject accessToken(org.apache.http.client.HttpClient client, CloudEnv env, java.lang.String authCode)
client
- oauth2URL
- authCode
- public static com.ibm.json.java.JSONObject me(org.apache.http.client.HttpClient client, CloudEnv env)
client
- env
- public static java.lang.String uploadDatasetPublicAPI(org.apache.http.client.HttpClient client, CloudEnv env, java.lang.String datasetID, java.io.File file, java.lang.String datasetName, UploadProgressIndicator uploadIndicator)
client
- env
- datasetID
- public static java.lang.String uploadDatasetPublicAPIUsingSegments(org.apache.http.client.HttpClient client, CloudEnv env, java.lang.String datasetID, java.io.File file, java.lang.String datasetName)
client
- env
- datasetID
- public static boolean deleteDatasetPublicApi(org.apache.http.client.HttpClient httpClient, CloudEnv env, java.lang.String id)
public static boolean getDatasetCSVPublicApi(org.apache.http.client.HttpClient httpClient, CloudEnv env, java.lang.String id)
public static boolean getDatasetsPublicApi(org.apache.http.client.HttpClient httpClient, CloudEnv env)
public static RESTAPIResponse execute(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpRequestBase method)
public static void dumpErrorFile(java.lang.Exception ex, org.apache.http.client.methods.HttpRequestBase req, RESTAPIResponse resp)