Skip to main content
Mitratech Success Center

REST API HTTP Methods

You can use JSON formatted HTTP requests to create, read, update, or delete records from the TeamConnect server using the REST API methods. You must have the rights to view or make changes to these records.

Before you use the REST API HTTP methods, enter the following information:

  • http://<host>/<TeamConnectVersion>/webservice/rest for the root of the API.
  • application/json for the content-type and accept headers.
  • HTTP basic authentication with TeamConnect credentials.

The HTTP methods are GET, POST, PUT, and DELETE. When you make a request using one of the HTTP methods, refer to the following tables.

HTTP Methods for Records

HTTP Method Format Description
GET (nothing after GET) Returns a list of record types.
/<TypeOfRecord>

Example: /tasks
Returns all the records of that type in the server.

To limit the number of results, enter a number in the Number of records per result page field on the General page of the Preferences in TeamConnect. To see additional pages of results, enter ?page=2, or another number depending on the page, after /<TypeOfRecord>.

To search text or checkbox fields, enter the following:
?<TreePostition>.<FieldName>=<value> after /<TypeOfRecord>, for example, ?DISP_SUBP.DocketNoSU=1234
/<TypeOfRecord>/<ID>

Example: /tasks/2
Returns information about the record.
POST /<TypeOfRecord> Creates a new record.
To determine the structure of the JSON object, refer to Determining the structure of a JSON object.
/<TypeOfRecord>/<ID> Returns an error.
PUT /<TypeOfRecord> Returns an error.
/<TypeOfRecord>/<ID> Updates a record.
To determine the structure of the JSON object, refer to Determining the structure of a JSON object.
DELETE /<TypeOfRecord> Returns an error.
/<TypeOfRecord>/<ID> Deletes a record.

HTTP Methods for Projects

HTTP Method Format Description
GET (nothing after GET) Returns a list of projects and project codes.
/projects/<ProjectCode>

Example: /projects/DISP
Returns all the records of that project type in the server.
/projects/<ProjectCode>/<ID>

Example: /projects/DISP/3
Returns information about the project record.
POST /projects/<ProjectCode> Creates a new project record.
To determine the structure of the JSON object, refer to Determining the structure of a JSON object.
/projects/<ProjectCode>/<ID> Returns an error.
PUT /projects/<ProjectCode> Returns an error.
/projects/<ProjectCode>/<ID> Updates a project record.
To determine the structure of the JSON object, refer to Determining the structure of a JSON object.
DELETE /projects/<ProjectCode> Returns an error.
/projects/<ProjectCode>/<ID> Deletes a project record.

Determining the structure of a JSON object

When you create or update a new record or project using the POST or PUT method, use the same format as a JSON object. Use the GET method with a record type and ID to return a formatted example.

The following structure is an example of a JSON object for /tasks:

{

"shortDescription":"Created using the API",

"currentAssignee": {

"assignedOn":"Aug 15, 2012 8:15:00 AM", {

"href": "/user/15"

}

}

}

The following structure is an example of a JSON object for /appointments:

{

"subject":"Created using the API",

"startOn":"Aug 20, 2012 4:31:00 PM",

"endOn":"Aug 20, 2012 5:31:00 PM",

"attendees":[ {

"href": "/user/3"

}]

}

The following structure is an example of a JSON object for /DISP:

{

"entityType":"DISP",

"name":"Created using the API",

"categories": {

"DISP":{

"categoryItem":"DISP",

"customFields":{}

}

"DISP_BANK":{

"categoryItem":"DISP_BANK",

"customFields":{}

}

}

}

Troubleshooting Error Messages

You receive an error message if you enter the following:

  • An invalid username or password.
  • Invalid parameter values for a record.
  • An ID that does not exist.
  • No ID when you enter a REST method that requires an ID (PUT and DELETE).
  • An ID when the REST method does not require an ID (POST).

You might also receive an error message if you do not enter what the method requires. For example, if you are trying to update a task with the PUT method, but you do not enter new values, you receive an error message.

  • Was this article helpful?