All Downloads are FREE. Search and download functionalities are using the official Maven repository.

doc.com.rallydev.rest.RallyRestApi.html Maven / Gradle / Ivy

The newest version!





RallyRestApi (Rally Rest API for Java 2.2)











com.rallydev.rest

Class RallyRestApi

  • All Implemented Interfaces:
    Closeable, AutoCloseable


    public class RallyRestApi
    extends Object
    implements Closeable

    The main interface to the Rest API.

    Provides CRUD and query operations.

    • Constructor Detail

      • RallyRestApi

        public RallyRestApi(URI server,
                    String userName,
                    String password)
        Deprecated. Use the api key constructor instead.
        Creates a new instance for the specified server using the specified credentials.
        Parameters:
        server - The server to connect to, e.g. new URI("https://rally1.rallydev.com")
        userName - The username to be used for authentication.
        password - The password to be used for authentication.
      • RallyRestApi

        public RallyRestApi(URI server,
                    String apiKey)
        Creates a new instance for the specified server using the specified API Key.
        Parameters:
        server - The server to connect to, e.g. new URI("https://rally1.rallydev.com")
        apiKey - The API Key to be used for authentication.
    • Method Detail

      • setProxy

        public void setProxy(URI proxy)
        Set the unauthenticated proxy server to use. By default no proxy is configured.
        Parameters:
        proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")
      • setProxy

        public void setProxy(URI proxy,
                    String userName,
                    String password)
        Set the authenticated proxy server to use. By default no proxy is configured.
        Parameters:
        proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")
        userName - The username to be used for authentication.
        password - The password to be used for authentication.
      • setApplicationVendor

        public void setApplicationVendor(String value)
        Set the value of the X-RallyIntegrationVendor header included on all requests. This should be set to your company name.
        Parameters:
        value - The vendor header to be included on all requests.
      • setApplicationVersion

        public void setApplicationVersion(String value)
        Set the value of the X-RallyIntegrationVersion header included on all requests. This should be set to the version of your application.
        Parameters:
        value - The vendor header to be included on all requests.
      • setApplicationName

        public void setApplicationName(String value)
        Set the value of the X-RallyIntegrationName header included on all requests. This should be set to the name of your application.
        Parameters:
        value - The vendor header to be included on all requests.
      • getWsapiVersion

        public String getWsapiVersion()
        Get the current version of the WSAPI being targeted. Defaults to v2.0
        Returns:
        the current WSAPI version.
      • setWsapiVersion

        public void setWsapiVersion(String wsapiVersion)
        Set the current version of the WSAPI being targeted.
        Parameters:
        wsapiVersion - the new version, e.g. "1.30"
      • query

        public QueryResponse query(QueryRequest request)
                            throws IOException
        Query for objects matching the specified request. By default one page of data will be returned. Paging will automatically be performed if a limit is set on the request.
        Parameters:
        request - the QueryRequest specifying the object to be created.
        Returns:
        the resulting QueryResponse
        Throws:
        IOException - if an error occurs during the query.
      • getClient

        public HttpClient getClient()
        Get the underlying http client implementation. This is exposed with the intent of providing the ability to supply additional configuration to the client. It should not be used to directly make i/o calls.
        Returns:
        the raw http client




© 2015 - 2025 Weber Informatics LLC | Privacy Policy