Skip to content

Connection Parameters

Before any attempt is made to access data from TACTIC, it is necessary to have a valid connection to the server. This connection is a server stub which allows you to make remote calls to the TACTIC server. It should contain all of the information needed to authenticate ot the TACTIC server and identify the user.

There are 4 components needed to identify your project and these are captured in the URL

  1. Server (https://portal.southpawtech.com)
  2. Site (Your portal organization)
  3. Project (Your project code)
  4. Access Ticket (The generated api access token)

Server

The server parameter is the base URL of the TACTIC server you are connecting to. For TACTIC Platform, this URL will be:

https://portal.southpawtech.com

Site

The site is your organization on the TACTIC Portal. A site contains all of the projects of an organization.

Project

Underneath the site, there will all of the projects for a give organization.

Access Ticket

The access ticket is the required authentication token required. It is generarted using the "get_ticket" method of the API. This token identifies the user and permissions of the connection. It will also usually have an expiry set to a certain amount of time.

Go here for more information and examples on authentication and getting tickets.

Getting values from the project URL

In order to determine what the various components are, go to the Project you wish to work with on the TACTIC Portal and then look at the base URL. It should look something like this:

https://portal.southpawtech.com/my_company/my_project

Note

It is possible that there is a "tactic" embedded after the base url.

For example:

https://portal.southpawtech.com/tactic/my_company/my_project
This is harmless however, the organization and project would still be the same as above.

Server initialization

All interaction will the TACTIC are done with a Server stub. This must be initialized to point to the correct server with the appropriate credentials.

// Connect to TACTIC Server
let server = TACTIC.get()
server.set_server("https://portal.southpawtech.com")
server.set_site("my_company")
server.set_project("my_project")

Once the server connection is setup, it has the credentials to call the TACTIC server using any of the API commands.

You can quickly verify that the connection is valid with the simple ping function:

alert( server.ping() );

This should return "OK" if the connection is valid and has been properly quthenticated.

Once credentials have been set up for a connections, you can continue to call the get() function to retrieve this same qualified connections:

let server = TACTIC.get();

Note

You can try it in jsfiddle