Update approval policy

Details

URI /organization/<organization_id>/approvalPolicy/<policy_id>
Method PUT
Parameters

userIdentifier=<user_id>
    Required; the user ID you want to use as credentials for this API call. See Get userIdentifier for the steps required to get the userIdentifier value.

Returns 200 - Ok
401 - Not authorized
404 - Object not found
500 - Server exception

Example

The following URL was sent:

https://<host>:<port>/csa/rest/organization/8a81818f3d1421e7013d1423635a0003/ approvalPolicy/8a81818f3d1437e2013d17f249c30a0c? userIdentifier=90d96588360da0c701360da0f1d5f483

The following XML was sent in the request. It will change the list of approvers to user ProjectManager, set automaticApproval to false, and set automaticApprovalDecision to REJECTED.


<NamedApproverApprovalTemplate>
  <displayName>Updated-My-Approval-Template</displayName>
  <approver><userName>ProjectManager</userName></approver>
  <minApprovalRequired>0</minApprovalRequired>
  <automaticApproval>false</automaticApproval>
  <automaticPeriodDuration>0</automaticPeriodDuration>
  <automaticApprovalDecision>
    <name>REJECTED</name>
  </automaticApprovalDecision>
</NamedApproverApprovalTemplate>

The following XML was returned:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NamedApproverApprovalTemplate>
  <id>8a81818f3d1437e2013d17f249c30a0c</id>
  <objectId>8a81818f3d1437e2013d17f249c30a0c</objectId>
  <createdOn>2013-02-26T11:19:47.397-08:00</createdOn>
  <updatedOn>2013-02-26T11:45:06.900-08:00</updatedOn>
  ...
  <name>
    My-New-Approval-Template_February 26, 2013 7:19:47 PM UTC
  </name>
  <displayName>Updated-My-Approval-Template</displayName>
  ...
  <automaticApproval>false</automaticApproval>
  <automaticPeriodDuration>0</automaticPeriodDuration>
  <minApprovalRequired>1</minApprovalRequired>
  <approvalType>
    <id>90d96588360da0c701360da0f0b00093</id>
    ...
    <name>NAMED_APPROVER_TEMPLATE</name>
    ...
  </approvalType>
  <automaticApprovalDecision>
    <id>90d96588360da0c701360da0f091008c</id>
    ...
    <name>REJECTED</name>
    <displayName>Denied</displayName>
    ...
  </automaticApprovalDecision>
  <approver>
    <id>8a81818f3d1437e2013d177b13f107dd</id>
    ...
    <name>ProjectManager</name>
    ...
    <organization>
      <id>8a81818f3d1421e7013d1423635a0003</id>
      <objectId>8a81818f3d1421e7013d1423635a0003</objectId>
      <isCriticalSystemObject>false</isCriticalSystemObject>
      <name>QA_ORG_1</name>
      <displayName>QA Org 1</displayName>
      <disabled>false</disabled>
    </organization>
  </approver>
</NamedApproverApprovalTemplate>