Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

  • 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

additional params:

beneficiary_id: 123 (default null)

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:

...

You can use the API to

  • get all the stories that belong to a particular beneficiary.

  • get all the stories your user account has access to

API Documentation

  • Endpoint: GET /api/v2/stories?page=2&per_page=2

  • Authentication: Requires valid authentication token

  • Response format: JSON

  • Query Parameters:

    • page (integer, optional): The page number for pagination (default is 1).

    • per_page (integer, optional): The number of choices per page (default is 10).

Response Attributes

  • page (integer): The current page number.

  • page_size (integer): The number of choices per page.

  • page_count (integer): The total number of pages.

  • total_count (integer): The total number of stories.

  • data (array of objects): List of stories.

    • id (integer): The unique identifier for the story.

    • text (string, nullable): The text content of the story.

    • number (string): The story number.

    • approved (boolean): Indicates if the story is approved.

    • story_group (string): The story group to which the story belongs.

    • location (string, nullable): The location associated with the story.

    • project_id (integer): The identifier of the associated project.

    • charity_id (integer, nullable): The identifier of the associated charity.

    • story_category_id (integer): The identifier of the story category.

    • edited_by (integer): The user ID who edited the story.

    • user_id (integer): The user ID who created the story.

    • updated_at (string): The timestamp of the last update.

    • created_at (string): The timestamp of the creation.

    • actual_created_at (string): The actual timestamp of creation.

    • beneficiary_ids (array): An array of beneficiary IDs associated with the story.

    • custom_fields (array): An array of custom field objects.

      • id (integer): The unique identifier for the custom field.

      • name (string): The name of the custom field.

      • type (string): The type of the custom field (e.g., text).

      • value (string): The value of the custom field.

Example

GET https://makerble.com/api/v2/stories?page=22&per_page=2

Response

Code Block
{
    "page": 22,
    "page_size": 2,
    "page_count": 5890,
    "total_count": 11779,
    "data": [
        {
            "id": 369011,
            "text": null,
            "number": "0",
            "approved": true,
            "story_group": "change_created",
            "location": null,
            "project_id": 3172,
            "charity_id": null,
            "story_category_id": 4255,
            "edited_by": 5656,
            "user_id": 5656,
            "updated_at": "2023-10-10T11:18:21.208+01:00",
            "created_at": "2023-10-10T11:18:20.000+01:00",
            "actual_created_at": "2023-10-10T11:18:20.278+01:00",
            "beneficiary_ids": [413],
                146776
            ],
            "storycustom_changesfields": [
                {
                    "change_id": 199,3252,
                    "numbername": 2 "Interests and activities",
        },     {       "change_idtype": 230,"text",
                    "numbervalue":2 ""
                },
   ],        "story_change_beneficiaries":[     {
                    "change_id": 2303253,
      "beneficiary_id": 413        }   ],   "story_indicator_beneficiaries":[name": "Hopes and dreams",
     {       "indicator_id": 243,       "indicator_type": "scaletext",
                    "outcome_idvalue": 145, ""
                }
            ]
        },
        {
       "sub_ratio_     "id": 54369010,
            "beneficiary_idtext": 413
    },
    {
      "indicator_id": 244,"I have a Spoken to Kitt About Attending The Great Birmingham Social, on the 18th October 2023. Kitt Has said yes to attending the session.",
            "indicator_typenumber": "binary0",
            "outcome_idapproved": 145true,
      "binray_indicator_value      "story_group": "onchange_created",
       "beneficiary_id": 413     },"location": "",
     {       "indicatorproject_id": 242,3100,
            "indicatorcharity_typeid": "value",null,
            "outcomestory_category_id": 145,4173,
            "numberedited_by": 26134,
      "beneficiary      "user_id": 6134,
 413     }   ],   "custom_fields": {updated_at": "2023-10-10T11:18:12.558+01:00",
      "26": "adfasfasf",     "103created_at": "02:05",2023-10-10T11:18:11.000+01:00",
         "19   "actual_created_at": "20212023-04-25",10-10T11:18:11.706+01:00",
         "177": "Place"   "beneficiary_ids": [
                114707
            ]
        }
    ]
}

...

Example video

...

...

What is a Story

Watch the explanation video: https://stagingwww.makerbleloom.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

...

share/8542bd5e2a5f4a05b676f2a27dc9a29f

...

  • A story record in the admin panel

    Image Added

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