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 endpoint
        parameters - optional list of resource parameters
        Returns:
        a JSON response string
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - 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 endpoint
        payload - a JSON payload string
        parameters - optional list of resource parameters
        Returns:
        a JSON response string
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - 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 endpoint
        payload - a JSON payload string
        parameters - optional list of resource parameters
        Returns:
        a JSON response string
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - 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 string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation