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 »

You can use the API to get the questions within a survey form, i.e. the Changes, Indicators, Outcomes, Text fields, Attachment fields, Sections, Time fields and Date fields within a Story Category.

API Documentation

  • Endpoint: GET /api/v2/story_categories/:id

  • Authentication: Requires valid authentication token

  • Response Format: JSON

  • Query Parameter

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

      • story category must be viewable by the requesting user

Response Attributes

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

  • name (string): The name of the story category.

  • color (string): The color code associated with the story category.

  • updated_at (string, ISO 8601 datetime): The timestamp when the story category was last updated.

  • created_at (string, ISO 8601 datetime): The timestamp when the story category was created.

  • is_stopped (boolean): Indicates whether the story category is stopped or active.

  • is_default (boolean): Indicates whether the story category is the default.

  • description (string): A description of the story category.

  • intro_message (string): An introductory message for the story category.

  • current_fields (array of objects): Details about the current fields in the story category.

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

    • field_id (integer): The ID of the field.

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

    • field_class_name (string): The class name of the field.

    • priority (integer): The priority of the field.

    • is_mandatory (boolean): Indicates whether the field is mandatory.

    • display_info (string): Information about how the field is displayed.

    • document_category_id (integer): The ID of the document category (if applicable).

    • outcome_id (integer): The ID of the outcome associated with the field.

    • indicator_type (string): The type of indicator for the field (if applicable).

    • change_type (string): The type of change for the field (if applicable).

  • scale_indicator_choices (array of objects): Choices available for scale indicator fields.

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

    • indicator_id (integer): The ID of the associated scale indicator.

    • choice (string): The type of choice (e.g., "single_choice").

    • choice_value (string): The value associated with the choice.

Example

GET https://makerble.com/api/v2/story_categories/841

Response

{
    "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"
        }
    ],
    "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