There are two ways in which you can access data from the formsflow-forms end points.
-
Download and install curl.
-
Step 1 Go to
forms-flow-forms/script
directory. -
- For windows
- Open command prompt and run
resourceId_windows.bat {user email} {password}
eg:resourceId_windows.bat [email protected] changeme
- Open command prompt and run
- For Linux and Mac
- Open command prompt and run
./resourceId_linux.sh {user email} {password}
eg:./resourceId_linux.sh [email protected] changeme
- Open command prompt and run
- For windows
-
Step 3 Copy the ID corresponding to Role Name from Step 2 and paste it against the Environment Variable name from the below table.
Role Name | Environment Variable Name |
---|---|
Administrator | DESIGNER_ROLE_ID |
Anonymous | ANONYMOUS_ID |
formsflow Client | CLIENT_ROLE_ID |
formsflow Reviewer | REVIEWER_ROLE_ID |
User | USER_RESOURCE_ID |
curl requests are successfully completed. You can skip the remaining sections in this page and continue with other installation steps.
- Download and install Postman API client
- Import formsflow-forms-postman-collection.json to your postman client.
- Open Postman -> Go to File
- Import -> Upload formsflow-forms-postman-collection.json file
- Import successful.
- Open Postman -> Go to File
- Follow the instructions given below to fetch the role id's from forms-flow-forms
- Open Postman -> Go to Workspaces -> My Workspaces
- Collections -> Open form.io collection and send the API request in the following order.
- Get the jwt token using resource http://localhost:3001/user/login. (Click on Send to make a server request)
- Get the user resource id using resource http://localhost:3001/user. (Click on Send to make a server request)
- Copy the _id from Response body and replace value for USER_RESOURCE_ID in the .env file.
- Get the user role id's using resource http://localhost:3001/role. (Click on Send to make a server request) Copy the ID's in the .env file
- Collections -> Open form.io collection and send the API request in the following order.
- Open Postman -> Go to Workspaces -> My Workspaces
**Postman API calls are successfully completed