Application & Process Automation
- Getting Started
- Common Usage Scenarios
- Troubleshooting
- Using Custom IDs
- API Method Reference
-
- GetPrograms
- GetForms
- GetFormSchema
- GetProjects
- GetProjectsByNumber
- GetProjectsByData
- CreateNewProject
- GetAllProjectData - Admin only
- GetProjectData
- SetProjectData
- GetActiveAttachment
- GetAttachmentAsAdmin – Admin only
- SetProjectAttachment
- SetAttachmentMetadata
- GetAttachmentMetadata
- SubmitProject
- GetStatusList – Admin only
- GetCustomListChoices
- GetProjectStatusHistory – Admin only
- SetProjectStatus – Admin only
- GetExportProject – Admin only
- CreateMfaSessionToken
- DeleteMfaSessionToken
- SetAssignee
- SetProjectOwner
- GetInquiryThreads – Admin Only
- GetNotesInInquiryThread – Admin Only
- SetInquiryNote – Admin Only
- SetInquiryThreadStatus – Admin Only
- SetInquiryThreadExternalId – Admin Only
- SetProjectStatusReportAs – Admin only
- Code Samples
GetActiveAttachment
Downloads the current active file for the given attachment in the given project form. The file will be returned as the response instead of an XML response payload. Requires read access to the project.
HTTP verb: GET
Required inputs: ProgramId, ProjectId, FormId, AttachmentId
HTTP verb: GET
Required inputs: ProgramId, ProjectId, FormId, AttachmentId
URL Format
Format: https://{BaseURL}/Programs/{ProgramId}/Projects/{ProjectId}/Forms/{FormId}/Attachments/{AttachmentId}/Download
Sample: https://{BaseURL}/Programs/A43FN6B/Projects/D4GJR65/Forms/47LEZF8/Attachments/87GR2F3/Download
Sample if the form has a custom ID of “MyForm” and the attachment has a custom ID of “MyAttachment”:https://{BaseURL}/Programs/A43FN6B/Projects/D4GJR65/Forms/MyForm/Attachments/MyAttachment/Download
// Retrieves the active uploaded file for the given attachment in the given project form, and saves
// the file at the given filepath.
public void SaveActiveAttachment(string programId, string projectId, string formId, string attachmentId, string filePath, string username, string password, string apiKey)
{
string url = "/Programs/" + programId + "/Projects/" + projectId + "/Forms/" + formId +
"/Attachments/" + attachmentId + "/Download";
MakeGetFileRequest(BaseUrl + url, filePath, username, password, apiKey);
}
See Chapter Code Samples for MakeGetFileRequest sample code.
What’s Next?