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
V2 API METHOD TEMPLATE
This is a description for this API method
Request
GET /Requests/{RequestId}/Paths/{PathId}
Path Parameters
Name | Value | Description |
---|---|---|
ProgramId |
string |
Unique identifier for the program. |
ProjectId |
string |
Unique identifier for the project. |
FormId |
string |
Unique or custom identifier for the form. |
Optional Query Parameters
Name | Value | Description |
---|---|---|
QueryParameter |
boolean |
Query parameter. |
Request Body
Do not supply a request body with this method.
{
"Response": {
"NullableString": null | string,
"Boolean": boolean,
"Integer": integer,
"Object": {
"Timestamp": timestamp
}
}
}
<span class="hljs-punctuation">// POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit
{
</span><span class="hljs-attr"> "Response"</span><span class="hljs-punctuation">: </span><span class="hljs-punctuation">{
</span><span class="hljs-comment"> // [...]
</span><span class="hljs-punctuation"> }
</span><span class="hljs-punctuation">}</span>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="ProjectSubmitResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Project">
<xs:complexType>
<xs:sequence>
<xs:element name="CurrentStatus">
<xs:complexType>
<xs:attribute type="xs:string" name="StatusId" use="required"/>
<xs:attribute type="xs:string" name="CustomId" use="optional"/>
<xs:attribute type="xs:string" name="Name" use="required"/>
<xs:attribute type="xs:dateTime" name="Timestamp" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="ProjectId" use="required"/>
<xs:attribute type="xs:string" name="ProgramId" use="required"/>
<xs:attribute type="xs:string" name="ProjectNumber" use="required"/>
<xs:attribute type="xs:string" name="Url" use="required"/>
<xs:attribute type="xs:dateTime" name="LastChangeTimestamp" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<!-- POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit -->
<?xml version="1.0" encoding="utf-8"?>
<ProjectSubmitResponse>
<Project ProjectId="JT2BNFEC26X6" ProgramId="WUSVSQK9XB6N" ProjectNumber="TEST-00002" Url="http://testagency.powerclerk.com/MvcProjects/LandingPage?ProgramId=WUSVSQK9XB6N&ProjectId=JT2BNFEC26X6" LastChangeTimestamp="2022-11-08T10:51:21-08:00">
<CurrentStatus StatusId="Q1N7XRS60Y52" Name="Unsubmitted" Timestamp="2022-11-08T10:51:20-08:00" />
</Project>
</ProjectSubmitResponse>
Response Parameters
Name | Value | Description |
---|---|---|
NullableString |
null or string |
An string that can be null. |
Boolean |
boolean |
A boolean value. |
Integer |
integer |
An integer value |
Object |
object |
An object |
Object.Timestamp |
timestamp |
Timestamp of the object. |
Response
Response Body
{
"Response": {
"NullableString": null | string,
"Boolean": boolean,
"Integer": integer,
"Object": {
"Timestamp": timestamp
}
}
}
// POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit
{
"Response": {
// [...]
}
}
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="ProjectSubmitResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Project">
<xs:complexType>
<xs:sequence>
<xs:element name="CurrentStatus">
<xs:complexType>
<xs:attribute type="xs:string" name="StatusId" use="required"/>
<xs:attribute type="xs:string" name="CustomId" use="optional"/>
<xs:attribute type="xs:string" name="Name" use="required"/>
<xs:attribute type="xs:dateTime" name="Timestamp" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="ProjectId" use="required"/>
<xs:attribute type="xs:string" name="ProgramId" use="required"/>
<xs:attribute type="xs:string" name="ProjectNumber" use="required"/>
<xs:attribute type="xs:string" name="Url" use="required"/>
<xs:attribute type="xs:dateTime" name="LastChangeTimestamp" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<!-- POST /Programs/280NSHZ97UKX/Projects/VZ5XXG94S3QA/Forms/APHFJTAXCHVF/Submit -->
<?xml version="1.0" encoding="utf-8"?>
<ProjectSubmitResponse>
<Project ProjectId="JT2BNFEC26X6" ProgramId="WUSVSQK9XB6N" ProjectNumber="TEST-00002" Url="http://testagency.powerclerk.com/MvcProjects/LandingPage?ProgramId=WUSVSQK9XB6N&ProjectId=JT2BNFEC26X6" LastChangeTimestamp="2022-11-08T10:51:21-08:00">
<CurrentStatus StatusId="Q1N7XRS60Y52" Name="Unsubmitted" Timestamp="2022-11-08T10:51:20-08:00" />
</Project>
</ProjectSubmitResponse>
Response Parameters
Name | Value | Description |
---|---|---|
NullableString |
null or string |
An string that can be null. |
Boolean |
boolean |
A boolean value. |
Integer |
integer |
An integer value |
Object |
object |
An object |
Object.Timestamp |
timestamp |
Timestamp of the object. |
Sample Code
// Retrieves info about all programs in a given agency.
// Returns a list of <ProgramId, ProgramName> pairs, one for each program in the list.
public List<Tuple<string, string>> GetProgramInfo(string agencyId, string username, string password, string apiKey)
{
string url = "/Programs?Agency=" + agencyId;
XDocument xmlResponse = MakeGetRequest(BaseUrl + url, username, password, apiKey);
XNamespace ns = "http://service.powerclerk.com/api/v1/";
List<XElement> programElements = xmlResponse.Descendants(ns + "Program").ToList();
List<Tuple<string, string>> programs = new List<Tuple<string, string>>();
foreach (XElement programElement in programElements)
{
string programId = programElement.Attribute("ProgramId").Value;
string programName = programElement.Attribute("ProgramName").Value;
programs.Add(new Tuple<string,string>(programId, programName));
}
return programs;
}
function getPrograms(agencyId) {
// Use $.ajax jQuery method to execute the API call
$.ajax({
type: "GET",
url: "https://{BaseURL}/Programs?Agency=" + agencyId,
dataType: "xml",
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", "Basic " + hashedCredentials);
xhr.setRequestHeader("X-ApiKey", apiKey);
},
success: function (xml) {
// Display data
},
error: function (xhr) {
// Display error
}
});
}