Migrating from API Testbed to Production
Summary
When developing using API Testbed comes to an end and you want to release your integration to Production, there are some steps involved. This article aims to guide you through the process to ensure a smooth transition to the Scrive eSign Production environment. If you feel like something was not covered in this article, or if you'd like to clarify something, do not hesitate to reach out to support: support@scrive.com
The steps needed in order to switch environments are:
- Gaining access to your Production user
- Creating new credentials for the Production user
- Copying any templates in API Testbed to Production
- Changing the host from api-testbed.scrive.com/api/ to scrive.com/api/
Gaining access to Production
You may already have received access to Production by either a sales person or your customer success manager. If this is not the case, or if you are unsure that you have this, get in touch with your contact person and they will help you.
Once you have a Production user in Scrive, [log in] with your credentials and continue to the next step.
Creating new API credentials for your user
Since the databases in API Testbed and Production are separated, you will need to generate new credentials for your Production user so that you can execute calls towards that environment. However, keep the testbed credentials as these will come in handy in the next step when transferring templates between the environments.
[Follow this guide that guides you through the different methods to generate API credentials]
Copying templates from API Testbed to Production
If your integration relies on templates in Scrive, you will need to copy them to Production. This can be done by fetching the document JSON from the template in API Testbed followed by updating a document created in Production.
- Locate the ID of the template(s) in API Testbed that you wish to transfer.
- With your API Testbed credentials, perform a /get request with the template ID (https://apidocs.scrive.com/#apiv2documents{document_id}get)
- Save the response from the API call and remove the "folder_id" parameter from the JSON.
- With your Production credentials, create a new document Production
(https://apidocs.scrive.com/#apiv2documentsnew) - Update the document using the document JSON that you saved in step #3
(If you experience privilege errors when doing this, ensure that you have removed the "folder_id" parameter from your JSON body) - Upload the PDF (if applicable) to the document in Production
(https://apidocs.scrive.com/#set-the-main-file) - You should now have a copy of the template in Production.
- Change the ID in the API call which starts a document from template to the new ID in Production.
Changing the host
The last step is to change the host so that API calls are instead going to the Production environment instead of the API Testbed environment.
- API Testbed: api-testbed.scrive.com
- Production: scrive.com