neoload-web-java-client

Java client for NeoLoad Web Rest API

License

License

Categories

Categories

Java Languages CLI User Interface
GroupId

GroupId

com.neotys
ArtifactId

ArtifactId

neoload-web-java-client
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

neoload-web-java-client
Java client for NeoLoad Web Rest API
Project URL

Project URL

https://github.com/Neotys-Labs/neoload-web-java-client
Source Code Management

Source Code Management

https://github.com/Neotys-Labs/neoload-web-java-client

Download neoload-web-java-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.neotys/neoload-web-java-client/ -->
<dependency>
    <groupId>com.neotys</groupId>
    <artifactId>neoload-web-java-client</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.neotys/neoload-web-java-client/
implementation 'com.neotys:neoload-web-java-client:1.0.0'
// https://jarcasting.com/artifacts/com.neotys/neoload-web-java-client/
implementation ("com.neotys:neoload-web-java-client:1.0.0")
'com.neotys:neoload-web-java-client:jar:1.0.0'
<dependency org="com.neotys" name="neoload-web-java-client" rev="1.0.0">
  <artifact name="neoload-web-java-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.neotys', module='neoload-web-java-client', version='1.0.0')
)
libraryDependencies += "com.neotys" % "neoload-web-java-client" % "1.0.0"
[com.neotys/neoload-web-java-client "1.0.0"]

Dependencies

compile (6)

Group / Artifact Type Version
io.swagger.core.v3 : swagger-annotations jar 2.0.0
com.squareup.okhttp : okhttp jar 2.7.5
com.squareup.okhttp : logging-interceptor jar 2.7.5
com.google.code.gson : gson jar 2.8.1
io.gsonfire : gson-fire jar 1.8.3
org.threeten : threetenbp jar 1.3.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

swagger-java-client

NeoLoad API

  • API version: 3.0
    • Build date: 2020-06-12T09:30:22.329+02:00[Europe/Paris]

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

Automatically generated by the Swagger Codegen

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>io.swagger</groupId>
  <artifactId>swagger-java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/swagger-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourcesApi;

import java.io.File;
import java.util.*;

