Skip to content

Commit

Permalink
Merge pull request #221 from Xceptance/RN78_updates
Browse files Browse the repository at this point in the history
RN 78 updates
  • Loading branch information
js-xc authored Feb 7, 2024
2 parents ec07dee + 554e765 commit a9ca1b3
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
59 changes: 41 additions & 18 deletions content/en/xtc/integrations/500-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ Please note that this feature is still in beta. We encourage you to test it, but

To allow remote access to your load tests, you must first create client credentials. You can do this in your organization or in your projects.

To create client credentials in your organization, go to *Configuration* > *Integrations* > *API Client Credentials* and click the *Add* button. You will need to specify a name and an optional expiration date. You will also need to select an API version and the scopes (purposes) for which these credentials will be used.
To create client credentials in your organization, go to *Configuration* > *Integrations* > *API Client Credentials* and click the *Add* button. You will need to specify a name and an optional expiration date. You will also need to select an API version and the scopes (purposes) for which these credentials will be used. API credentials with an expiration date will expire _at the end_ of the specified day (UTC).

{{< image src="xtc/api_credentials_create.png" >}}
Dialog to add new client credentials to an organization.
{{< /image >}}


Submit the dialog and XTC will show you the generated client secret, which you can now copy to a safe place. You will not be able to access it again, so if you lose or forget the secret, fresh credentials have to be created.

{{% note notitle %}}
Expand Down Expand Up @@ -76,19 +75,43 @@ curl -X GET \

If all went well, you should see a JSON response with all your load tests printed to the console.

For your convenience, here is a list of all current API endpoints and what they are used for:

* List all load tests in a project:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests`
* List the details of a certain load test:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>`
* List the status of a certain load test:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/status`
* Copy the specified load test and run the copy:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/runCopy`
* Download the specified report archive:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/reports/<report-number>/download`
* Download the specified report archive:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/results/<result-number>/download`

For a complete formal documentation, visit https://xtc.xceptance.com/public/api/json or https://xtc.xceptance.com/public/api/yaml. There you will find the [OpenAPI](https://www.openapis.org/)-compliant specification of all existing API endpoints, including their respective request and response types, in either JSON or YAML format.
For your convenience, here is a list of current API endpoints and what they are used for:

### Project API Endpoints

* Retrieve the details of a project:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>` (requires scope `PROJECT_DETAILS`)
* List all the projects of an organization:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects` (requires scope `PROJECT_LIST`)

### Load Test API Endpoints

* Copy the specified load test and run the copy:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/runCopy` (requires scope `LOADTEST_COPY_RUN`)
* List the details of a certain load test:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>` (requires scope `LOADTEST_DETAILS`)
* List all load tests in a project:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests`(requires scope `LOADTEST_LIST`)
* Download the specified report archive:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/reports/<report-number>/download`(requires scope `LOADTEST_REPORT_DOWNLOAD`)
* Download the specified result archive:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/results/<result-number>/download`(requires scope `LOADTEST_RESULT_DOWNLOAD`)
* List the status of a certain load test:<br />
`GET /public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/status`(requires scope `LOADTEST_STATUS`)

## API Documentation and Explorer

For a complete formal documentation, visit https://xtc.xceptance.com/public/api/json or https://xtc.xceptance.com/public/api/yaml. There you will find the [OpenAPI](https://www.openapis.org/)-compliant specification of all existing API endpoints, including their respective request and response types, in either JSON or YAML format.

In addition to the OpenApi specification in JSON or YAML format, XTC also presents the definition of its public APIs as a browsable documentation, the [XTC API Explorer](https://xtc.xceptance.com/exploreApi): this includes the help texts as well as the input and output data types for each API endpoint.

{{< image src="xtc/api_explorer.png" >}}
API Explorer displaying information about the load test details request.
{{< /image >}}

You can also try API calls directly from the API Explorer. For this to work, you will need to configure authorization information. To do this, go to **Authentication** in the menu. You can then provide either a valid bearer access token ***or*** specify client ID and secret as well as the required scopes for XTC to create a new bearer access token on your behalf using the OAuth procedure.

{{< image src="xtc/api_explorer_authentication.png" >}}
Handling authentication in the API explorer: an access token has been created for the entered client ID and secret.
{{< /image >}}

2 changes: 1 addition & 1 deletion content/en/xtc/xtc-release-notes/v76.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ For your convenience, here is a list of all the API endpoints and what they are
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/runCopy`
* Download the specified report archive:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/reports/<report-number>/download`
* Download the specified report archive:<br>
* Download the specified result archive:<br>
`/public/api/v1/orgs/<org-short-name>/projects/<project-short-name>/loadTests/<load-test-number>/results/<result-number>/download`

For a complete formal documentation, visit https://xtc.xceptance.com/public/api/json or https://xtc.xceptance.com/public/api/yaml. There you will find the [OpenAPI](https://www.openapis.org/)-compliant specification of all existing API endpoints, including their respective request and response types, in either JSON or YAML format.
2 changes: 1 addition & 1 deletion content/en/xtc/xtc-release-notes/v78.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sitemap:

* In addition to the OpenApi specification in JSON or YAML format, XTC now also presents the definition of its public APIs as a browsable documentation, the [XTC API Explorer](https://xtc.xceptance.com/exploreApi):
* The documentation includes the help texts as well as the input and output data types for each API endpoint.
* You can also try API calls directly from the API Explorer. For this to work, you will need to configure authorization information in the top right corner of the page. Provide either a valid bearer access token OR specify client ID and secret as well as the required scopes for XTC to create a new bearer access token on your behalf using the OAuth procedure.
* You can also try API calls directly from the API Explorer. For this to work, you will need to configure authorization information. Provide either a valid bearer access token OR specify client ID and secret as well as the required scopes for XTC to create a new bearer access token on your behalf using the OAuth procedure.
* The *Add API Client Credentials* dialog has been enhanced:
* Past expiration dates can no longer be specified.
* The list of scopes is now sorted alphabetically.
Expand Down
Binary file modified static/images/xtc/api_credentials_create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/xtc/api_explorer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a9ca1b3

Please sign in to comment.