REST API Introduction

REST API provides a flexible and powerful way for application developers to read from and write to File Share folders. It includes support from basic functions like upload and download files to sharing and creating folders.

Each RESTful API is documented in the following sections: URL, Method, Parameters, and Response.

URL

The REST API interface is exposed through a standard URL that contains the call parameters. To call REST API, you have to navigate to the following formatted URL with your browser:

https://hostname:port/context/rest/v2/calltype/restfulcallname/{id}

The following table lists the parameters in the URL:
Parameter Description
https Defines the protocol that you are using.
hostname Defines the IP address or IP name of the TIBCO MFT Internet Server.
port Defines the port that you are using.

If you are using 443, this parameter can be left out because 443 is the default https port.

context Defines the context that you want to call, typically cfcc.

You can check with the TIBCO MFT Internet Server administrator to ensure that the application name (also known as server context) is cfcc.

calltype Defines the call type.

The call type should be documents, devices or events. The calltype parameter is defied in the document for each RESTful call.

restfulcallname Defines the name of the call.

The restfulcallname parameter is defined in the document for each RESTful call.

{id} This is an optional field that defines the document ID for the request.

The URL Link for each request defines whether the document ID is allowed. See the instructions for each call to see whether this field is allowed. Generally, when the document ID is allowed, the "path" parameter can be used in its place.

Sample URLs:

https://mft.acme.com/cfcc/rest/v2/documents/getFile/13BK00000001

https://mft.acme.com/cfcc/rest/v2/documents/createFolder

https://mft.acme.com/cfcc/rest/v2/events/retrieveEvents

Method

In REST API, you can only use standard HTTP methods: GET or POST.

Parameters

Input parameters. Required parameters must be present or an error code will be returned. Unrecognized parameters will be ignored. The {id} parameter will be accepted on the URL or in the HTTP body. All other parameters should be passed in the HTTP body.

Response

A response has multiple parts, including a code, a message, and possibly one or more JSON objects. If the call is successful, it will return code 200, a HTTP standard. An appropriate code will be returned in case of error. See the Response section for an explanation of each code. If there is a custom code, it will be described in this section. One or more JSON objects might be returned in the message body depending on the API.