Home Home
  login

Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Index Authentication
Previous  |  Next

 10.12          API
api
 10.12.1            Introduction
api
 10.12.2            Enabling API support
install
api
 10.12.3            Authentication
api
 10.12.4            Response Formats
api
 10.12.5            .NET Quick-start
api
 10.12.6            Schema Reference
api
 10.12.7            Administration API
admin
api
 10.12.8            Alerts API
api
 10.12.9            Custom Fields API
custom-fields
items
api
 10.12.10             Groups API
security
api
 10.12.11             Items API
items
api
 10.12.12             Projects API
projects
api
 10.12.13             Users API
security
api
 10.12.14             Testing API
testing
api
View  |  Print  |  PDF

15 documents found.


Authentication

api

You can access Gemini either using the pre-built .NET Client API assembly or by directly invoking the REST Gemini Web Services.

.NET Client API

Authenticating with Gemini using the .NET Client API is straightforward and involves constructing a ServiceManager object:

ServiceManager serviceManager = new ServiceManager(url, username, password, apiKey, windowsAuthentication);

The ServiceManager will automatically Base64 encode Username and API Key value. The ServiceManager will automatically MD5 hash the Password.

Authenticate using Gemini Username/Password combination:

ServiceManager serviceManager = new ServiceManager("http://gemini.server.com", "my_username", "my_password", "", false);

Authenticate using Gemini Username/API Key combination:

ServiceManager serviceManager = new ServiceManager("http://gemini.server.com", "my_username", "", "my_api_key", false);

Each user can obtain their API Key from within Gemini → My Profile section.

Authenticate using Windows Authentication:

ServiceManager serviceManager = new ServiceManager("http://gemini.server.com", "DOMAIN\User", "", "", true);

Assumption: Gemini is also configured to use Windows Authentication.

REST Web Services

When communicating directly with Gemini Web Services (not using the fore-mentioned .NET Client API assembly), HTTP Headers must be set in order to authenticate with Gemini.

The available HTTP Header values are as follows:

gemini-username-token
gemini-password-token
gemini-api-token

If you are using Windows Authentication, the above three tokens should be omitted.

Username and API tokens must be Base64 encoding.

Password token must be MD5 hashed.

JavaScript example (using JQuery) that will authenticate with Gemini and retreive a list of Projects :

    var geminiUrl = "http://sandbox.countersoft.com/";
    var geminiUsername = Base64.encode("manager"); // should result in "bWFuYWdlcg==" value
    var geminiApiKey = Base64.encode("zq7rdtuzx3"); // should result in "d3ZkYjJkeTIyNw==" value
   
    $(document).ready(function() {
       
        $("#getProjects").click(function() {
       
            jQuery.getJSON(geminiUrl + "api/projects.ashx/projects?format=json&gemini-username-token="
              + geminiUsername + "&gemini-api-token=" + geminiApiKey + "&callback=?",
                function(data)
                    {
                        //alert(data);
                        $("#divProjects").html(parseTemplate($("#ProjectsTemplate").html(), { projects: data }));
                    });
        });
    });

...should result in the following HTTP Headers:

gemini-username-token: bWFuYWdlcg==
gemini-api-token: d3ZkYjJkeTIyNw==
gemini-password-token


Previous  |  Next