Package com.smartsheet.api
Interface PassthroughResources
-
public interface PassthroughResources
This interface provides methods to access Passthrough resources.
Thread Safety: Implementation of this interface must be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
deleteRequest(java.lang.String endpoint)
Issue an HTTP DELETE request.java.lang.String
getRequest(java.lang.String endpoint, java.util.Map<java.lang.String,java.lang.Object> parameters)
Issue an HTTP GET request.java.lang.String
postRequest(java.lang.String endpoint, java.lang.String payload, java.util.Map<java.lang.String,java.lang.Object> parameters)
Issue an HTTP POST request.java.lang.String
putRequest(java.lang.String endpoint, java.lang.String payload, java.util.Map<java.lang.String,java.lang.Object> parameters)
Issue an HTTP PUT request.
-
-
-
Method Detail
-
getRequest
java.lang.String getRequest(java.lang.String endpoint, java.util.Map<java.lang.String,java.lang.Object> parameters) throws SmartsheetException
Issue an HTTP GET request.
- Parameters:
endpoint
- the API endpointparameters
- optional list of resource parameters- Returns:
- a JSON response string
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
postRequest
java.lang.String postRequest(java.lang.String endpoint, java.lang.String payload, java.util.Map<java.lang.String,java.lang.Object> parameters) throws SmartsheetException
Issue an HTTP POST request.
- Parameters:
endpoint
- the API endpointpayload
- a JSON payload stringparameters
- optional list of resource parameters- Returns:
- a JSON response string
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
putRequest
java.lang.String putRequest(java.lang.String endpoint, java.lang.String payload, java.util.Map<java.lang.String,java.lang.Object> parameters) throws SmartsheetException
Issue an HTTP PUT request.
- Parameters:
endpoint
- the API endpointpayload
- a JSON payload stringparameters
- optional list of resource parameters- Returns:
- a JSON response string
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
deleteRequest
java.lang.String deleteRequest(java.lang.String endpoint) throws SmartsheetException
Issue an HTTP DELETE request.
- Parameters:
endpoint
- the API endpoint- Returns:
- a JSON response string
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
-