Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lizoron committed Apr 5, 2024
2 parents 7fcb549 + 39a0ba6 commit d0d965b
Show file tree
Hide file tree
Showing 17 changed files with 932 additions and 31 deletions.
48 changes: 47 additions & 1 deletion docs/api-guide/new-jss-rest-api/api-support-for-jss-and-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,52 @@ sidebar_position: 20

# API Support for New Job Scheduling and Job Scheduling (1st Gen)

The section compares the APIs for the different Job Scheduling features. The New Job Scheduling has a dedicated RESTful API while the original Job Scheduling uses the [Quali API](https://help.quali.com/Online%20Help/0.0/Portal/Quali-API/Quali%20API%20Library.html).

:::note
For brevity, the term "Job Scheduling (1st Gen)" denotes the original Job Scheduling which is accessed via CloudShell Portal.
:::

WIP
### API support

|   | New Job Scheduling | 1st Gen Job Scheduling |
| --- | --- | --- |
| **Authentication operations:** | | |
| Login | Available<br/>**Syntax:**<br/>`POST /api/Account/login` | Available via `(/API/Auth/Login)` API |
| Refresh | Available<br/>**Syntax:**<br/>`GET /api/Token/refresh/{refresh_token}` |   |
| Revoke | Available<br/>**Syntax:**<br/>`POST /api/Token/revoke API` |   |
| **Execution Server management operations:** |
| Get execution servers | **Syntax:**<br/>`GET /api/ExecutionServer` API | Available via Get Execution Servers API |
| Get execution server details | Available<br/>**Syntax:**<br/>`GET /api/ExecutionServer` API |   |
| Delete execution server | Available<br/>**Syntax:**<br/>`DELETE /api/ExecutionServer/{id}` |   |
| **Suite management operations:** |
| Get available suite templates |   | Available via Get Available Suite Templates API |
| Get suite template details | Available<br/>**Syntax:**<br/>`GET http://<Job Scheduling Ingress>/api/spaces/<space_name>/SuiteTemplate/<suite template id>` | Available via Get Suite Template Details API<br/>**Syntax:**<br/>`GET http://<Quali Server>:9000/API/Scheduling/SuiteTemplates/suiteTemplateName` |
| Delete suite template | Available<br/>**Syntax:**<br/>`DELETE /api/spaces/{space_name}/SuiteTemplate/{id}` |   |
| Change suite owner | Available<br/>**Syntax:**<br/>`PUT ​/api​/spaces​/{space_name}​/SuiteTemplate​/{id}​/changeowner` |   |
| Get suite details | Available<br/>**Syntax:**<br/>`GET "http://<Job Scheduling Ingress>/api/spaces/<space_name>/SuiteExecution/<suite execution id>` | Available via Get Suite Details API<br/>**Syntax:**<br/>`GET http://<Quali Server>:9000/API/Scheduling/Suites/suiteId` |
| Get suite status | Available<br/>**Syntax:**<br/>`GET /api/spaces/{space_name}/SuiteTemplate/{id}` | Available via Get Suite Status API<br/>**Syntax:**<br/>`GET http://<Quali Server>:9000/API/Scheduling/Suites/Status/suiteId` |
| Get test folder child elements |   | Available for TestShell Studio tests only |
| Get test information |   | Available for TestShell Studio tests only |
| **Suite execution operations:** |
| Get suite executions for specific template | Available<br/>**Syntax:**<br/>`GET ​/api​/spaces​/{space_name}​/SuiteExecution​/{id} GET API` |   |
| Stop suite execution | Available<br/>**Syntax:**`POST /api/spaces/{space_name}/SuiteExecution/{id}/stop` | Available via Stop Suite Execution API<br/>**Syntax:**<br/>`DELETE http://<Quali Server>:9000/API/Scheduling/Suites/SuiteId` |
| Enqueue custom suite | Available via `/api/spaces/{space_name}/SuiteExecution/{id}` GET API<br/>**Syntax:**`POST http://<Job Scheduling Ingress>/api/spaces/{space_name}/SuiteTemplate/{id}/start` |Available via Enqueue Custom Suite API<br/>**Syntax:**<br/>`POST http://<Quali Server>:9000/API/Scheduling/Suites` |
| Enqueue custom job |   | Available via Enqueue Custom Job API |
| Get job details | Available<br/>**Syntax:**<br/>`GET /api/spaces/{space_name}/SuiteExecution/{id}` | Available via Get Job Details API |
| Stop job execution | Not supported for specific job executions. Supported for suite executions via `/api/spaces/{space_name}/SuiteExecution/{id}/stop` API | Available via Stop Job Execution API |
| Get jobs in queue |   | Available via Get Queued Jobs API |
| Get running jobs |   | Available via Get Running Jobs API |
| Deploy dedicated resrvation per job | Available | Available |
| Generate suite execution report | Available<br/>**Syntax:**<br/>`GET/api/spaces/{space_name}/TestExecution/{id}/Report` |   |
| **Reservation operations:**<br/>The following APIs are available for both Job Scheduling features via Quali API. |
| Get reservation attachment |   |   |
| Get reservation attachment details |   |   |
| Delete file from reservation |   |   |
| **Configuration operations:**<br/>The following APIs are available for both Job Scheduling features via Quali API. |
| Import package |   |   |
| Export package |   |   |

## Related Topics

- [REST API Page](../../jss/jss-portal/jss-rest-api.md)
45 changes: 44 additions & 1 deletion docs/api-guide/new-jss-rest-api/change-suite-owner.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,47 @@ sidebar_position: 12

# Change suite owner

WIP
### Description

Changes a suite template's owner.

### URL

`http://{Job Scheduling API IP}:{port#}/api/spaces/{space_name}/SuiteTemplate/{id}/changeowner`

| Parameter | Description/Comments |
| --- | --- |
| space_name | CloudShell domain in which the suite was executed. (string) |
| id | Suite template's id - included in suite's URL. For example:<br/><code>ht<span>tp</span>://192.168.74.11/Test%20Lab/suite/<b>b25d72e0-4f44-4b62-949c-02596196b157</b>/</code> |

### HTTP method

`PUT`

### Request

<details>
<summary>Headers</summary>

Example header format:

`Content-Type: application/json`
</details>

<details>
<summary>Request body</summary>

| Parameter | Description/Comments |
| --- | --- |
| ownerUsername | CloudShell username to set as the new owner. (string) |
</details>

<details>
<summary>Request example</summary>
```javascript
{
"ownerUsername": "user1"
}
```
</details>

36 changes: 35 additions & 1 deletion docs/api-guide/new-jss-rest-api/delete-suite-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,38 @@ sidebar_position: 9

# Delete suite template

WIP
### Description

Deletes a specific suite template.

### URL

`http://{Job Scheduling API IP}:{port#}/api/spaces/{space_name}/SuiteTemplate/{id}`

| Parameter | Description/Comments |
| --- | --- |
| space_name | CloudShell domain in which the suite was executed. (string) |
| id | Suite execution's ID - included in the suite's URL. (string)<br/>For example:<br/><code>ht<span>tp</span>://192.168.74.11/Test%20Lab/execution/<b>1ab91be7-6136-4fd5-b22d-72c462947459</b>/</code> |

### HTTP method

`DELETE`

### Request

<details>
<summary>Headers</summary>

Example header format:

`Authorization: Basic <authorization token returned from the login method>`

`Content-Type: application/json`

</details>

### Response

```javascript
200 OK
```
39 changes: 38 additions & 1 deletion docs/api-guide/new-jss-rest-api/delete-test-discovery-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,41 @@ sidebar_position: 15

# Delete Test Discovery Service

WIP
### Description

Deletes a Test Discovery Service.

:::danger Important
Before you delete a test repository, please note that this action will remove from CloudShell all tests that were discovered by the repository's discovery server. Any suites that use these tests will be rendered unusable.
:::

### URL

`http://{Job Scheduling API IP}:{port#}/{space_name}/DiscoveryServer/{id}`

| Parameter | Description/Comments |
| --- | --- |
| id | Test Discovery Service's id, which can be retrieved via [Get Test Discovery Services](./get-test-discovery-services) method. |

### HTTP method

`DELETE`

### Request

<details>
<summary>Headers</summary>

Example header format:

`Authorization: Basic <authorization token returned from the login method>`

`Content-Type: application/json`

</details>

### Response

```javascript
200 OK
```
43 changes: 42 additions & 1 deletion docs/api-guide/new-jss-rest-api/delete-test-execution-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,45 @@ sidebar_position: 17

# Delete Test Execution Service

WIP
### Description

Deletes a Test Execution Service.

:::info Notes
When deleting a Test Execution Service, it is marked as deleted and the following takes place:

- The Test Execution Service will not get new execution tasks.
- Test that are pending/running on the Test Execution Service will be terminated.
- The status of jobs assigned to the Test Execution Service will be set to terminated with the reason being that the Test Execution Service was deleted.
:::

### URL

`http://{Job Scheduling API IP}:{port#}/{space_name}/ExecutionServer/{id}`

| Parameter | Description/Comments |
| --- | --- |
| id | Test Execution Service's id, which can be retrieved via [Get Test Execution Services](./get-test-execution-services) method. |

### HTTP method

`DELETE`

### Request

<details>
<summary>Headers</summary>

Example header format:

`Authorization: Basic <authorization token returned from the login method>`

`Content-Type: application/json`

</details>

### Response

```javascript
200 OK
```
9 changes: 5 additions & 4 deletions docs/api-guide/new-jss-rest-api/get-suite-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Get a suite execution's details.

`http://{Job Scheduling API IP}:{port#}/api/spaces/{space_name}/SuiteExecution/{id}`

| Parameter | Description/Comments |
| --- | --- |
| space_name | CloudShell domain in which the suite was executed. (string) |
| id | Suite execution's ID- included in the suite's URL. (string)<br/>For example:<br/><code>ht<span>tp</span>://192.168.74.11/Test%20Lab/execution/<b>1ab91be7-6136-4fd5-b22d-72c462947459</b>/</code> |

### HTTP method

`GET`
Expand All @@ -28,10 +33,6 @@ Example header format:

`Content-Type: application/json`

| Parameter | Description/Comments |
| --- | --- |
| space_name | CloudShell domain in which the suite was executed. (string) |
| id | Suite execution's ID- included in the suite's URL. (string)<br/>For example:<br/>http://192.168.74.11/Test%20Lab/execution/<b>1ab91be7-6136-4fd5-b22d-72c462947459</b>/ |
</details>

### Response
Expand Down
9 changes: 5 additions & 4 deletions docs/api-guide/new-jss-rest-api/get-suite-template-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Gets a detailed summary of a suite template in a domain.

`http://{Job Scheduling API IP}:{port#}/api/spaces/{space_name}/SuiteTemplate/{id}`

| Parameter | Description/Comments |
| --- | --- |
| space_name | CloudShell domain in which the suite was executed. (string) |
| id | Suite execution's ID- included in the suite's URL. (string)<br/>For example:<br/><code>ht<span>tp</span>://192.168.74.11/Test%20Lab/execution/<b>1ab91be7-6136-4fd5-b22d-72c462947459</b>/</code> |

### HTTP method

`GET`
Expand All @@ -28,10 +33,6 @@ Example header format:

`Content-Type: application/json`

| Parameter | Description/Comments |
| --- | --- |
| space_name | CloudShell domain in which the suite was executed. (string) |
| id | Suite execution's ID- included in the suite's URL. (string)<br/>For example:<br/>http://192.168.74.11/Test%20Lab/execution/<b>1ab91be7-6136-4fd5-b22d-72c462947459</b>/ |
</details>

### Response
Expand Down
Loading

0 comments on commit d0d965b

Please sign in to comment.