This document contains several examples of how to use the Post single story API documentation to create a story
Example 1: a story that tags only 1 beneficiary (contact)
...
Step
...
Postman call
...
Postman response
...
Equivalent content or screenshot of the page in the front-end
...
Authenticate
...
localhost:3000/api/v2/users/sign_in?user[email]=soft.dave99@gmail.com
&user[password]=123456
Code Block |
---|
{
"user_id": 2044,
"email": "soft.dave99@gmail.com",
"authentication_token": "b7c+D5o0joNRXMVNycN696yJZkuWshy4Zw66qWSJ--tT63Ev/FYFl00rCr--WomZk6tiLoXtapKgB/EtZA=="
} |
...
2. Get projects: because every story must be created within a project, you must get the projects before you can create your first story. (You do not need to do this each time you create a story)
...
This document contains an example of how to use the Post a Zero-or-Multiple-Contacts Story API documentation to create a story
A story that tags only 1 beneficiary (contact)
Step
Postman call
Postman response
Equivalent content or page in the front-end
Authenticate
2. Get projects
3 Get project's story categories
4 Get story categories
5 Get metrics? Get fields?
6 Get project beneficiaries
7 Post story
8Get story
Step | Postman call | Postman response | Equivalent content or screenshot of the page in the front-end | |||||
---|---|---|---|---|---|---|---|---|
| localhost:3000/api/v2/users/sign_in?user[email]=souleditor@makerble.com&user[password]=123456 |
| ||||||
2. Get projects: because every story must be created within a project, you must get the projects before you can create your first story. (You do not need to do this each time you create a story) | ||||||||
3. Get project's story categories:because every story is created using a Story Category, you must get the Story Categories associated with the project that the story will belong to before you create your first story. (You do not need to do this each time you create a story)create a story) | ||||||||
4. Get story categories: because if getting the project’s story categories does not tell you the metrics and fields (i.e. survey questions) that are within the story categories themselves, you will need to get the survey questions by getting the Story Category before you create your first story. (You do not need to do this each time you create a story) | GET localhost:3000/api/v2/story_categories/841 |
| ||||||
5. Get metrics? Get fields?
| ||||||||
6. Get project beneficiaries: because if you are creating a story about a beneficiary, you need to know which beneficiaries are in the project that the story belongs to. (You do not need to do this each time you create a story) | ||||||||
7. Post story | localhost:3000/api/v2/stories {“X-User-Token”: b7c+D5o0joNRXMVNycN696yJZkuWshy4Zw66qWSJ--tT63Ev/FYFl00rCr--WomZk6tiLoXtapKgB/EtZA==,
===================================== One Participant ===================================== body parameters
|
===================================== One Participant ===================================== postman response
|
Example 2: a story that tags several beneficiaries
One Participant Story Created ScreenShot |
Troubleshooting
A note on indicator formatting
...