BYU Accounting · Grader API

Alteryx Macro Integration Guide

Submit student results from Alteryx to the grader API and receive scoring and feedback. This page explains the required inputs, response formats, modes, and examples.

API Endpoint & Examples What You Get Back

Quick Start

  1. Alteryx Input #1: a single-row table with student_id, assignment_id, problem_id.
  2. Alteryx Input #2: the student’s result table (columns + rows).
  3. Macro converts Input #2 to JSON {"columns":[],"rows":[]} and POSTs to the API.
  4. Two outputs: status & scoring (Output 1) and feedback/differences (Output 2).
All modes return rows_submitted and columns_submitted so you can confirm the payload shape.

Inputs from Alteryx

Input #1: Meta (single row)

Field Type Required Description
student_id string Yes Unique student identifier.
assignment_id string Yes Assignment key, e.g., A1.
problem_id string Yes Problem key within the assignment, e.g., P1.

Input #2: Student submission (table)

The macro turns your table into JSON of the form:

{
  "columns": ["product_id", "total_sales"],
  "rows": [
    {"product_id": "A101", "total_sales": 1200.50},
    {"product_id": "A102", "total_sales": 980.00}
  ]
}

API Endpoint

POST

https://alteryx.byuaccounting.net/evaluate?format=json

Content-Type: application/json

Request Body

{
  "student_id": "S123",
  "assignment_id": "A1",
  "problem_id": "P1",
  "submission": {
    "columns": ["product_id","total_sales"],
    "rows": [
      {"product_id":"A101","total_sales":1200.50},
      {"product_id":"A102","total_sales":980.00}
    ]
  }
}

Regrade Endpoint (Faculty Only)

If you add or fix an official solution, you can trigger a full regrade of all historical student submissions for that problem.

GET

https://alteryx.byuaccounting.net/regrade_problem.php?assignment_id=F25&problem_id=P1

You must be logged into the faculty dashboard in your browser to execute this endpoint. It will stream the score changes live.

Rubric Options

Set on each official solution’s rubric_json:

Key Type Default Description
order_matters bool false If true, row order must match to avoid a sort penalty.
numeric_tolerance_abs number 0 Absolute tolerance for numeric equality.
numeric_tolerance_pct number (0..1) 0 Percent tolerance (e.g., 0.005 = 0.5%).
case_insensitive bool false Apply case-insensitive comparison to both column names and data.
trim_whitespace bool false Trim whitespace before comparing strings.
null_equals_empty bool false Treat empty string as null when comparing.

Response Modes

Normal

Includes scores, flags, and up to 10 mismatched cells.

Default

Partial Feedback

Shows scores and flags, but hides detailed mismatches. Message: “Submission evaluated.”

Configurable per assignment

Exam Mode

Minimal response only: IDs, rows_submitted, columns_submitted, and message “submission received”. Scoring is still saved server-side.

Overrides Partial

Output 1 – Status & Scoring

Field Description
student_id, assignment_id, problem_id Echoed identifiers.
rows_submitted, columns_submitted Counts of your submitted table.
matched_solution_version Official solution variant that scored the highest.
score_percent, points_possible, points_awarded Numeric results.
data_feedback Summary sentence in normal/partial modes.
correct_column_names, correct_num_columns, correct_num_rows, wrong_sort_order, body_matches Boolean flags to help interpret the score.
message Exam mode returns “submission received”.

Output 2 – Feedback / Differences

  • Normal: up to 10 mismatched cells with row, column, expected, actual.
  • Partial: one-line message “Feedback limited (partial feedback)”.
  • Exam mode: one-line message “Feedback hidden (exam mode)”.

Tip: Column-name and cell comparisons obey case_insensitive and trim_whitespace if enabled in the rubric.

Example Response – Normal

{
  "status": "ok",
  "student_id": "S123",
  "assignment_id": "A1",
  "problem_id": "P1",
  "rows_submitted": 3,
  "columns_submitted": 2,
  "matched_solution_version": 1,
  "score_percent": 80,
  "points_possible": 10,
  "points_awarded": 8,
  "data_feedback": "Data does not match the expected result.",
  "correct_column_names": true,
  "correct_num_columns": true,
  "correct_num_rows": false,
  "wrong_sort_order": false,
  "body_matches": false,
  "mismatches": [ {"row":1,"column":"total_sales","expected":1200.5,"actual":12000.5} ]
}

Example Response – Partial

{
  "status": "ok",
  "student_id": "S123",
  "assignment_id": "A1",
  "problem_id": "P1",
  "rows_submitted": 3,
  "columns_submitted": 2,
  "matched_solution_version": 1,
  "score_percent": 80,
  "points_possible": 10,
  "points_awarded": 8,
  "data_feedback": "Submission evaluated",
  "correct_column_names": true,
  "correct_num_columns": true,
  "correct_num_rows": false,
  "wrong_sort_order": false,
  "body_matches": false
}

Example Response – Exam

{
  "status": "ok",
  "student_id": "S123",
  "assignment_id": "A1",
  "problem_id": "P1",
  "rows_submitted": 3,
  "columns_submitted": 2,
  "message": "submission received"
}

Troubleshooting

  • Invalid JSON: Ensure the body is valid UTF‑8 and includes submission.columns and submission.rows.
  • 406 Not Acceptable: Use ?format=json and avoid restrictive Accept headers. (We recommend the macro’s default headers.)
  • Missing IDs: The macro halts and outputs a single-row message if any required ID is missing.