diff --git a/src/pages/docs/api/get-project-wide-information.md b/src/pages/docs/api/get-project-wide-information.md index a88f2987..1255615b 100644 --- a/src/pages/docs/api/get-project-wide-information.md +++ b/src/pages/docs/api/get-project-wide-information.md @@ -10,307 +10,89 @@ contextual_links: - type: section name: "Contents" - type: link - name: "Obtaining the Run ID" - url: "#obtaining-the-run-id" + name: "Get Users Information" + url: "#get-users-information" - type: link - name: "Test Plan Status API" - url: "#test-plan-status-api" + name: "Get Test Suites Information" + url: "#get-test-suites-information" +- type: link + name: "Get Test Case Priorities" + url: "#get-test-case-priorities" +- type: link + name: "Get Test Case Labels" + url: "#get-test-case-labels" +- type: link + name: "Get Test Case Requirements" + url: "#get-test-case-requirements" --- -[[info | NOTE:]] -| You need to authenticate these requests with your Testsigma API Key. See [How to generate API Keys.](https://testsigma.com/docs/configuration/api-keys/) +--- + +Testsigma provides APIs that allow users to retrieve comprehensive project details, including information on users, test suites, test case priorities, labels, and test case requirements. This article explains how to fetch project-wide information using the available Testsigma API endpoints. --- -## **API Specification** - -## **Get Users** - -Get all the available Users in the Project. -- Request Type: GET -- Endpoint: https://app.testsigma.com/api/v1/users -- Authorization: Bearer -- Sample Response: - -{
-  "content": [
-    {
-      "id": 10,
-      "email": "bigbosskasyap41658237083302@gmail.com",
-      "firstName": null,
-      "lastName": null,
-      "userName": "bigbosskasyap41658237083302",
-      "status": "Active",
-      "isDeleted": false,
-      "isAdmin": false,
-      "isSuperAdmin": true,
-      "userType": null,
-      "isAPIUser": true,
-      "isCrowdUser": false,
-      "isMasked": false,
-      "gdpr": false,
-      "createdDate": 1658237083000,
-      "updatedDate": 1658237083000,
-      "createdById": 9,
-      "updatedById": 9,
-      "privileges": null,
-      "authType": null,
-      "identityServiceId": null
-    }
-  ],
-  "pageable": {
-    "sort": {
-      "sorted": false,
-      "unsorted": true,
-      "empty": true
-    },
-    "offset": 0,
-    "pageNumber": 0,
-    "pageSize": 20,
-    "unpaged": false,
-    "paged": true
-  },
-  "last": true,
-  ""totalPages": 1,
-  ""totalElements": 2,
-  ""sort": {
-  "  ""sorted": false,
-  "  ""unsorted": true,
-  "  ""empty": true
-  "},
-  ""first": true,
-  ""size": 20,
-  ""number": 0,
-  ""numberOfElements": 2,
-  ""empty": false
-}
- - -  + + +> ## **Prerequisites** +> +> - You should have an API Key. See, [generate API Keys in Testsigma](https://testsigma.com/docs/configuration/api-keys/). --- -## **Get Test Suites** +## **Get Users Information** + +Get all the available users in the Project. + +| **Request Type** | **GET** | +|----------|----------| +| **Endpoint** | ```https://app.testsigma.com/api/v1/users``` | +| **Authorization** | Bearer API Token | +| **Response Body Type** | JSON | +| **Response Body (Sample)** | {
  "content": [
    {
      "id": 10,
      "email": "bigbosskasyap41658237083302@gmail.com",
      "firstName": null,
      "lastName": null,
      "userName": "bigbosskasyap41658237083302",
      "status": "Active",
      "isDeleted": false,
      "isAdmin": false,
      "isSuperAdmin": true,
      "userType": null,
      "isAPIUser": true,
      "isCrowdUser": false,
      "isMasked": false,
      "gdpr": false,
      "createdDate": 1658237083000,
      "updatedDate": 1658237083000,
      "createdById": 9,
      "updatedById": 9,
      "privileges": null,
      "authType": null,
      "identityServiceId": null
    }
  ],
  "pageable": {
    "sort": {
      "sorted": false,
      "unsorted": true,
      "empty": true
    },
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 20,
    "unpaged": false,
    "paged": true
  },
  "last": true,
  "totalPages": 1,
  "totalElements": 2,
  "sort": {
    "sorted": false,
    "unsorted": true,
    "empty": true
    },
  "first": true,
  "size": 20,
  "number": 0,
  "numberOfElements": 2,
  "empty": false
} | + +--- + +## **Get Test Suites Information** Get all the available Test Suites in the Project. -- Request Type: GET -- Endpoint: https://app.testsigma.com/api/v1/test_suites -- Authorization: Bearer -- Sample Response: - - -{
-  "content": [
-    {
-      "id": 84,
-      "appVersionId": 39,
-      "preRequisite": null,
-      "createdById": 9,
-      "updatedById": 9,
-      "name": "Home page tests",
-      "description": "",
-      "createdDate": 1567753941000,
-      "updatedDate": 1577978117000,
-      "preRequisiteSuite": null,
-      "lastRun": {
-        "id": 951,
-        "environmentResultId": 1093,
-        "suiteId": 84,
-        "startTime": 1657921201000,
-        "endTime": 1657921263000,
-        "duration": 61306,
-        "result": "FAILURE",
-        "status": "STATUS_COMPLETED",
-        "message": " Test Suite execution failed",
-        "position": 1,
-        "executionInitiatedOn": null,
-        "agentPickedOn": null,
-        "deviceAllocatedOn": null,
-        "sessionCreatedOn": null,
-        "sessionCompletedOn": null,
-        "totalCount": 1,
-        "failedCount": 1,
-        "passedCount": 0,
-        "abortedCount": 0,
-        "stoppedCount": 0,
-        "notExecutedCount": 0,
-        "preRequisiteFailedCount": 0,
-        "queuedCount": 0,
-        "isVisuallyPassed": null,
-        "testSuite": null,
-        "environmentResult": null,
-        "sessionId": null,
-        "videoURL": null,
-        "logURLS": null,
-        "childResult": null,
-        "reRunParentId": null
-      },
-  ],
-  "pageable": {
-    "sort": {
-      "sorted": false,
-      "unsorted": true,
-      "empty": true
-    },
-    "pageNumber": 0,
-    "pageSize": 25,
-    "offset": 0,
-    "unpaged": false,
-    "paged": true
-  },
-  "last": true,
-  "totalElements": 18,
-  "totalPages": 1,
-  "sort": {
-  "sorted": false,
-  "unsorted": true,
-  "empty": true
-  },
-  "number": 0,
-  "first": true,
-  "numberOfElements": 1,
-  "size": 25,
-  "empty": false
-}
- - -  + +| **Request Type** | **GET** | +|----------|----------| +| **Endpoint** | ```https://app.testsigma.com/api/v1/test_suites``` | +| **Authorization** | Bearer API Token | +| **Response Body Type** | JSON | +| **Response Body (Sample)** | {
  "content": [
    {
      "id": 84,
      "appVersionId": 39,
      "preRequisite": null,
      "createdById": 9,
      "updatedById": 9,
      "name": "Home page tests",
      "description": "",
      "createdDate": 1567753941000,
      "updatedDate": 1577978117000,
      "preRequisiteSuite": null,
      "lastRun": {
        "id": 951,
        "environmentResultId": 1093,
        "suiteId": 84,
        "startTime": 1657912101000,
        "endTime": 1657912630000,
        "duration": 61306,
        "result": "FAILURE",
        "status": "STATUS\_COMPLETED",
        "message": "Test Suite execution failed",
        "position": 1,
        "executionInitiatedOn": null,
        "agentPickedOn": null,
        "deviceAllocatedOn": null,
        "sessionCreatedOn": null,
        "sessionCompletedOn": null,
        "totalCount": 1,
        "failedCount": 1,
        "passedCount": 0,
        "abortedCount": 0,
        "stoppedCount": 0,
        "notExecutedCount": 0,
        "preRequisiteFailedCount": 0,
        "queuedCount": 0,
        "isVisuallyPassed": null,
        "testSuite": null,
        "environmentResult": null,
        "sessionId": null,
        "videoURL": null,
        "logURLs": null,
        "childResult": null,
        "reRunParentId": null
      }
    }
  ],
  "pageable": {
    "sort": {
      "sorted": false,
      "unsorted": true,
      "empty": true
    },
    "pageNumber": 0,
    "pageSize": 25,
    "offset": 0,
    "unpaged": false,
    "paged": true
  },
  "last": true,
  "totalElements": 18,
  "totalPages": 1,
  "sort": {
    "sorted": false,
    "unsorted": true,
    "empty": true
    },
  "number": 0,
  "first": true,
  "numberOfElements": 1,
  "size": 25,
  "empty": false
} | + --- ## **Get Test Case Priorities** Get all the available Test Case Priorities in the Project. -- Request Type: GET -- Endpoint: https://app.testsigma.com/api/v1/test_case_priorities -- Authorization: Bearer -- Sample Response: -{ -  "content": [
-    {
-      "id": 46,
-      "name": "Critical",
-      "displayName": "Critical",
-      "recordActive": null,
-      "projectId": 10,
-      "createdBy": null,
-      "updatedBy": null,
-      "createdDate": 1550559355000,
-      "updatedDate": null
-    },
-    {
-      "id": 47,
-      "name": "Major",
-      "displayName": "Major",
-      "recordActive": null,
-      "projectId": 10,
-      "createdBy": null,
-      "updatedBy": null,
-      "createdDate": 1550559355000,
-      "updatedDate": null
-    },
-    {
-      "id": 48,
-      "name": "Medium",
-      "displayName": "Medium",
-      "recordActive": null,
-      "projectId": 10,
-      "createdBy": null,
-      "updatedBy": null,
-      "createdDate": 1550559355000,
-      "updatedDate": null
-    }
-  ],
-  "pageable": {
-    "sort": {
-      "sorted": false,
-      "unsorted": true,
-      "empty": true
-    },
-    "pageNumber": 0,
-    "pageSize": 20,
-    "offset": 0,
-    "unpaged": false,
-    "paged": true
-  },
-  "last": false,
-  "totalElements": 3,
-  "totalPages": 1,
-  "first": true,
-  "sort": {
-    "sorted": false,
-    "unsorted": true,
-    "empty": true
-  },
-  "number": 0,
-  "numberOfElements": 20,
-  "size": 20,
-  "empty": false
-}
- -  + + +| **Request Type** | **GET** | +|----------|----------| +| **Endpoint** | ```https://app.testsigma.com/api/v1/test_case_priorities``` | +| **Authorization** | Bearer API Token | +| **Response Body Type** | JSON | +| **Response Body (Sample)** | {
  "content": [
    {
      "id": 46,
      "name": "Critical",
      "displayName": "Critical",
      "recordActive": null,
      "projectId": 10,
      "createdBy": null,
      "updatedBy": null,
      "createdDate": 1550593550000,
      "updatedDate": null
      },
      {
      "id": 47,
      "name": "Major",
      "displayName": "Major",
      "recordActive": null,
      "projectId": 10,
      "createdBy": null,
      "updatedBy": null,
      "createdDate": 1550593550000,
      "updatedDate": null
      },
      {
      "id": 48,
      "name": "Medium",
      "displayName": "Medium",
      "recordActive": null,
      "projectId": 10,
      "createdBy": null,
      "updatedBy": null,
      "createdDate": 1550593550000,
      "updatedDate": null
      }
    ],
  "pageable": {
    "sort": {
      "sorted": false,
      "unsorted": true,
      "empty": true
    },
    "pageNumber": 0,
    "pageSize": 20,
    "offset": 0,
    "unpaged": false,
    "paged": true
  },
  "last": false,
  "totalElements": 3,
  "totalPages": 1,
  "first": true,
  "sort": {
    "sorted": false,
    "unsorted": true,
    "empty": true
    },
  "number": 0,
  "numberOfElements": 20,
  "size": 20,
  "empty": false
} | --- ## **Get Test Case Labels** Get all the available Test Case Priorities in the Project. -- Request Type: GET -- Endpoint: https://app.testsigma.com/api/v1/tags -- Authorization: Bearer -- Sample Response: - -{
-  "content": [
-    {
-      "id": 1,
-      "name": "Test",
-      "type": "TEST_CASE",
-      "count": 1
-    },
-    {
-      "id": 2,
-      "name": "Test1",
-      "type": "TEST_CASE",
-      "count": 1
-    },
-    {
-      "id": 3,
-      "name": "Test2",
-      "type": "TEST_CASE",
-      "count": 1
-    }
-  ],
-  "pageable": {
-    "sort": {
-      "sorted": false,
-      "unsorted": true,
-      "empty": true
-    },
-    "offset": 0,
-    "pageNumber": 0,
-    "pageSize": 20,
-    "unpaged": false,
-    "paged": true
-  },
-  "last": true,
-  "totalPages": 1,
-  "totalElements": 3,
-  "sort": {
-    "sorted": false,
-    "unsorted": true,
-    "empty": true
-  },
-  "first": true,
-  "size": 20,
-  "number": 0,
-  "numberOfElements": 3,
-  "empty": false
-}
- - -  + +| **Request Type** | **GET** | +|----------|----------| +| **Endpoint** | ```https://app.testsigma.com/api/v1/tags``` | +| **Authorization** | Bearer API Token | +| **Response Body Type** | JSON | +| **Response Body (Sample)** | {
  "content": [
    {
      "id": 1,
      "name": "Test",
      "type": "TESTCASE",
      "count": 1
      },
      {
      "id": 2,
      "name": "Test1",
      "type": "TESTCASE",
      "count": 1
      },
      {
      "id": 3,
      "name": "Test2",
      "type": "TEST\_CASE",
      "count": 1
      }
    ],
  "pageable": {
    "sort": {
      "sorted": false,
      "unsorted": true,
      "empty": true
    },
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 20,
    "unpaged": false,
    "paged": true
  },
  "last": true,
  "totalPages": 1,
  "totalElements": 3,
  "sort": {
    "sorted": false,
    "unsorted": true,
    "empty": true
    },
  "first": true,
  "size": 20,
  "number": 0,
  "numberOfElements": 3,
  "empty": false
} | + --- @@ -318,110 +100,12 @@ Get all the available Test Case Priorities in the Project. ## **Get Test Case Requirements** Get all the available Test Case Requirements in the Project. -- Request Type: GET -- Endpoint: https://app.testsigma.com/api/v1/requirements -- Authorization: Bearer -- Sample Response: - -{
-  "content": [
-    {
-      "id": 71,
-      "requirementName": "Default Requirement",
-      "requirementDescription": null,
-      "requirementTypeId": 78,
-      "requirementType": {
-        "id": 78,
-        "name": "Customer Requirements",
-        "displayName": "Customer Requirements",
-        "projectId": 17,
-        "createdById": 9,
-        "updatedById": 9,
-        "createdDate": 1658114333000,
-        "updatedDate": 1658114376000
-      },
-      "files": null,
-      "applicationVersionId": 47,
-      "requirementId": null,
-      "createdById": 9,
-      "updatedById": 9,
-      "customFields": "{}",
-      "startTime": 1658114333000,
-      "endTime": 1660706333000,
-      "createdDate": 1658114333000,
-      "updatedDate": 1658114377000,
-      "plannedManualCount": 10,
-      "plannedAutomationCount": 10,
-      "requirementKey": null,
-      "version": {
-        "id": 47,
-        "applicationId": 33,
-        "versionName": "1.0",
-        "description": null,
-        "startTime": 1658114333000,
-        "customFields": null,
-        "endTime": 1660706333000,
-        "application": {
-          "id": 33,
-          "name": "IOSNative",
-          "description": null,
-          "customFields": null,
-          "projectId": 17,
-          "applicationType": "IOSNative",
-          "project": {
-            "id": 17,
-            "name": "IMport11",
-            "description": "",
-            "customFields": null,
-            "hasMultipleApps": false,
-            "hasMultipleVersions": false,
-            "isDemo": false,
-            "projectType": "WebApplication",
-            "createdById": 9,
-            "updatedById": 9,
-            "createdDate": 1658114333000,
-            "updatedDate": 1658114333000,
-            "files": null
-          },
-          "createdById": 9,
-          "updatedById": 9,
-          "createdDate": 1658114333000,
-          "updatedDate": 1658114333000
-        },
-        "createdDate": 1658114333000,
-        "updatedDate": 1658114333000,
-        "updatedById": 9,
-        "createdById": 9
-      }
-    }
-  ],
-  "pageable": {
-    "sort": {
-      "sorted": false,
-      "unsorted": true,
-      "empty": true
-    },
-    "pageSize": 20,
-    "pageNumber": 0,
-    "offset": 0,
-    "paged": true,
-    "unpaged": false
-  },
-  "last": true,
-  "totalElements": 10,
-  "totalPages": 1,
-  "first": true,
-  "sort": {
-    "sorted": false,
-    "unsorted": true,
-    "empty": true
-  },
-  "number": 0,
-  "numberOfElements": 10,
-  "size": 20,
-  "empty": false
-}
- -  + +| **Request Type** | **GET** | +|----------|----------| +| **Endpoint** | ```https://app.testsigma.com/api/v1/requirements``` | +| **Authorization** | Bearer API Token | +| **Response Body Type** | JSON | +| **Response Body (Sample)** | {
 "content": [
  {
   "id": 71,
   "requirementName": "Default Requirement",
   "requirementDescription": null,
   "requirementTypeId": 78,
   "requirementType": {
    "id": 78,
    "name": "Customer Requirements",
    "displayName": "Customer Requirements",
    "projectId": 17,
    "createdById": 9,
    "updatedById": 9,
    "createdDate": 1658114333000,
    "updatedDate": 1658114376000
   },
   "files": null,
   "applicationVersionId": 47,
   "requirementId": null,
   "createdById": 9,
   "updatedById": 9,
   "customFields": "{}",
   "startTime": 1658114333000,
   "endTime": 1660706333000,
   "createdDate": 1658114333000,
   "updatedDate": 1658114377000,
   "plannedManualCount": 10,
   "plannedAutomationCount": 10,
   "requirementKey": null,
   "version": {
    "id": 47,
    "applicationId": 33,
    "versionName": "1.0",
    "description": null,
    "startTime": 1658114333000,
    "customFields": null,
    "endTime": 1660706333000,
    "application": {
     "id": 33,
     "name": "IOSNative",
     "description": null,
     "customFields": null,
     "projectId": 17,
     "applicationType": "IOSNative",
     "project": {
      "id": 17,
      "name": "IMport11",
      "description": "",
      "customFields": null,
      "hasMultipleApps": false,
      "hasMultipleVersions": false,
      "isDemo": false,
      "projectType": "WebApplication",
      "createdById": 9,
      "updatedById": 9,
      "createdDate": 1658114333000,
      "updatedDate": 1658114333000,
      "files": null
     }
    }
   }
  },
  "createdById": 9,
  "updatedById": 9,
  "createdDate": 1658114333000,
  "updatedDate": 1658114333000
 },
 "createdDate": 1658114333000,
 "updatedDate": 1658114333000,
 "updatedById": 9,
 "createdById": 9
 }
 ],
 "pageable": {
  "sort": {
   "sorted": false,
   "unsorted": true,
   "empty": true
  },
  "pageSize": 20,
  "pageNumber": 0,
  "offset": 0,
  "paged": true,
  "unpaged": false
 },
 "last": true,
 "totalElements": 10,
 "totalPages": 1,
 "first": true,
 "sort": {
  "sorted": false,
  "unsorted": true,
  "empty": true
 },
 "number": 0,
 "numberOfElements": 10,
 "size": 20,
 "empty": false
} | --- \ No newline at end of file diff --git a/src/pages/docs/api/test-results-at-all-levels.md b/src/pages/docs/api/test-results-at-all-levels.md index 2deb60d4..762141e6 100644 --- a/src/pages/docs/api/test-results-at-all-levels.md +++ b/src/pages/docs/api/test-results-at-all-levels.md @@ -36,10 +36,11 @@ You can leverage Testsigma APIs to fetch detailed test results at all levels. Wh --- -## **Prerequisites** - -- You should have an API Key. See, [generate API Keys in Testsigma](https://testsigma.com/docs/configuration/api-keys/). -- You should have a [test plan run ID](https://testsigma.com/docs/api/test-plans/#obtaining-the-run-id). +> ## **Prerequisites** +> +> - You should have an API Key. See, [generate API Keys in Testsigma](https://testsigma.com/docs/configuration/api-keys/). +> +> - You should have a [test plan run ID](https://testsigma.com/docs/api/test-plans/#obtaining-the-run-id). ---