Getting Link to API created Instance.
Here are the steps to get this accomplished.
- Get the API link for the form.
- Get the FormID from the API link. FormID is the one that you will see in the API url after forms/ until the first _ (underscore)
http://app.perfectforms.com/api/forms/3yjHAlggAggA-gwM_API_Add_Instace.asmx?wsdl In this 3yjHAlggAggA-gwM is the FormID.
- First Login to the Application using API login method. On success you will be returned a token, please store that.
- Connect to the Forms API and do a ADD passing in the required fields data and the token that you received on the login success.
- On success from the Add, instance ID is returned. Store that and the token.
- Connect to the API to invoke GetFormInstanceMetaData2, pass in the FormID, token and the instance id. This will return bunch of parameters and the one that will interest you are the link. The value after f= is the instance ID. Below is the Example of what I got.
<GetFormInstanceMetaData2Response xmlns="http://www.PerfectForms.com/API" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- Now use that value to pass it to the embedded script to replace the FormID as in the below example.
This will open the instance that you created.