Was this helpful?
List Provisionings
Now that we have successfully obtained a session ID by logging in, let's do something useful. In this case we'll modify one of our Provisionings. Keep in mind we can have many provisionings.
First, list all of the provisionings out so that we can select the one that we want to modify. In order to do this utilize the listProvisionings call.
Utilize the same function as before except you will notice that the first parameter in the restCall now contains a query parameter called "s" which is being assigned to our stored sessionid. This is how to authenticate all future calls with our credentials.
restCall('provisioning?s=' + sessionId', 'GET', ' ', hdlListProvisioningSuccess, hdlListProvisioningFailure);
The handler looks like this:
var hdlListProvisioningSuccess = function(data) {
   alert(data);
}
var hdlListProvisioningFailure = function(data) {
   alert('There was an error obtaining the provisioning list');
}
The data which is returned will look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<Provisioning>
   <item id="12086">
      <expirationDate>2010-06-25T00:00:00-04:00</expirationDate>
      <parameters>
         <parameter key="SalesforceOpportunitiesBasics.0.file.urimeta"/>
         <parameter key="SalesforceContactBasics.1.password.password"> PASSWORD</parameter>
      </parameters>
      <process/>
      <product>PRODUCTID</product>
      <productOwnedId>OWNERID</productOwnedId>
   </item>
   <item id="12272">
      <expirationDate>2030-12-30T19:00:00-05:00</expirationDate>
      <parameters>
         <parameter key="Salesforce.com.password">PASSWORD</parameter>
         <parameter key="Salesforce.com.username">USERNAME</parameter>
      </parameters>
      <process>piccp.1.0.djar</process>
      <product>PRODUCTID</product>
      <startDate>2009-10-12T00:00:00-04:00</startDate>
   </item>
   <item id="12301">
      <expirationDate>2030-12-30T19:00:00-05:00</expirationDate>
      <parameters>
         <parameter key="Salesforce.com.password">bb</parameter>
         <parameter key="Salesforce.com.username">aa</parameter>
      </parameters>
      <process>test.1.0.djar</process>
      <product>PRODUCTID</product>
      <startDate>2009-10-12T00:00:00-04:00</startDate>
   </item>
</Provisioning>
Last modified date: 12/17/2021