# openapi-java-client appNG REST API - API version: 1.0.0 - Build date: 2023-09-06T11:11:26.226947+02:00[Europe/Berlin] The REST API for appNG For more information, please visit [http://appng.org](http://appng.org) *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* ## Requirements Building the API client library requires: 1. Java 1.8+ 2. Maven/Gradle ## Installation To install the API client library to your local Maven repository, simply execute: ```shell mvn clean install ``` To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: ```shell mvn clean deploy ``` Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. ### Maven users Add this dependency to your project's POM: ```xml org.openapitools openapi-java-client 1.0.0 compile ``` ### Gradle users Add this dependency to your project's build file: ```groovy compile "org.openapitools:openapi-java-client:1.0.0" ``` ### Others At first generate the JAR by executing: ```shell mvn clean package ``` Then manually install the following JARs: - `target/openapi-java-client-1.0.0.jar` - `target/lib/*.jar` ## Getting Started Please follow the [installation](#installation) instruction and execute the following Java code: ```java import org.appng.openapi.invoke.*; import org.appng.openapi.invoke.auth.*; import org.appng.openapi.model.*; import org.appng.openapi.AppNgApi; public class AppNgApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); // Configure API key authorization: appNGCookie ApiKeyAuth appNGCookie = (ApiKeyAuth) defaultClient.getAuthentication("appNGCookie"); appNGCookie.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //appNGCookie.setApiKeyPrefix("Token"); AppNgApi apiInstance = new AppNgApi(defaultClient); String site = "site_example"; // String | the site to call String application = "application_example"; // String | the application to call String eventId = "eventId_example"; // String | event-id of the action String id = "id_example"; // String | The ID of the action. String params = ";name=appng;host=localhost;sortSites=name%3Aasc%3Bhost%3Adesc%3Bpage%3A0%3BpageSize%3A10"; // String | Parameters (including sorting and filtering parameters) are passed as matrix style parameters. Note that names and values of these matrix parameters must be URL-Encoded try { Action result = apiInstance.getAction(site, application, eventId, id, params); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppNgApi#getAction"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ## Documentation for API Endpoints All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AppNgApi* | [**getAction**](docs/AppNgApi.md#getAction) | **GET** /service/{site}/{application}/rest/openapi/action/{event-id}/{id}/{params} | *AppNgApi* | [**getDatasource**](docs/AppNgApi.md#getDatasource) | **GET** /service/{site}/{application}/rest/openapi/datasource/{id}/{params} | *AppNgApi* | [**getNavigation**](docs/AppNgApi.md#getNavigation) | **GET** /service/{site}/{application}/rest/openapi/navigation | *AppNgApi* | [**getPageWithUrlParams**](docs/AppNgApi.md#getPageWithUrlParams) | **GET** /service/{site}/{application}/rest/openapi/page/{id}/{pageUrlParams} | *AppNgApi* | [**performActionMultiPart**](docs/AppNgApi.md#performActionMultiPart) | **POST** /service/{site}/{application}/rest/openapi/action/multipart/{event-id}/{id}/{params} | ## Documentation for Models - [Action](docs/Action.md) - [ActionField](docs/ActionField.md) - [ActionLink](docs/ActionLink.md) - [ActionLinkAllOf](docs/ActionLinkAllOf.md) - [Datasource](docs/Datasource.md) - [ErrorModel](docs/ErrorModel.md) - [Field](docs/Field.md) - [FieldType](docs/FieldType.md) - [FieldValue](docs/FieldValue.md) - [Filter](docs/Filter.md) - [Icon](docs/Icon.md) - [Item](docs/Item.md) - [Label](docs/Label.md) - [Link](docs/Link.md) - [Message](docs/Message.md) - [Navigation](docs/Navigation.md) - [NavigationItem](docs/NavigationItem.md) - [Option](docs/Option.md) - [OptionType](docs/OptionType.md) - [Options](docs/Options.md) - [Page](docs/Page.md) - [PageDefinition](docs/PageDefinition.md) - [PageSize](docs/PageSize.md) - [Parameter](docs/Parameter.md) - [Permission](docs/Permission.md) - [Section](docs/Section.md) - [SectionElement](docs/SectionElement.md) - [Sort](docs/Sort.md) - [User](docs/User.md) - [ValidationRule](docs/ValidationRule.md) ## Documentation for Authorization Authentication schemes defined for the API: ### appNGCookie - **Type**: API key - **API key parameter name**: JSESSIONID - **Location**: ## Recommendation It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. ## Author matthias.mueller@appng.org