Application & Process Automation

Getting Started
Authentication & Access
Accounts with Multi-Factor Authentication
Agency and Program Information
Common Usage Scenarios
Create and Submit a Project
Add/Change Data in an Existing Project
Daily Polling for Project Changes
Using Custom IDs
API Method Reference
GetPrograms
URL Format
Response
XML Attributes
Sample Code
GetForms
URL Format
Response
Forms Attributes
AvailableInStatuses and LeadsToStatus
Status Attributes
Sample Code
GetFormSchema
V1 Response
V2 Response
Sample Code
GetProjects
V1 Response
V2 Response
Sample Code
GetProjectsByNumber
V1 Response
V2 Response
Sample Request
Sample Code
GetProjectsByData
Sample Request
Request XML Nodes and Attributes
V1 Response
V2 Response
CreateNewProject
Sample Response
Response XML Attributes
Sample Code
GetAllProjectData - Admin only
Sample Response
XML Attributes
Sample Code
GetProjectData
Sample Response
XML Attributes
Sample Code
SetProjectData
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
Sample Code
GetActiveAttachment
URL Format
Sample Code
GetAttachmentAsAdmin – Admin only
URL Format
SetProjectAttachment
Identifying attachment file types
URL Format
Sample Response
Response XML Attributes
Sample Code
SetAttachmentMetadata
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
Sample Code
GetAttachmentMetadata
URL Format
Sample Response
Response XML Attributes
Sample Code
SubmitProject
URL Format
Sample Response
Response XML Attributes
Sample Code
GetStatusList – Admin only
Sample Code
URL Format
Sample Response
Response XML Attributes
GetCustomListChoices
URL Format
Sample Response
Response XML Attributes
GetProjectStatusHistory – Admin only
URL Format
Sample Response
Response XML Attributes
Sample Code
SetProjectStatus – Admin only
URL Format
Sample Response
Response XML Attributes
Sample Code
GetExportProject – Admin only
Response XML Attributes
Sample Code
URL Format
Sample Response
CreateMfaSessionToken
URL Format
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
Sample Code
DeleteMfaSessionToken
URL Format
Sample Response
Sample Code
Code Samples
EncodeAuthorizationHeader
MakeGetRequest
MakePostRequest
MakeGetFileRequest
MakeDeleteRequest
PowerShell

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

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
 

Sample Code


// 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.