public class ResourcesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: NeoloadAuthorizer
        ApiKeyAuth NeoloadAuthorizer = (ApiKeyAuth) defaultClient.getAuthentication("NeoloadAuthorizer");
        NeoloadAuthorizer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //NeoloadAuthorizer.setApiKeyPrefix("Token");

        ResourcesApi apiInstance = new ResourcesApi();
        String fromDateTime = "fromDateTime_example"; // String | Date-time with an offset of the beginning of the search. Format YYYY-MM-DDTHH:mm:ssZ<br/> Example 2020-01-01T09:00:00+00:00
        String toDateTime = "toDateTime_example"; // String | Date-time with an offset of the end of the search. Format YYYY-MM-DDTHH:mm:ssZ<br/> Example 2020-01-01T09:00:00+00:00
        Integer limit = 50; // Integer | The maximum number of elements returned by this call. The maximum must be less than or equal to 200.
        Integer offset = 0; // Integer | The offset of the first element to return. Starting at this offset, the query will return a maximum of 'limit' elements.
        try {
            ArrayOfReservationDefinition result = apiInstance.getReservations(fromDateTime, toDateTime, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourcesApi#getReservations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourcesApi;

import java.io.File;
import java.util.*;

public class ResourcesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: NeoloadAuthorizer
        ApiKeyAuth NeoloadAuthorizer = (ApiKeyAuth) defaultClient.getAuthentication("NeoloadAuthorizer");
        NeoloadAuthorizer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //NeoloadAuthorizer.setApiKeyPrefix("Token");

        ResourcesApi apiInstance = new ResourcesApi();
        try {
            ArrayOfZoneDefinition result = apiInstance.getZones();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourcesApi#getZones");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://your-hostname.com/v3

Class Method HTTP request Description
ResourcesApi getReservations GET /resources/reservations Lists reservations
ResourcesApi getZones GET /resources/zones List all zones
ResultsApi deleteTestResult DELETE /workspaces/{workspaceId}/test-results/{resultId} Deletes a test result
ResultsApi getTestResult GET /workspaces/{workspaceId}/test-results/{resultId} Test result description
ResultsApi getTestResultElementDefinition GET /workspaces/{workspaceId}/test-results/{resultId}/elements/{elementId} Test result element definition
ResultsApi getTestResultElements GET /workspaces/{workspaceId}/test-results/{resultId}/elements Test result elements
ResultsApi getTestResultElementsPercentiles GET /workspaces/{workspaceId}/test-results/{resultId}/elements/{elementId}/percentiles Test result percentiles transaction since the beginning of the test result
ResultsApi getTestResultElementsPoints GET /workspaces/{workspaceId}/test-results/{resultId}/elements/{elementId}/points Test results elements points since the beginning of the test result
ResultsApi getTestResultElementsSla GET /workspaces/{workspaceId}/test-results/{resultId}/elements/{elementId}/sla Test result elements SLA status since the beginning of the test result
ResultsApi getTestResultElementsValues GET /workspaces/{workspaceId}/test-results/{resultId}/elements/{elementId}/values Test result elements values
ResultsApi getTestResultEvents GET /workspaces/{workspaceId}/test-results/{resultId}/events Test result events
ResultsApi getTestResultGraph POST /workspaces/{workspaceId}/test-results/{resultId}/graph Test result Graph
ResultsApi getTestResultList GET /workspaces/{workspaceId}/test-results Lists test results
ResultsApi getTestResultMonitorDefinition GET /workspaces/{workspaceId}/test-results/{resultId}/monitors/{counterId} Test result counter definition
ResultsApi getTestResultMonitors GET /workspaces/{workspaceId}/test-results/{resultId}/monitors Test result monitors
ResultsApi getTestResultMonitorsPoints GET /workspaces/{workspaceId}/test-results/{resultId}/monitors/{counterId}/points Test result monitors points
ResultsApi getTestResultMonitorsValues GET /workspaces/{workspaceId}/test-results/{resultId}/monitors/{counterId}/values Test result monitors values
ResultsApi getTestResultMultiGraph POST /workspaces/{workspaceId}/test-results/graph Test results MultiGraph
ResultsApi getTestResultSLAGlobalIndicators GET /workspaces/{workspaceId}/test-results/{resultId}/slas/statistics SLAs global indicators
ResultsApi getTestResultSLAPerInterval GET /workspaces/{workspaceId}/test-results/{resultId}/slas/per-interval SLAs per time interval
ResultsApi getTestResultSLAPerTest GET /workspaces/{workspaceId}/test-results/{resultId}/slas/per-test SLAs per test
ResultsApi getTestResultStatistics GET /workspaces/{workspaceId}/test-results/{resultId}/statistics Test result main statistics
ResultsApi postTestResultMonitors POST /workspaces/{workspaceId}/test-results/{resultId}/monitors Create custom monitors
ResultsApi stopTestResult POST /workspaces/{workspaceId}/test-results/{resultId}/stop Stop a running test result
ResultsApi updateTestResult PUT /workspaces/{workspaceId}/test-results/{resultId} Update a test result
RuntimeApi deleteTest DELETE /workspaces/{workspaceId}/tests/{testId} Delete a test
RuntimeApi getTest GET /workspaces/{workspaceId}/tests/{testId} Get a test
RuntimeApi getTestList GET /workspaces/{workspaceId}/tests Get a test list
RuntimeApi getTestsRun POST /workspaces/{workspaceId}/tests/{testId}/start Starts a test
RuntimeApi patchTest PATCH /workspaces/{workspaceId}/tests/{testId} Partially update a test
RuntimeApi postCreateTest POST /workspaces/{workspaceId}/tests Create a new test
RuntimeApi postUploadProject POST /workspaces/{workspaceId}/tests/{testId}/project Uploads a NeoLoad project zip file or a standalone as code file
RuntimeApi putTest PUT /workspaces/{workspaceId}/tests/{testId} Fully update a test
RuntimeApi readProjectMetadata GET /workspaces/{workspaceId}/tests/{testId}/project Get project's metadata
WorkspacesApi getWorkspaceList GET /workspaces Get the list workspaces that can be accessed

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

NeoloadAuthorizer

  • Type: API key
  • API key parameter name: accountToken
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

com.neotys

Neotys Labs

Neotys Labs provides different pluggable assets for NeoLoad, from experimental features to mature open-source assets.

Versions

Version
1.0.0