Create Test Case
Rest path
POST /rest/api/1/testCases
Body parameter
{ "properties": { "testDetails": { "properties": { "testType": { "type": "string" }, "steps": { "items": { "properties": { "expectedResult": { "anyOf": [ { "properties": { "version": { "type": "number", "enum": [ 1 ], "nullable": false }, "type": { "type": "string", "enum": [ "doc" ], "nullable": false }, "content": { "items": {}, "type": "array", "example": [ { "type": "paragraph", "content": [ { "type": "text", "text": "This is a paragraph." } ] } ] } }, "required": [ "version", "type", "content" ], "type": "object", "description": "Represents a rich text document node.\nFor more details see: https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/" }, { "type": "string" } ], "nullable": true }, "data": { "anyOf": [ { "properties": { "version": { "type": "number", "enum": [ 1 ], "nullable": false }, "type": { "type": "string", "enum": [ "doc" ], "nullable": false }, "content": { "items": {}, "type": "array", "example": [ { "type": "paragraph", "content": [ { "type": "text", "text": "This is a paragraph." } ] } ] } }, "required": [ "version", "type", "content" ], "type": "object", "description": "Represents a rich text document node.\nFor more details see: https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/" }, { "type": "string" } ], "nullable": true }, "action": { "anyOf": [ { "properties": { "version": { "type": "number", "enum": [ 1 ], "nullable": false }, "type": { "type": "string", "enum": [ "doc" ], "nullable": false }, "content": { "items": {}, "type": "array", "example": [ { "type": "paragraph", "content": [ { "type": "text", "text": "This is a paragraph." } ] } ] } }, "required": [ "version", "type", "content" ], "type": "object", "description": "Represents a rich text document node.\nFor more details see: https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/" }, { "type": "string" } ], "nullable": true } }, "type": "object" }, "type": "array" }, "name": { "type": "string" }, "description": { "type": "string" } }, "type": "object" }, "preconditions": { "anyOf": [ { "properties": { "version": { "type": "number", "enum": [ 1 ], "nullable": false }, "type": { "type": "string", "enum": [ "doc" ], "nullable": false }, "content": { "items": {}, "type": "array", "example": [ { "type": "paragraph", "content": [ { "type": "text", "text": "This is a paragraph." } ] } ] } }, "required": [ "version", "type", "content" ], "type": "object", "description": "Represents a rich text document node.\nFor more details see: https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/" }, { "type": "string" } ] }, "issueDetails": { "properties": { "fields": { "allOf": [ { "properties": { "summary": { "type": "string" }, "project": { "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "issuetype": { "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" } }, "required": [ "summary", "project", "issuetype" ], "type": "object" }, { "additionalProperties": false, "type": "object", "description": "Issue fields Jira API.\nSee: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post" } ] } }, "required": [ "fields" ], "type": "object" } }, "required": [ "issueDetails" ], "type": "object"}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | CreateTestCaseRequest | true | none |
Example responses
Created
{ "testCaseId": 134131314, "versionId": 134131314, "issueId": "10421", "issueKey": "ATM-105"}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | CreateTestCaseResponse |