Application & Process Automation

Getting Started
Authentication & Access
Accounts with Multi-Factor Authentication
Using method GetPrograms
Common Usage Scenarios
Create and Submit a Project
Add/Change Data in an Existing Project
Daily Polling for Project Changes
Troubleshooting
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
SetAssignee
URL Format
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
SetProjectOwner
URL Format
Sample Request
Request XML Attributes
Sample Response
Response XML Attributes
GetInquiryThreads – Admin Only
GetNotesInInquiryThread – Admin Only
SetInquiryNote – Admin Only
SetInquiryThreadStatus – Admin Only
SetInquiryThreadExternalId – Admin Only
SetProjectStatusReportAs – Admin only
Code Samples
EncodeAuthorizationHeader
MakeGetRequest
MakePostRequest
MakeGetFileRequest
MakeDeleteRequest
PowerShell

SetProjectStatusReportAs – Admin only

Set the reportability of a given project status. Requires membership in an administrator role and Edit Reported Status Date privilege.
 
HTTP verb: POST
Required inputs: ProgramId, ProjectId

URL Format

Format: https://{BaseURL}/Programs/{ProgramId}/Projects/{ProjectId}/StatusHistory
 
Sample: https://{BaseURL}/Programs/1HF29X4P/Projects/KN9NS11AFP4C/StatusHistory

Sample Request


<SetProjectStatusHistoryReportAs
        xmlns="http://service.powerclerk.com/api/v1/" 
        StatusId="3X8KK600" 
        Timestamp="2021-04-29T16:50:08-07:00"
        ReportAs="suppress"
    />

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://service.powerclerk.com/api/v1/">
  <xs:element name="SetProjectStatusHistoryReportAs">
    <xs:complexType>
      <xs:attribute type="xs:string" name="StatusId" use="required"/>
      <xs:attribute type="xs:dateTime" name="Timestamp" use="required"/>
      <xs:attribute type="xs:string" name="ReportAs" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

Request XML Attributes

<Status> Attributes

StatusId – Unique identifier for the status
Timestamp – The original timestamp of the status
ReportAs – Sets the reportability of the status

ReportAs Options

normal Resets the reported timestamp back to the original timestamp the project entered the status
suppress Sets the project status to be ignored during reporting
yyyy-MM-ddTHH:mm:sszzz Overrides the timestamp the reported timestamp the project entered the status to the provided timestamp value.
(example: 2014-10-22T00:26:26-07:00)

Sample Response


<?xml version="1.0" encoding="utf-8"?>
<ProjectStatusHistoryResponse SchemaVersion="0" xmlns="http://services.powerclerk.com/api/v1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Project ProjectId="KN9NS11AFP4C" ProgramId="1HF29X4P" ProjectNumber="TEST-99998">
        <StatusHistory>
            <Status StatusId="3X8KK600" Name="Unsubmitted" ChangedBy="nicke@cleanpower.com" Timestamp="2021-04-29T16:50:08-07:00" ReportAs="suppress" ReportAsLastChangedBy="sample@cleanpower.com"/>
        </StatusHistory>
    </Project>
</ProjectStatusHistoryResponse>

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://services.powerclerk.com/api/v1/">
  <xs:element name="ProjectStatusHistoryResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Project">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="StatusHistory">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Status" maxOccurs="unbounded" minOccurs="0">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute type="xs:string" name="StatusId" use="required"/>
                            <xs:attribute type="xs:string" name="Name" use="required"/>
                            <xs:attribute type="xs:string" name="ChangedBy" use="required"/>
                            <xs:attribute type="xs:dateTime" name="Timestamp" use="required"/>
                            <xs:attribute type="xs:string" name="ReportAs" use="optional"/>
                            <xs:attribute type="xs:string" name="ReportAsLastChangedBy" use="optional"/>
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </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="optional"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute type="xs:float" name="SchemaVersion"/>
    </xs:complexType>
  </xs:element>
</xs:schema>

Response XML Attributes

<Project> Attributes

ProjectId – Unique identifier for the project
ProgramId – Unique identifier for the program
ProjectNumber – The project number. Projects are assigned a project number when they have been submitted.
 

<Status> Attributes

StatusId – Unique identifier for the status
CustomId – Custom, admin-provided, unique identifier for the status
Name – Status name
ChangedBy – Email of the user who initiated the status change
Timestamp – Timestamp of when the project entered the given status. Converted to user’s local timezone.
ReportAs – The reportability of the status
ReportAsLastChangedBy – Email of the user who initiated the report as status change

What’s Next?