Skip to main content

Hello,

Do you know if it is possible to update the username for lifecycle roles using the REST API?

I am able to update the lifecycle administrator with the following JSON:

{

"lifecycleAdminUser": {
      
        "userName": "jsmith",
        "isPrimary": true
      }
}
 

However, I encounter issues when attempting to update other lifecycle roles. For example:

{

"LC_ROLE9065": {
      
        "userName": "jsmith",
        "isPrimary": true
      }
}

I get this error:

{  "meta": {    "errors": b      {        "code": 1012,        "codeDesc": "DeserializationFailed",        "message": "An error occurred while attempting to deserialize the request, Project Manager, {\r\n  \"userName\": \"jsmith\",\r\n  \"isPrimary\": true\r\n}"      }
    ]
  }
}

Any guidance you could provide would be greatly appreciated.
Thank you!

Hi Johan, 

After trying every possible approach with the REST API and finding no documentation at all that would indicate this is even supported, I’ve come to the conclusion that it’s probably not possible to update lifecycle roles via REST.

BUT, it can be done using SOAP Web Services. I was able to get it working via SOAP UI using the following WSDL:

https://directlinegroupsb.pvcloud.com/planview/services/EntityLifecycleRoleAssignmentService.svc

Below is a sample SOAP request that successfully updates the lifecycle role on a project:

<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/

                  xmlns:ns=http://schemas.planview.com/PlanviewEnterprise/Services/EntityLifecycleAssignmentService/2019/02

                  xmlns:ns1=http://schemas.planview.com/PlanviewEnterprise/OpenSuite/Dtos/EntityLifecycleAssignmentDto/2019/02

                  xmlns:ns2=http://schemas.planview.com/PlanviewEnterprise/OpenSuite/Dtos/EntityLifecycleAssignmentSetOptionsDto/2019/02>

   <soapenv:Header/>

   <soapenv:Body>

      <ns:Set>

         <ns:dtos>

            <ns1:EntityLifecycleRoleAssignmentDto>

               <ns1:DeleteValue>false</ns1:DeleteValue>

               <ns1:EntityKey>key://2/$Plan/14067</ns1:EntityKey>

               <ns1:IsPrimaryValue>true</ns1:IsPrimaryValue>

               <ns1:LifecycleRoleKey>key://2/LfCycRole/3803</ns1:LifecycleRoleKey>

               <ns1:UserKey>key://3/slmr</ns1:UserKey>

            </ns1:EntityLifecycleRoleAssignmentDto>

         </ns:dtos>

         <ns:options>

            <ns2:DeleteCurrentValues>true</ns2:DeleteCurrentValues>

         </ns:options>

      </ns:Set>

   </soapenv:Body>

</soapenv:Envelope>

 

Hope it helps and it’d be great to have full REST documentation in SC…

Best, 
Michal 


Reply