Introduction
Stories are the main content format on Makerble
They are used to store text, media and progress towards goals (Changes and Indicators) whereby that progress can optionally be tagged to beneficiaries
Every story must belong to a single project
Every story must have a single author who is a user
API Documentation
Stories
Desc: Get all viewable stories
url: /stories
params: default params
...
response example: default response example (multiple records)
Desc: Post a single story
url: /stories
method: POST
required: story_category_id, project_id
NOTE: The api supports markdown language for formatting and need to send in text
parameter.
body:
Code Block |
---|
{
"story": {
"story_group": "change_created",
"story_format": "old",
"display_as": "survey_questions_view",
"project_id": 19,
"charity_id": "",
"story_category_id": 327,
"event_id":"" ,
"latitude":"" ,
"longitude": "" ,
"draft": false,
"source_of_story": "one_participant_story_form",
"is_public": false,
"approved": "",
"text": "API TEST"
},
"story_privacy": "only_charity_colleagues",
"individual_list": [],
"beneficiary_ids": [413],
"story_changes": [
{
"change_id": 199,
"number": 2
},
{
"change_id": 230,
"number":2
}
],
"story_change_beneficiaries":[
{
"change_id": 230,
"beneficiary_id": 413
}
],
"story_indicator_beneficiaries":[
{
"indicator_id": 243,
"indicator_type": "scale",
"outcome_id": 145,
"sub_ratio_id": 54,
"beneficiary_id": 413
},
{
"indicator_id": 244,
"indicator_type": "binary",
"outcome_id": 145,
"binray_indicator_value": "on",
"beneficiary_id": 413
},
{
"indicator_id": 242,
"indicator_type": "value",
"outcome_id": 145,
"number": 2,
"beneficiary_id": 413
}
],
"custom_fields": {
"26": "adfasfasf",
"103": "02:05",
"19": "2021-04-25",
"177": "Place"
}
}
|
Example story created: https://staging.makerble.com/stories/2408
New Story page: https://staging.makerble.com/projects/project-1/story_categories/327/stories/new
response example: default response example (single record)
Desc: Get all stories attachments
url: /stories/attachments
params: default params
response example: default response example (multiple records)
Desc: Get a single story attachments
url: /stories/:id/attachments
params: default params
response example: default response example (multiple records)
Desc: Get a single story cases
Warning: this will be removed soon, use cases story join table to get story cases
url: /stories/:id/cases
params: default params
...