getData - Methods - Reports API

Reports API Methods

getData()

Retrieves a specific portion of raw score data from a report, based on a given set of user and Tag filters.

You would want to use this to customize an existing report, extend the report for your own purposes, or save the data into your own database, for example.

Important This method is only available for the learning outcomes report.

Examples

var reportData = reportsApp.getReport('my-learning-outcomes-report-id').getData();
console.log(reportData);

Arguments

  • params object

    A collection of required and optional parameters for selecting and filtering the data to be retrieved.

    • column_tag_types array[TagsV2|TagSearchByType]

      The hierarchy of column tags within which to limit the retrieved data.

      There are a number of distinct ways in which to use this parameter:

      • Pass [] to retrieve the overall total scores across all content in the report.
      • Pass an array containing a single TagSearchByType object to retrieve a breakdown of scores for all tag names within that tag type.
      • Pass an array containing one or more TagV2 objects and where the final element is a TagSearchByType object to retrieve a score breakdown for all tag names located at that tag path.
      • Pass an array containing TagV2 objects to retrieve the overall score for all content at that specific tag path (this is a more specific variant of the format above. Use the format above to retrieve scores for all nodes within a tag type, or this format to retrieve just one specific node).
    • row_tag_types array[TagsV2|TagSearchByType]

      (Optional) The hierarchy of row tags within which to limit the retrieved data.

      This parameter behaves similarly to the column_tag_types parameter; see above for details of usage.

    • user_ids array[string]

      The list of user_id entries in the report for which to specifically retrieve data.

Return value

Type object

This method retrieves the data asynchronously, and returns a promise that resolves with the data.

Type definitions

  • tagsV2 object

    Tags are used to improve searching for content while authoring and for reporting and analytics purposes.

    See Understanding Tag Formats for Content Creation and Filtering for more information.

    • name string

      The Tag name.

      Maximum length is 255 characters.

    • type string

      The Tag type.

      Maximum length is 255 characters.

  • TagSearchByType object

    • type string

    • description string

    • label string

  • ItemScoresByTagByUserData object

    {
                  "item_tags": {
                    "ch_curriculum_code": {
                      "ACMGM000": {
                        "sort_key": 0,
                        "description": null
                      },
                      "ACMGM001": {
                        "sort_key": 1,
                        "description": null
                      }
                    }
                  },
                  "scores": [
                    {
                      "user_id": "user_20180417a_00001",
                      "item_tags": [
                        {
                          "type": "ch_proficiency_strand",
                          "name": "Fluency"
                        },
                        {
                          "type": "ch_topic",
                          "name": "2. Matrices"
                        }
                      ],
                      "score": 2,
                      "max_score_of_attempted": 4,
                      "max_score_of_unmarked": 0,
                      "max_score": 4,
                      "count": 2
                    }
                  ]
                }
                
    • item_tags object

    • scores object

      • user_id string

      • item_tags array[TagsV2]

        An array of tags describing the path through the hierarchy that this score belongs to. This includes column and row tags. An empty array represents the overall total score for the given user.

      • score float

        Sum of scores that has been calculated for the given user and combination of item tags.

      • max_score_of_attempted float

        For all attempted responses by the given user within the given combination of item tags, this is the sum of the highest scores that can be awarded.

      • max_score_of_unmarked float

        For all unmarked responses by the given user within the given combination of item tags, this is the sum of the highest scores that can be awarded.

      • max_score float

        Sum of the highest scores that can be awarded for the given user and combination of item tags.

  • TagMetadata object

    • sort_key string

    • description string

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.