Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3
typeflat

...

Overview

The following operations allow you to work with files. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with attachments, see Sample configuration.

OperationDescription
deleteFileFromProjectDelete a file from a project.
getFileReturns a file.
getFilesOnAProjectReturns the files on a project.

Operation details

This section provides further details on the operations related to discussions.

Anchor
delFil
delFil
Deleting a
file from project

The deleteFileFromProject operation deletes a file from project.

Code Block
languagexml
titledeleteFileFromProject
<teamwork.deleteFileFromProject>
	<fileId>{$ctx:fileId}</fileId>
</teamwork.deleteFileFromProject>
Properties
  • fileId: The id of the file.
Sample Request

Following is a sample REST/JSON request that can be handled by the deleteFileFromProject operation.

Code Block
languagexml
titleSample request for deleteFileFromProject
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "fileId": "745098"
}
Related Teamwork documentation

http://developer.teamwork.com/files#delete_a_file_fro

Anchor
getFil
getFil
Retrieving a file

The getFile operation retrieves the file of given id.

Code Block
languagexml
titlegetFile
<teamwork.getFile>
	<fileId>{$ctx:fileId}</fileId>
</teamwork.getFile>
Properties
  • fileId: The id of the file.
Anchor
samReq
samReq
Sample Request

Following is a sample REST/JSON request that can be handled by the getFile operation.

Code Block
languagexml
titleSample request for getFile
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "fileId": "745098"
}
Related Teamwork documentation

http://developer.teamwork.com/files#get_a_single_file

Anchor
getFiPr
getFiPr
Retrieving files on a project

The getFilesOnAProject operation retrieves the files on a project.

Code Block
languagexml
titlegetFilesOnAProject
<teamwork.getFilesOnAProject>
	<projectId>{$ctx:projectId}</projectId>
</teamwork.getFilesOnAProject>
Properties
  • projectId: The id of the project.
Sample Request

Following is a sample REST/JSON request that can be handled by the getFilesOnAProject operation.

Code Block
languagexml
titleSample request for getFilesOnAProject
{
    "apiUrl":"https://wso2test.teamwork.com/",
    "apiKey":"clark42ceiling",
    "projectId": "90538"
}
Related Teamwork documentation

http://developer.teamwork.com/files#list_files_on_a_p

Anchor
sample
sample
Sample configuration

Following is a sample proxy service that illustrates how to connect to Teamwork with the init operation and use the getFile operation. The sample request for this proxy can be found in getFile sample request. You can use this sample as a template for using other operations in this category.

...