All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
createResource | POST /resources | |
deleteResource | DELETE /resources/{id_or_uri} | |
getResource | GET /resources/{id_or_uri} | |
listAggregatedResources | GET /aggregated_resources | |
listResources | GET /resources | |
updateResource | PATCH /resources/{id_or_uri} |
ResourceResponse createResource(resource)
Creates a new resource
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.ResourcesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
ResourcesApi apiInstance = new ResourcesApi();
ResourceRequest resource = new ResourceRequest(); // ResourceRequest | Resource to add
try {
ResourceResponse result = apiInstance.createResource(resource);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ResourcesApi#createResource");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
resource | ResourceRequest | Resource to add |
- Content-Type: application/json
- Accept: application/json
deleteResource(idOrUri)
Deletes single resource
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.ResourcesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
ResourcesApi apiInstance = new ResourcesApi();
String idOrUri = "idOrUri_example"; // String | ID or URI of resource to fetch
try {
apiInstance.deleteResource(idOrUri);
} catch (ApiException e) {
System.err.println("Exception when calling ResourcesApi#deleteResource");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
idOrUri | String | ID or URI of resource to fetch |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
ResourceResponse getResource(idOrUri)
Returns a single resource
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.ResourcesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
ResourcesApi apiInstance = new ResourcesApi();
String idOrUri = "idOrUri_example"; // String | ID or URI of resource to fetch
try {
ResourceResponse result = apiInstance.getResource(idOrUri);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ResourcesApi#getResource");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
idOrUri | String | ID or URI of resource to fetch |
- Content-Type: application/json
- Accept: application/json
List<AggregatedResourceEachResponse> listAggregatedResources(uriPrefix)
Returns aggregated resources to be monitored
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.ResourcesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
ResourcesApi apiInstance = new ResourcesApi();
String uriPrefix = "uriPrefix_example"; // String | Prefix of Resource URI
try {
List<AggregatedResourceEachResponse> result = apiInstance.listAggregatedResources(uriPrefix);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ResourcesApi#listAggregatedResources");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
uriPrefix | String | Prefix of Resource URI |
List<AggregatedResourceEachResponse>
- Content-Type: application/json
- Accept: application/json
List<ResourceEachResponse> listResources(uriPrefix)
Returns all resources
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.ResourcesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
ResourcesApi apiInstance = new ResourcesApi();
String uriPrefix = "uriPrefix_example"; // String | Prefix of Resource URI
try {
List<ResourceEachResponse> result = apiInstance.listResources(uriPrefix);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ResourcesApi#listResources");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
uriPrefix | String | Prefix of Resource URI | [optional] |
- Content-Type: application/json
- Accept: application/json
ResourceResponse updateResource(idOrUri, resource)
Updates a single resource
// Import classes:
//import io.github.triglav_dataflow.client.ApiClient;
//import io.github.triglav_dataflow.client.ApiException;
//import io.github.triglav_dataflow.client.Configuration;
//import io.github.triglav_dataflow.client.auth.*;
//import io.github.triglav_dataflow.client.api.ResourcesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
ResourcesApi apiInstance = new ResourcesApi();
String idOrUri = "idOrUri_example"; // String | ID or URI of resource to fetch
ResourceRequest resource = new ResourceRequest(); // ResourceRequest | Resource parameters to update
try {
ResourceResponse result = apiInstance.updateResource(idOrUri, resource);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ResourcesApi#updateResource");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
idOrUri | String | ID or URI of resource to fetch | |
resource | ResourceRequest | Resource parameters to update |
- Content-Type: application/json
- Accept: application/json