Authentication

The following tables show the authentication-related parameters supported for the StarTeam REST API.

Log in parameters

The following table lists the log in parameters:

Type

Description

Logon

Logs in to the server. URL: /serverapi/logon

Method POST

URL params

None

Data Params

Bearer ( if SSO or MFA is enabled on the server).

Body Basic authorization should be set in the body of the request.

Success Response

Returns a cookie containing:

  • A session cookie
  • The server guid
  • Build information

For example:

{"StarTeam Server":"17.2.0.138","StarTeam Server REST API":"2.0","configname":"test","serverguid":"9b63b031-216b-4437-be4e-01d2a40bd4f9"}

Error Response

Returns error content.

For example, for the 401 UNAUTHORIZED code, the following content is returned:

{"Details":{"Exception":"Logon failure. Please verify user name and password and try again.(Passwords are case sensitive.)","Exception Class":"CStSecurityException","Exception Code":10002},

"Message":"Unexpected exception caught at handle_put /serverapi/logon?

Sample Call

Stores the session id in a file called cookie.txt.

curl --cookie-jar cookie.txt -X POST http://127.0.0.1:49206/serverapi/logon -H "Authorization: Basic "QWRtaW5pc3RyYXRvcjpBZG1pbmlzdHJhdG9y"" -d "{}

Back to top

Log out parameters

The following table lists the log out parameters:

Type Description
Logout

Logs out of the server.

URL: /serverapi/logout

Method GET
URL params None
Data params Session cookie
Success response None
Error response

For example, for code 406, the following content is returned:

{"StarTeam Server":"17.2.0.138","StarTeam Server REST API":"2.0","configname":"test","serverguid":"9b63b031-216b-4437-be4e-01d2a40bd4f9"}
Sample Call curl --cookie-jar cookie.txt -X GET http://127.0.0.1:49206/serverapi/logout

Back to top

See also: