{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/statoss-com/json-schema/statoss-com-issue-detail-schema.json",
  "title": "IssueDetail",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/statoss-com-openapi.json#/components/schemas/IssueDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The issue id."
    },
    "shortId": {
      "type": "string",
      "description": "The app's slug upper-cased and a number: WEB-12."
    },
    "app": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The app id."
        },
        "name": {
          "type": "string",
          "description": "The app's name."
        },
        "slug": {
          "type": "string",
          "description": "The app's slug."
        }
      }
    },
    "title": {
      "type": "string",
      "description": "The exception's type and value, or the message."
    },
    "culprit": {
      "type": "string",
      "description": "Where it happened: a function and file, or a transaction."
    },
    "type": {
      "type": "string",
      "description": "error for an exception, default for a message.",
      "enum": [
        "error",
        "default"
      ]
    },
    "platform": {
      "type": "string",
      "description": "As the SDK sent it, such as node or javascript."
    },
    "level": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The level it reads as, merges followed."
        },
        "label": {
          "type": "string",
          "description": "The name shown."
        },
        "color": {
          "type": "string",
          "description": "A colour by name.",
          "enum": [
            "crimson",
            "red",
            "orange",
            "amber",
            "yellow",
            "green",
            "aqua",
            "teal",
            "blue",
            "violet",
            "indigo",
            "magenta",
            "plum",
            "grey",
            "ink",
            "ash"
          ]
        }
      }
    },
    "category": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "The category it reads as, merges followed."
        },
        "label": {
          "type": "string",
          "description": "The name shown."
        },
        "color": {
          "type": "string",
          "description": "A colour by name.",
          "enum": [
            "crimson",
            "red",
            "orange",
            "amber",
            "yellow",
            "green",
            "aqua",
            "teal",
            "blue",
            "violet",
            "indigo",
            "magenta",
            "plum",
            "grey",
            "ink",
            "ash"
          ]
        }
      }
    },
    "status": {
      "type": "string",
      "description": "Where it stands.",
      "enum": [
        "unresolved",
        "resolved",
        "archived"
      ]
    },
    "substatus": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why it is unresolved; null when it is not.",
      "enum": [
        "new",
        "ongoing",
        "regressed"
      ]
    },
    "priority": {
      "type": "string",
      "description": "Set by its level until someone sets it.",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "assignee": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The person's id."
        },
        "name": {
          "type": "string",
          "description": "Their name."
        },
        "email": {
          "type": "string",
          "description": "Their email."
        }
      }
    },
    "firstSeen": {
      "type": "string",
      "description": "ISO 8601, UTC.",
      "format": "date-time"
    },
    "lastSeen": {
      "type": "string",
      "description": "ISO 8601, UTC.",
      "format": "date-time"
    },
    "firstRelease": {
      "type": [
        "string",
        "null"
      ],
      "description": "The release its first event named."
    },
    "lastRelease": {
      "type": [
        "string",
        "null"
      ],
      "description": "The release its latest event named."
    },
    "timesSeen": {
      "type": "integer",
      "description": "Events counted since it was made."
    },
    "counts": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "events": {
          "type": "integer",
          "description": "Events in the environment and range asked."
        },
        "users": {
          "type": "integer",
          "description": "Users they reached, as far as events say."
        }
      }
    },
    "resolvedAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 8601, UTC.",
      "format": "date-time"
    },
    "resolvedInRelease": {
      "type": [
        "string",
        "null"
      ],
      "description": "The release that resolved it."
    },
    "archivedUntil": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 8601, UTC.",
      "format": "date-time"
    },
    "resolveInNextRelease": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "after": {
          "type": [
            "string",
            "null"
          ],
          "description": "The app's newest release when asked; null when it had none."
        },
        "since": {
          "type": "string",
          "description": "ISO 8601, UTC.",
          "format": "date-time"
        }
      }
    },
    "reviewed": {
      "type": "boolean",
      "description": "Taken off the For review tab."
    },
    "url": {
      "type": "string",
      "description": "The issue in the dashboard."
    },
    "latestEvent": {
      "oneOf": [
        {
          "$ref": "#/$defs/IssueEventSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IssueTag"
      },
      "description": "Each tag's five most common values in the range, among the issue's newest 50,000 events when it has more."
    },
    "activity": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IssueActivity"
      },
      "description": "The latest 50, newest first."
    },
    "eventsError": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set when events could not be read: counts, tags and the event are then empty."
    }
  },
  "$defs": {
    "IssueActivity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The line's id."
        },
        "at": {
          "type": "string",
          "description": "ISO 8601, UTC.",
          "format": "date-time"
        },
        "kind": {
          "type": "string",
          "description": "comment, resolved, unresolved, archived, regressed, resolve-next, priority, assigned, merged or first-seen."
        },
        "by": {
          "type": [
            "string",
            "null"
          ],
          "description": "Who: a person's name or email; null for StatOSS."
        },
        "body": {
          "type": "string",
          "description": "The comment, or what changed."
        }
      }
    },
    "IssueBreadcrumb": {
      "type": "object",
      "properties": {
        "timestamp": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO 8601, UTC.",
          "format": "date-time"
        },
        "type": {
          "type": "string",
          "description": "Such as default, http or navigation."
        },
        "category": {
          "type": "string",
          "description": "Such as console, fetch or ui.click."
        },
        "level": {
          "type": "string",
          "description": "As sent."
        },
        "message": {
          "type": "string",
          "description": "What happened."
        },
        "data": {
          "type": [
            "object",
            "null"
          ],
          "description": "As sent, scrubbed."
        }
      }
    },
    "IssueEventSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The event id, 32 hex digits."
        },
        "timestamp": {
          "type": "string",
          "description": "ISO 8601, UTC.",
          "format": "date-time"
        },
        "received": {
          "type": "string",
          "description": "ISO 8601, UTC.",
          "format": "date-time"
        },
        "level": {
          "type": "string",
          "description": "As the SDK sent it."
        },
        "platform": {
          "type": "string",
          "description": "As sent."
        },
        "environment": {
          "type": [
            "string",
            "null"
          ],
          "description": "As sent."
        },
        "release": {
          "type": [
            "string",
            "null"
          ],
          "description": "As sent."
        },
        "transaction": {
          "type": [
            "string",
            "null"
          ],
          "description": "As sent."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "The formatted message, else the exception's value."
        },
        "handled": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "False when an exception was not handled."
        },
        "exception": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "type": {
              "type": "string",
              "description": "The thrown exception's type."
            },
            "value": {
              "type": "string",
              "description": "Its message."
            },
            "module": {
              "type": [
                "string",
                "null"
              ],
              "description": "Its module."
            },
            "mechanism": {
              "type": [
                "string",
                "null"
              ],
              "description": "How the SDK caught it."
            }
          }
        },
        "chained": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "An exception it was chained to."
              },
              "value": {
                "type": "string",
                "description": "Its message."
              }
            }
          }
        },
        "frames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IssueFrame"
          },
          "description": "The thrown exception's frames, else the message's stack: oldest first, the last where it was thrown."
        },
        "breadcrumbs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IssueBreadcrumb"
          },
          "description": "The last 20, oldest first."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The event's tags."
        }
      }
    },
    "IssueFrame": {
      "type": "object",
      "properties": {
        "file": {
          "type": "string",
          "description": "The file's name."
        },
        "path": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its full path or URL."
        },
        "function": {
          "type": [
            "string",
            "null"
          ],
          "description": "The function."
        },
        "module": {
          "type": [
            "string",
            "null"
          ],
          "description": "The module."
        },
        "line": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The line."
        },
        "column": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The column."
        },
        "inApp": {
          "type": "boolean",
          "description": "The app's own code, not a library's."
        },
        "preContext": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Source lines before the line."
          }
        },
        "contextLine": {
          "type": [
            "string",
            "null"
          ],
          "description": "The line itself."
        },
        "postContext": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Source lines after the line."
          }
        }
      }
    },
    "IssueTag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The tag."
        },
        "label": {
          "type": "string",
          "description": "Its name in the app's schema."
        },
        "total": {
          "type": "integer",
          "description": "Events in the range that carried it."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "description": "A value."
              },
              "count": {
                "type": "integer",
                "description": "Events with it."
              }
            }
          }
        }
      }
    }
  }
}