...
...
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.
Operation details
This section provides further details on the operations related to discussions.
Deleting a file from project
The deleteFileFromProject
operation deletes a file from project.
Code Block |
---|
language | xml |
---|
title | deleteFileFromProject |
---|
|
<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 |
---|
language | xml |
---|
title | Sample request for deleteFileFromProject |
---|
|
{
"apiUrl":"https://wso2test.teamwork.com/",
"apiKey":"clark42ceiling",
"fileId": "745098"
} |
http://developer.teamwork.com/files#delete_a_file_fro
Retrieving a fileThe getFile
operation retrieves the file of given id.
Code Block |
---|
|
<teamwork.getFile>
<fileId>{$ctx:fileId}</fileId>
</teamwork.getFile> |
Properties
fileId
: The id of the file.
Sample Request
Following is a sample REST/JSON request that can be handled by the getFile
operation.
Code Block |
---|
language | xml |
---|
title | Sample request for getFile |
---|
|
{
"apiUrl":"https://wso2test.teamwork.com/",
"apiKey":"clark42ceiling",
"fileId": "745098"
} |
Related Teamwork documentation
http://developer.teamwork.com/files#get_a_single_file
Retrieving files on a projectThe getFilesOnAProject
operation retrieves the files on a project.
Code Block |
---|
language | xml |
---|
title | getFilesOnAProject |
---|
|
<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 |
---|
language | xml |
---|
title | Sample request for getFilesOnAProject |
---|
|
{
"apiUrl":"https://wso2test.teamwork.com/",
"apiKey":"clark42ceiling",
"projectId": "90538"
} |
http://developer.teamwork.com/files#list_files_on_a_p
Sample configurationFollowing 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.
...