All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
apiKeysCreateApiKey | POST /api/manage/v1/ApiKeys | Create a new apikey, 5 apikeys for user. Hardcoded for ddos. |
apiKeysDeleteApiKey | DELETE /api/manage/v1/ApiKeys | Delete an apikey |
apiKeysGetApiKeys | GET /api/manage/v1/ApiKeys | Returns list with all apikeys of current user |
ApiKeyVM apiKeysCreateApiKey(createApiKeyVM)
Create a new apikey, 5 apikeys for user. Hardcoded for ddos.
// Import classes:
import cloud.fastreport.ApiClient;
import cloud.fastreport.ApiException;
import cloud.fastreport.Configuration;
import cloud.fastreport.auth.*;
import cloud.fastreport.models.*;
import cloud.fastreport.client.ApiKeysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP basic authorization: ApiKey
HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setUsername("YOUR USERNAME");
ApiKey.setPassword("YOUR PASSWORD");
// Configure HTTP bearer authorization: JWT
HttpBearerAuth JWT = (HttpBearerAuth) defaultClient.getAuthentication("JWT");
JWT.setBearerToken("BEARER TOKEN");
ApiKeysApi apiInstance = new ApiKeysApi(defaultClient);
CreateApiKeyVM createApiKeyVM = new CreateApiKeyVM(); // CreateApiKeyVM |
try {
ApiKeyVM result = apiInstance.apiKeysCreateApiKey(createApiKeyVM);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApiKeysApi#apiKeysCreateApiKey");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createApiKeyVM | CreateApiKeyVM |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Succesfully created | - |
400 | wrong model provided or exception thrown (user's attempts to create sixth key for example throwns an exception) | - |
401 | User is not authorized | - |
ApiKeyVM apiKeysDeleteApiKey(deleteApiKeyVM)
Delete an apikey
// Import classes:
import cloud.fastreport.ApiClient;
import cloud.fastreport.ApiException;
import cloud.fastreport.Configuration;
import cloud.fastreport.auth.*;
import cloud.fastreport.models.*;
import cloud.fastreport.client.ApiKeysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP basic authorization: ApiKey
HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setUsername("YOUR USERNAME");
ApiKey.setPassword("YOUR PASSWORD");
// Configure HTTP bearer authorization: JWT
HttpBearerAuth JWT = (HttpBearerAuth) defaultClient.getAuthentication("JWT");
JWT.setBearerToken("BEARER TOKEN");
ApiKeysApi apiInstance = new ApiKeysApi(defaultClient);
DeleteApiKeyVM deleteApiKeyVM = new DeleteApiKeyVM(); // DeleteApiKeyVM |
try {
ApiKeyVM result = apiInstance.apiKeysDeleteApiKey(deleteApiKeyVM);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApiKeysApi#apiKeysDeleteApiKey");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
deleteApiKeyVM | DeleteApiKeyVM |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | The request is wrong | - |
401 | User is not authorized | - |
404 | No such apikey found | - |
500 | exception thrown | - |
204 | Succesfully deleted | - |
ApiKeysVM apiKeysGetApiKeys()
Returns list with all apikeys of current user
Always work, it should make only 200 response (except if user is not authorized).
// Import classes:
import cloud.fastreport.ApiClient;
import cloud.fastreport.ApiException;
import cloud.fastreport.Configuration;
import cloud.fastreport.auth.*;
import cloud.fastreport.models.*;
import cloud.fastreport.client.ApiKeysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP basic authorization: ApiKey
HttpBasicAuth ApiKey = (HttpBasicAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setUsername("YOUR USERNAME");
ApiKey.setPassword("YOUR PASSWORD");
// Configure HTTP bearer authorization: JWT
HttpBearerAuth JWT = (HttpBearerAuth) defaultClient.getAuthentication("JWT");
JWT.setBearerToken("BEARER TOKEN");
ApiKeysApi apiInstance = new ApiKeysApi(defaultClient);
try {
ApiKeysVM result = apiInstance.apiKeysGetApiKeys();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ApiKeysApi#apiKeysGetApiKeys");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Succesfully retured | - |
401 | User is not authorized | - |
500 | Exception somehow thrown (barely possible) | - |