URL
The JSON API interface is exposed through a standard URL that contains the call methods and parameters provided by TIBCO MFT Internet Server.
To call JSON API, you have to navigate to the following formatted URL with your browser:
https://your.server.com:port/context/control?view=view/filetransfer/jsondirtree.jsp&action=action&path=path&dest=dest&org.apache.catalina.filters.CSRF_NONCE=19BEA97FB025306EED7023F14F620558
The following table lists the parameters in the URL:
Name | Description |
---|---|
your.server.com | IP name or address of the MFT server. |
port | HTTPS port.
If using 443, this parameter is not required. |
context | Context of the application.
Generally, cfcc is used. |
action | Action requested. |
path | The alias path defined in transfer definitions for the user. For example, /VirtualAlias1 indicates viewing all files in Virtual Alias1. |
dest | The target file or folder name.
This parameter is only used on rename action. |
org.apache.catalina.filters.CSRF_NONCE | The CSRF nonce used to protect against CSRF attacks. The first jsondirtree call must include no parameters, and it returns a CSRF_NONCE. The CSRF_NONCE must be included in the URL on the next jspondortree call. Each jsondirtree call returns a CSRF_NONCE that must be included on the URL of the next jsondirtree call. |
Examples
gettree
Sample URLs
https://mft.acme.com/cfcc/control?view=view/filetransfer/jsondirtree.jsp&action=gettree&path=/&org.apache.catalina.filters.CSRF_NONCE=0BC0207D47896DBF5EEA627EEA716193
or
https://mft.acme.com/cfcc/control?view=view/filetransfer/jsondirtree.jsp&action=gettree&path=/Dir1/FY2018&org.apache.catalina.filters.CSRF_NONCE=0BC0207D47896DBF5EEA627EEA716193
createdir
You can use this method to create a directory in the defined path.
Sample URL
https://mft.acme.com/cfcc/control?view=view/filetransfer/jsondirtree.jsp&action=createdir&path=/Dir1/FY2018&org.apache.catalina.filters.CSRF_NONCE=0BC0207D47896DBF5EEA627EEA716193
deldir
You can use this method to delete a directory.
Sample URL
https://mft.acme.com/cfcc/control?view=view/filetransfer/jsondirtree.jsp&action=deldir&path=/Dir1/FY2018&org.apache.catalina.filters.CSRF_NONCE=0BC0207D47896DBF5EEA627EEA716193
delfile
You can use this method to delete a file.
Sample URL
https://mft.acme.com/cfcc/control?view=view/filetransfer/jsondirtree.jsp&action=delfile&path=/Dir1/FY2018/acct.xls&org.apache.catalina.filters.CSRF_NONCE=0BC0207D47896DBF5EEA627EEA716193
rename
You can use this method to rename a file or directory.
Sample URL
https://mft.acme.com/cfcc/control?view=view/filetransfer/jsondirtree.jsp&action=deldir&path=/Dir1/FY2018/file1.txt&dest=/Dir1/FY2013/acct.file1.txt&org.apache.catalina.filters.CSRF_NONCE=0BC0207D47896DBF5EEA627EEA716193