This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Files in Podio
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 files, see Sample configuration.Â
Operation | Description |
---|---|
Attaches a file to an object. | |
getFile | Retrieves the file details. |
uploadFile | Uploads a file. |
Operation details
This section provides further details on the operations related to files.
Attaching a file to an object
The attachFile
 operation attaches the uploaded file to an object.
<podio.attachFile> <isSilent>{$ctx:isSilent}</isSilent> <fileId>{$ctx:fileId}</fileId> <refId>{$ctx:refId}</refId> <refType>{$ctx:refType}</refType> </podio.attachFile>
Properties
If "true", the object will not be bumped up in the stream.isSilent:
Â
The ID of the file.fileId:
Â
The ID of the reference.refId:
Â
The reference type of the file.refType:
Â
Sample request
Following is a sample REST/JSON request that can be handled by the attachFile
 operation.
{ "apiUrl":"https://api.podio.com", "accessToken":"8d416711e5974846b7f44425e37a348e", "fileId":"149738248", "refId":28900126, "refType":"task", "isSilent":"true" }
Related Podio Documentation
https://developers.podio.com/doc/files/attach-file-22518
Retrieving the file detailsÂ
The
 operation retrieves the file details. getFile
<podio.getFile> <fileId>{$ctx:fileId}</fileId> </podio.getFile>
Properties
The ID of the file.fileId:Â
Sample request
Following is a sample REST/JSON request that can be handled by the
 operation.getFile
{ "apiUrl":"https://api.podio.com", "accessToken":"49806ca6128f47c59d4a8e29e84f5a6f", "fileId":"149592541" }
Related Podio Documentation
https://developers.podio.com/doc/files/get-file-22451
Uploading a new fileÂ
TheÂ
 operation uploads a new file. uploadFile
<podio.uploadFile> <apiUrl>{$url:apiUrl}</apiUrl> </podio.uploadFile>
Properties
The URL to access the Podio API.apiUrl:Â
Note
The authorization header has to be passed by the user.
Sample request
Following is a sample REST/JSON request that can be handled by theÂ
 operation.uploadFile
http://localhost:8280/services/podio_uploadFile?apiUrl=https://api.podio.com
Related Podio Documentation
https://developers.podio.com/doc/files/upload-file-1004361
Sample configuration
Following is a sample proxy service that illustrates how to connect to Podio with the init
 operation and use the
 operation. The sample request for this proxy can be found in the attachFile sample request. You can use this sample as a template for using other operations in this category.attachFile
<proxy xmlns="http://ws.apache.org/ns/synapse" name="podio_attachFile" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="fileId" expression="json-eval($.fileId)"/> <property name="refType" expression="json-eval($.refType)"/> <property name="refId" expression="json-eval($.refId)"/> <property name="isSilent" expression="json-eval($.isSilent)"/> <podio.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <accessToken>{$ctx:accessToken}</accessToken> </podio.init> <podio.attachFile> <isSilent>{$ctx:isSilent}</isSilent> <fileId>{$ctx:fileId}</fileId> <refId>{$ctx:refId}</refId> <refType>{$ctx:refType}</refType> </podio.attachFile> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>