Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Story Categories

Desc: Get all story categories

Latest changes: now includes scale indicator choices and current fields (not merged)

url: /story_categories

params: default params

response example: default response example (multiple records)

 

Desc: Get a single story category

url: /story_categories/:id

response example: default response example (single record)


API call - example

GET localhost:3000/api/v2/story_categories/841
header:
{“X-User-Token”: b7c+D5o0joNRXMVNycN696yJZkuWshy4Zw66qWSJ--tT63Ev/FYFl00rCr--WomZk6tiLoXtapKgB/EtZA==,
“X-User-Token”: “souleditor@makerble.com“}

for get single story category need to pass 'id = 841' like above url

API response - example

{
    "id": 841,
    "name": "Example Survey",
    "color": "#f16e20",
    "updated_at": "2022-05-24T09:33:38.022+01:00",
    "created_at": "2022-05-24T09:33:38.022+01:00",
    "is_stopped": false,
    "is_default": false,
    "description": "",
    "intro_message": "",
    "current_fields": [
        {
            "id": 14397,
            "field_id": 177,
            "field_name": "Location",
            "field_class_name": "CustomField",
            "priority": 3,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14403,
            "field_id": 577,
            "field_name": "aa test indicator",
            "field_class_name": "Indicator",
            "priority": 9,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "outcome_id": 528,
            "indicator_type": "scale"
        },
        {
            "id": 14404,
            "field_id": 578,
            "field_name": "testing 3027",
            "field_class_name": "Indicator",
            "priority": 10,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "outcome_id": 528,
            "indicator_type": "scale"
        },
        {
            "id": 14405,
            "field_id": 363,
            "field_name": "How long do you think it takes to fly to the sun?",
            "field_class_name": "Indicator",
            "priority": 11,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "outcome_id": 224,
            "indicator_type": "value"
        },
        {
            "id": 14406,
            "field_id": 364,
            "field_name": "Are you happy?",
            "field_class_name": "Indicator",
            "priority": 12,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "outcome_id": 224,
            "indicator_type": "binary"
        },
        {
            "id": 14407,
            "field_id": 8,
            "field_name": "# and % children engaged in under-age or hazardous labour",
            "field_class_name": "Indicator",
            "priority": 13,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "outcome_id": 2,
            "indicator_type": "binary"
        },
        {
            "id": 14408,
            "field_id": 276,
            "field_name": "AA Attendance",
            "field_class_name": "Change",
            "priority": 14,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "change_type": "participation"
        },
        {
            "id": 14409,
            "field_id": 274,
            "field_name": "A* attendance",
            "field_class_name": "Change",
            "priority": 15,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "change_type": "activity"
        },
        {
            "id": 14410,
            "field_id": 260,
            "field_name": "ActivityIndicatorTest1",
            "field_class_name": "Change",
            "priority": 16,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "change_type": "activity"
        },
        {
            "id": 14411,
            "field_id": 455,
            "field_name": "Number of times that the child goes playing outside all by themselves per week",
            "field_class_name": "Indicator",
            "priority": 17,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null,
            "outcome_id": 271,
            "indicator_type": "value"
        },
        {
            "id": 14412,
            "field_id": 4,
            "field_name": "Date founded",
            "field_class_name": "CustomField",
            "priority": 18,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14413,
            "field_id": 190,
            "field_name": "email",
            "field_class_name": "CustomField",
            "priority": 19,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14414,
            "field_id": 324,
            "field_name": "Ideas suggested by the participant",
            "field_class_name": "CustomField",
            "priority": 20,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14415,
            "field_id": 350,
            "field_name": "test attachment 1",
            "field_class_name": "CustomField",
            "priority": 0,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14416,
            "field_id": 351,
            "field_name": "test attachment 2",
            "field_class_name": "CustomField",
            "priority": 1,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14417,
            "field_id": 352,
            "field_name": "test date 2",
            "field_class_name": "CustomField",
            "priority": 2,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14418,
            "field_id": 353,
            "field_name": "test time. 1",
            "field_class_name": "CustomField",
            "priority": 3,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        },
        {
            "id": 14419,
            "field_id": 354,
            "field_name": "test time 2",
            "field_class_name": "CustomField",
            "priority": 4,
            "is_mandatory": false,
            "display_info": "mouseover",
            "document_category_id": null
        }
    ],
    "scale_indicator_choices": [
        {
            "id": 354,
            "indicator_id": 577,
            "choice": "single_choice",
            "choice_value": ""
        },
        {
            "id": 355,
            "indicator_id": 578,
            "choice": "single_choice",
            "choice_value": ""
        }
    ]
}
  • No labels