Skip to main content
Planview Customer Success Center

Create a New Entity (API)

Use insertEntity to create a simple PPM Pro entity. This example creates a new resource; the ID of the new resource is returned in the response.

When you create an entity, you need to know the entityType ID, as well as what fields are required. You can get all this information from Admin > Web Services API, as described below.

Locate the entity you wish to create (for example Resource) - its ID is 11. Then click the Fields link and identify all the fields that are required for Insert (the entire list is not captured in the screenshot, but you can look for yourself in Innotas). You'll need the IDs for those fields, as well as the corresponding values. You can find the values for the various personnel IDs from their resource pages; instructions for finding Primary Org Role IDs can be found here.

WSAPI_fieldIDs_screen.png

 

The example below reflects all of the required fields for creating a resource entity.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services" xmlns:xsd="http://objects.services/xsd">

   <soapenv:Header/>

   <soapenv:Body>

      <ser:insertEntity>

         <ser:sessionId>F0C6EDD44B270B1F3DD0F1492A2A1585</ser:sessionId>

         <ser:entityTypeId>11</ser:entityTypeId>

         <ser:valuePairs>

            <xsd:elementValue>Jacob</xsd:elementValue>

            <xsd:id>1103</xsd:id>  <!--First Name-->

         </ser:valuePairs>

         <ser:valuePairs>

            <xsd:elementValue>Ladder</xsd:elementValue>

            <xsd:id>1104</xsd:id> <!--Last Name-->

         </ser:valuePairs>

    <ser:valuePairs>

            <xsd:elementValue>8349538</xsd:elementValue>

            <xsd:id>1110</xsd:id> <!--Primary Role-->

         </ser:valuePairs>

         <ser:valuePairs>

            <xsd:elementValue>8826911</xsd:elementValue>

            <xsd:id>1107</xsd:id> <!--Supervisor-->

         </ser:valuePairs>

         <ser:valuePairs>

            <xsd:elementValue>8826911</xsd:elementValue>

            <xsd:id>1108</xsd:id> <!--Timesheet Approver -->

         </ser:valuePairs>

         <ser:valuePairs>

            <xsd:elementValue>8826911</xsd:elementValue>

            <xsd:id>1109</xsd:id> <!--Expense Approver -->

         </ser:valuePairs>

         <ser:valuePairs>

            <xsd:elementValue>10090824</xsd:elementValue>             <!--Information Technology-->

            <xsd:id>1111</xsd:id> <!--Business Unit -->

         </ser:valuePairs>

         <ser:valuePairs>

            <xsd:elementValue>8348452</xsd:elementValue>             <!--Office 1.1-->

            <xsd:id>1119</xsd:id> <!--Office-->

         </ser:valuePairs>

      </ser:insertEntity>

   </soapenv:Body>

</soapenv:Envelope>

 

Response

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

   <soapenv:Body>

      <ns:insertEntityResponse xmlns:ns="http://services">

         <ns:return>812737223</ns:return> <!--new Resource ID-->

      </ns:insertEntityResponse>

   </soapenv:Body>

</soapenv:Envelope>