-
Notifications
You must be signed in to change notification settings - Fork 7
Export questionnaire from Prepod and Import into local Author
tjamesmac edited this page May 14, 2020
·
5 revisions
The process will entail showing the questionnaire in JSON format, copying that and your local auth bearer token into the Postman application and posting a request to your local Author session to load the JSON of the questionnaire which will be available when you navigate back to your local Author home page.
-
Go to a questionnaire e.g. -
-
Copy the
<author-id>
part from the path, in the previous example that would be9d59571f-329e-409c-b131-f46e10e34529
-
Add the
<author-id>
to the export route to display the JSONhttps://preprod-author.eq.ons.digital/export/
and using the example questionnaire we get
https://preprod-author.eq.ons.digital/export/9d59571f-329e-409c-b131-f46e10e34529
-
Goto url and copy the displayed JSON text
- Open Postman app and select POST tab
- Change the POST route to http://localhost:4000/import
- Click on Body tab
- Change type to raw and paste in the JSON
- Open localhost Author session
- Open a survey
- Inspect session
- Goto Network tab and select All for filter
- Refresh session
- Select a graphql in left hand list
- Scroll down the right hand pane to Request Headers
- Copy just token part from
authorization: Bearer <token>
- In Postman select the Authorzation tab
- Change Type to Bearer Token
- Paste in the
<token>
- In Postman Hit Send
- Select Home in the local Author session
- Open and check the imported questionnaire