GitLab · JSON Structure

Gitlab Issue Structure

A GitLab issue used for tracking work, bugs, feature requests, or incidents within a project.

Type: object Properties: 29 Required: 5
CodePlatformSoftware DevelopmentSource Control

GitLab Issue is a JSON Structure definition published by GitLab, describing 29 properties, of which 5 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id iid project_id title description state issue_type type labels milestone author assignees closed_by confidential weight severity upvotes downvotes user_notes_count merge_requests_count references web_url time_stats task_completion_status has_tasks due_date created_at updated_at closed_at

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://gitlab.com/schemas/gitlab/issue.json",
  "name": "GitLab Issue",
  "description": "A GitLab issue used for tracking work, bugs, feature requests, or incidents within a project.",
  "type": "object",
  "required": [
    "id",
    "iid",
    "project_id",
    "title",
    "state"
  ],
  "properties": {
    "id": {
      "type": "int32",
      "description": "The globally unique identifier of the issue."
    },
    "iid": {
      "type": "int32",
      "description": "The internal project-scoped ID of the issue."
    },
    "project_id": {
      "type": "int32",
      "description": "The ID of the project the issue belongs to."
    },
    "title": {
      "type": "string",
      "description": "The title of the issue.",
      "maxLength": 255
    },
    "description": {
      "type": "string",
      "description": "The description of the issue, supporting Markdown syntax.",
      "maxLength": 1048576
    },
    "state": {
      "type": "string",
      "enum": [
        "opened",
        "closed"
      ],
      "description": "The current state of the issue."
    },
    "issue_type": {
      "type": "string",
      "enum": [
        "issue",
        "incident",
        "test_case",
        "task"
      ],
      "description": "The type of issue."
    },
    "type": {
      "type": "string",
      "description": "The GitLab-internal issue type designation."
    },
    "labels": {
      "type": "array",
      "description": "Labels applied to the issue.",
      "items": {
        "type": "string"
      }
    },
    "milestone": {
      "oneOf": [
        {
          "$ref": "#/$defs/Milestone"
        },
        {
          "type": "null"
        }
      ],
      "description": "The milestone the issue is associated with."
    },
    "author": {
      "$ref": "#/$defs/UserSummary"
    },
    "assignees": {
      "type": "array",
      "description": "Users assigned to work on this issue.",
      "items": {
        "$ref": "#/$defs/UserSummary"
      }
    },
    "closed_by": {
      "oneOf": [
        {
          "$ref": "#/$defs/UserSummary"
        },
        {
          "type": "null"
        }
      ],
      "description": "The user who closed the issue."
    },
    "confidential": {
      "type": "boolean",
      "description": "Whether the issue is confidential and visible only to project members with Reporter access or above."
    },
    "weight": {
      "type": "integer",
      "minimum": 0,
      "description": "The weight assigned to the issue for effort estimation. Requires Premium or Ultimate tier."
    },
    "severity": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "INFO",
        "LOW",
        "MEDIUM",
        "HIGH",
        "CRITICAL"
      ],
      "description": "The severity level of the issue. Used for incidents."
    },
    "upvotes": {
      "type": "int32",
      "minimum": 0,
      "description": "The number of upvotes the issue has received."
    },
    "downvotes": {
      "type": "int32",
      "minimum": 0,
      "description": "The number of downvotes the issue has received."
    },
    "user_notes_count": {
      "type": "int32",
      "minimum": 0,
      "description": "The number of user-authored comments on the issue."
    },
    "merge_requests_count": {
      "type": "int32",
      "minimum": 0,
      "description": "The number of merge requests related to this issue."
    },
    "references": {
      "$ref": "#/$defs/References"
    },
    "web_url": {
      "type": "uri",
      "description": "The URL to view the issue in a browser."
    },
    "time_stats": {
      "$ref": "#/$defs/TimeStats"
    },
    "task_completion_status": {
      "$ref": "#/$defs/TaskCompletionStatus"
    },
    "has_tasks": {
      "type": "boolean",
      "description": "Whether the issue description contains task list items."
    },
    "due_date": {
      "type": "string",
      "format": "date",
      "description": "The due date of the issue in YYYY-MM-DD format."
    },
    "created_at": {
      "type": "datetime",
      "description": "The date and time the issue was created."
    },
    "updated_at": {
      "type": "datetime",
      "description": "The date and time the issue was last updated."
    },
    "closed_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the issue was closed."
    }
  },
  "$defs": {
    "UserSummary": {
      "type": "object",
      "description": "A simplified representation of a GitLab user.",
      "required": [
        "id",
        "username"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "The unique identifier of the user."
        },
        "username": {
          "type": "string",
          "description": "The username of the user."
        },
        "name": {
          "type": "string",
          "description": "The display name of the user."
        },
        "state": {
          "type": "string",
          "enum": [
            "active",
            "blocked",
            "deactivated"
          ],
          "description": "The current state of the user account."
        },
        "avatar_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "URL to the user's avatar image."
        },
        "web_url": {
          "type": "string",
          "format": "uri",
          "description": "URL to the user's GitLab profile page."
        }
      }
    },
    "Milestone": {
      "type": "object",
      "description": "A milestone that groups issues and merge requests by a target date.",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The unique identifier of the milestone."
        },
        "iid": {
          "type": "integer",
          "description": "The project-scoped ID of the milestone."
        },
        "project_id": {
          "type": "integer",
          "description": "The ID of the project the milestone belongs to."
        },
        "title": {
          "type": "string",
          "description": "The title of the milestone."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description of the milestone."
        },
        "state": {
          "type": "string",
          "enum": [
            "active",
            "closed"
          ],
          "description": "The current state of the milestone."
        },
        "due_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The due date of the milestone."
        },
        "web_url": {
          "type": "string",
          "format": "uri",
          "description": "URL to view the milestone in a browser."
        }
      }
    },
    "References": {
      "type": "object",
      "description": "Reference strings for the issue.",
      "properties": {
        "short": {
          "type": "string",
          "description": "Short reference format, for example #42."
        },
        "relative": {
          "type": "string",
          "description": "Relative reference format including project path."
        },
        "full": {
          "type": "string",
          "description": "Full reference format including namespace and project path."
        }
      }
    },
    "TimeStats": {
      "type": "object",
      "description": "Time tracking statistics for the issue.",
      "properties": {
        "time_estimate": {
          "type": "integer",
          "minimum": 0,
          "description": "Estimated time to complete the issue in seconds."
        },
        "total_time_spent": {
          "type": "integer",
          "minimum": 0,
          "description": "Total time logged against the issue in seconds."
        },
        "human_time_estimate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Human-readable time estimate, for example 1d 2h."
        },
        "human_total_time_spent": {
          "type": [
            "string",
            "null"
          ],
          "description": "Human-readable total time spent, for example 30m."
        }
      }
    },
    "TaskCompletionStatus": {
      "type": "object",
      "description": "Completion status for task list items in the issue description.",
      "properties": {
        "count": {
          "type": "integer",
          "minimum": 0,
          "description": "Total number of task list items."
        },
        "completed_count": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of completed task list items."
        }
      }
    }
  }
}