get_cases
Retrieve test cases from TestRail projects and suites with filtering options for creation date, priority, milestone, and custom criteria to organize testing workflows.
Instructions
Get a list of test cases for a project or specific test suite with optional filtering and pagination.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | TestRail project ID | |
| suite_id | No | TestRail suite ID (optional if project is in single suite mode) | |
| created_after | No | Only return test cases created after this date (as UNIX timestamp) | |
| created_before | No | Only return test cases created before this date (as UNIX timestamp) | |
| created_by | No | A list of creator user IDs to filter by | |
| filter | No | Only return cases with matching filter string in the case title | |
| limit | No | The number of test cases to return (max 250, default 250) | |
| milestone_id | No | A list of milestone IDs to filter by | |
| offset | No | Where to start counting the test cases from (pagination offset) | |
| priority_id | No | A list of priority IDs to filter by | |
| refs | No | A single Reference ID (e.g. TR-1, 4291, etc.) | |
| section_id | No | The ID of a test case section | |
| template_id | No | A list of template IDs to filter by | |
| type_id | No | A list of case type IDs to filter by | |
| updated_after | No | Only return test cases updated after this date (as UNIX timestamp) | |
| updated_before | No | Only return test cases updated before this date (as UNIX timestamp) | |
| updated_by | No | A user ID who updated test cases to filter by | |
| label_id | No | A list of label IDs to filter by |
Input Schema (JSON Schema)
{
"properties": {
"created_after": {
"description": "Only return test cases created after this date (as UNIX timestamp)",
"type": "integer"
},
"created_before": {
"description": "Only return test cases created before this date (as UNIX timestamp)",
"type": "integer"
},
"created_by": {
"description": "A list of creator user IDs to filter by",
"items": {
"exclusiveMinimum": 0,
"type": "integer"
},
"type": "array"
},
"filter": {
"description": "Only return cases with matching filter string in the case title",
"type": "string"
},
"label_id": {
"description": "A list of label IDs to filter by",
"items": {
"exclusiveMinimum": 0,
"type": "integer"
},
"type": "array"
},
"limit": {
"description": "The number of test cases to return (max 250, default 250)",
"exclusiveMinimum": 0,
"maximum": 250,
"type": "integer"
},
"milestone_id": {
"description": "A list of milestone IDs to filter by",
"items": {
"exclusiveMinimum": 0,
"type": "integer"
},
"type": "array"
},
"offset": {
"description": "Where to start counting the test cases from (pagination offset)",
"minimum": 0,
"type": "integer"
},
"priority_id": {
"description": "A list of priority IDs to filter by",
"items": {
"exclusiveMinimum": 0,
"type": "integer"
},
"type": "array"
},
"project_id": {
"description": "TestRail project ID",
"exclusiveMinimum": 0,
"type": "integer"
},
"refs": {
"description": "A single Reference ID (e.g. TR-1, 4291, etc.)",
"type": "string"
},
"section_id": {
"description": "The ID of a test case section",
"exclusiveMinimum": 0,
"type": "integer"
},
"suite_id": {
"description": "TestRail suite ID (optional if project is in single suite mode)",
"exclusiveMinimum": 0,
"type": "integer"
},
"template_id": {
"description": "A list of template IDs to filter by",
"items": {
"exclusiveMinimum": 0,
"type": "integer"
},
"type": "array"
},
"type_id": {
"description": "A list of case type IDs to filter by",
"items": {
"exclusiveMinimum": 0,
"type": "integer"
},
"type": "array"
},
"updated_after": {
"description": "Only return test cases updated after this date (as UNIX timestamp)",
"type": "integer"
},
"updated_before": {
"description": "Only return test cases updated before this date (as UNIX timestamp)",
"type": "integer"
},
"updated_by": {
"description": "A user ID who updated test cases to filter by",
"exclusiveMinimum": 0,
"type": "integer"
}
},
"required": [
"project_id"
],
"type": "object"
}