# AppNgApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getAction**](AppNgApi.md#getAction) | **GET** /service/{site}/{application}/rest/openapi/action/{event-id}/{id}/{params} | 
[**getDatasource**](AppNgApi.md#getDatasource) | **GET** /service/{site}/{application}/rest/openapi/datasource/{id}/{params} | 
[**getNavigation**](AppNgApi.md#getNavigation) | **GET** /service/{site}/{application}/rest/openapi/navigation | 
[**getPageWithUrlParams**](AppNgApi.md#getPageWithUrlParams) | **GET** /service/{site}/{application}/rest/openapi/page/{id}/{pageUrlParams} | 
[**performActionMultiPart**](AppNgApi.md#performActionMultiPart) | **POST** /service/{site}/{application}/rest/openapi/action/multipart/{event-id}/{id}/{params} | 



## getAction

> Action getAction(site, application, eventId, id, params)



Returns an action. To be used for initially retrieving the action.

### Example

```java
// Import classes:
import org.appng.openapi.invoke.ApiClient;
import org.appng.openapi.invoke.ApiException;
import org.appng.openapi.invoke.Configuration;
import org.appng.openapi.invoke.auth.*;
import org.appng.openapi.invoke.models.*;
import org.appng.openapi.AppNgApi;

public class Example {
    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();
        }
    }
}
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **site** | **String**| the site to call |
 **application** | **String**| the application to call |
 **eventId** | **String**| event-id of the action |
 **id** | **String**| The ID of the action. |
 **params** | **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 |

### Return type

[**Action**](Action.md)

### Authorization

[appNGCookie](../README.md#appNGCookie)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | action response |  -  |
| **400** | action response, in case an recoverable error occurred |  -  |
| **0** | unexpected/unrecoverable error |  -  |


## getDatasource

> Datasource getDatasource(site, application, id, params)



Returns a datasource by id

### Example

```java
// Import classes:
import org.appng.openapi.invoke.ApiClient;
import org.appng.openapi.invoke.ApiException;
import org.appng.openapi.invoke.Configuration;
import org.appng.openapi.invoke.auth.*;
import org.appng.openapi.invoke.models.*;
import org.appng.openapi.AppNgApi;

public class Example {
    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 id = "id_example"; // String | The id of the datasource.
        String params = ";name=appng;host=localhost;sortSites=name%3Aasc%3Bhost%3Adesc%3Bpage%3A0%3BpageSize%3A10"; // String | The id of the datasource. 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 {
            Datasource result = apiInstance.getDatasource(site, application, id, params);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppNgApi#getDatasource");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **site** | **String**| the site to call |
 **application** | **String**| the application to call |
 **id** | **String**| The id of the datasource. |
 **params** | **String**| The id of the datasource. 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  |

### Return type

[**Datasource**](Datasource.md)

### Authorization

[appNGCookie](../README.md#appNGCookie)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | datasource response |  -  |
| **0** | unexpected error |  -  |


## getNavigation

> Navigation getNavigation(site, application)



### Example

```java
// Import classes:
import org.appng.openapi.invoke.ApiClient;
import org.appng.openapi.invoke.ApiException;
import org.appng.openapi.invoke.Configuration;
import org.appng.openapi.invoke.auth.*;
import org.appng.openapi.invoke.models.*;
import org.appng.openapi.AppNgApi;

public class Example {
    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
        try {
            Navigation result = apiInstance.getNavigation(site, application);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppNgApi#getNavigation");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **site** | **String**| the site to call |
 **application** | **String**| the application to call |

### Return type

[**Navigation**](Navigation.md)

### Authorization

[appNGCookie](../README.md#appNGCookie)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | datasource response |  -  |


## getPageWithUrlParams

> PageDefinition getPageWithUrlParams(site, application, id, pageUrlParams, sect)



### Example

```java
// Import classes:
import org.appng.openapi.invoke.ApiClient;
import org.appng.openapi.invoke.ApiException;
import org.appng.openapi.invoke.Configuration;
import org.appng.openapi.invoke.auth.*;
import org.appng.openapi.invoke.models.*;
import org.appng.openapi.AppNgApi;

public class Example {
    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 id = "id_example"; // String | the ID of the page
        String pageUrlParams = "pageUrlParams_example"; // String | the URL path to parametrize the page with.
        List<String> sect = Arrays.asList(); // List<String> | a list of section IDs to fill
        try {
            PageDefinition result = apiInstance.getPageWithUrlParams(site, application, id, pageUrlParams, sect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppNgApi#getPageWithUrlParams");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **site** | **String**| the site to call |
 **application** | **String**| the application to call |
 **id** | **String**| the ID of the page |
 **pageUrlParams** | **String**| the URL path to parametrize the page with. |
 **sect** | [**List&lt;String&gt;**](String.md)| a list of section IDs to fill | [optional]

### Return type

[**PageDefinition**](PageDefinition.md)

### Authorization

[appNGCookie](../README.md#appNGCookie)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | datasource response |  -  |


## performActionMultiPart

> Action performActionMultiPart(site, application, eventId, id, params)



Performs an action.

### Example

```java
// Import classes:
import org.appng.openapi.invoke.ApiClient;
import org.appng.openapi.invoke.ApiException;
import org.appng.openapi.invoke.Configuration;
import org.appng.openapi.invoke.auth.*;
import org.appng.openapi.invoke.models.*;
import org.appng.openapi.AppNgApi;

public class Example {
    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.performActionMultiPart(site, application, eventId, id, params);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppNgApi#performActionMultiPart");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **site** | **String**| the site to call |
 **application** | **String**| the application to call |
 **eventId** | **String**| event-id of the action |
 **id** | **String**| The ID of the action. |
 **params** | **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 |

### Return type

[**Action**](Action.md)

### Authorization

[appNGCookie](../README.md#appNGCookie)

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | action response |  -  |
| **400** | action response, in case an recoverable error occurred |  -  |
| **0** | unexpected/unrecoverable error |  -  |

