11# fastreport-cloud-sdk
22
33FastReport Cloud
4-
54- API version: v1
65
76No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator )
87
98
109* Automatically generated by the [ OpenAPI Generator] ( https://openapi-generator.tech ) *
1110
11+
1212## Requirements
1313
1414Building the API client library requires:
15-
16151 . Java 1.8+
17- 2 . Maven/Gradle
16+ 2 . Maven (3.8.3+) /Gradle (7.2+)
1817
1918## Installation
2019
2120To install the API client library to your local Maven repository, simply execute:
2221
2322``` shell
24- git clone https://github.com/FastReports/FastReport-Cloud-Java.git
25- cd FastReport-Cloud-Java
2623mvn clean install
2724```
2825
26+ To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
27+
28+ ``` shell
29+ mvn clean deploy
30+ ```
31+
32+ Refer to the [ OSSRH Guide] ( http://central.sonatype.org/pages/ossrh-guide.html ) for more information.
33+
2934### Maven users
3035
3136Add this dependency to your project's POM:
@@ -34,7 +39,7 @@ Add this dependency to your project's POM:
3439<dependency >
3540 <groupId >cloud.fastreport.sdk</groupId >
3641 <artifactId >fastreport-cloud-sdk</artifactId >
37- <version >2024.1.21 </version >
42+ <version >2024.1.22 </version >
3843 <scope >compile</scope >
3944</dependency >
4045```
@@ -44,7 +49,14 @@ Add this dependency to your project's POM:
4449Add this dependency to your project's build file:
4550
4651``` groovy
47- compile "cloud.fastreport.sdk:fastreport-cloud-sdk:2024.1.21"
52+ repositories {
53+ mavenCentral() // Needed if the 'fastreport-cloud-sdk' jar has been published to maven central.
54+ mavenLocal() // Needed if the 'fastreport-cloud-sdk' jar has been published to the local maven repo.
55+ }
56+
57+ dependencies {
58+ implementation "cloud.fastreport.sdk:fastreport-cloud-sdk:2024.1.22"
59+ }
4860```
4961
5062### Others
@@ -57,43 +69,52 @@ mvn clean package
5769
5870Then manually install the following JARs:
5971
60- - ` target/fastreport-cloud-sdk-2024.1.21 .jar `
61- - ` target/lib/*.jar `
72+ * ` target/fastreport-cloud-sdk-2024.1.22 .jar `
73+ * ` target/lib/*.jar `
6274
6375## Getting Started
6476
6577Please follow the [ installation] ( #installation ) instruction and execute the following Java code:
6678
6779``` java
68- import cloud.fastreport.* ;
80+
81+ // Import classes:
82+ import cloud.fastreport.ApiClient ;
83+ import cloud.fastreport.ApiException ;
84+ import cloud.fastreport.Configuration ;
6985import cloud.fastreport.auth.* ;
70- import cloud.fastreport.model.* ;
71- import cloud.fastreport.client.UserProfileApi ;
72-
73- public class AppExample {
74-
75- public static void main (String [] args ) {
76-
77- ApiClient defaultClient = new ApiClient (
78- " https://fastreport.cloud" ,
79- null ,
80- new BasicAuthentication (" apikey" , " ***PUT YOUR API KEY HERE***" ),
81- null
82- );
83-
84- UserProfileApi apiInstance = new UserProfileApi (defaultClient);
85- try {
86- UserProfileVM result = apiInstance. userProfileGetMyProfile();
87- System . out. println(result);
88- } catch (ApiException e) {
89- System . err. println(" Exception when calling UserProfileApi#userProfileGetMyProfile" );
90- System . err. println(" Status code: " + e. getCode());
91- System . err. println(" Reason: " + e. getResponseBody());
92- System . err. println(" Response headers: " + e. getResponseHeaders());
93- e. printStackTrace();
94- }
86+ import cloud.fastreport.models.* ;
87+ import cloud.fastreport.client.ApiKeysApi ;
88+
89+ public class Example {
90+ public static void main (String [] args ) {
91+ ApiClient defaultClient = Configuration . getDefaultApiClient();
92+ defaultClient. setBasePath(" http://localhost" );
93+
94+ // Configure HTTP basic authorization: ApiKey
95+ HttpBasicAuth ApiKey = (HttpBasicAuth ) defaultClient. getAuthentication(" ApiKey" );
96+ ApiKey . setUsername(" YOUR USERNAME" );
97+ ApiKey . setPassword(" YOUR PASSWORD" );
98+
99+ // Configure HTTP bearer authorization: JWT
100+ HttpBearerAuth JWT = (HttpBearerAuth ) defaultClient. getAuthentication(" JWT" );
101+ JWT . setBearerToken(" BEARER TOKEN" );
102+
103+ ApiKeysApi apiInstance = new ApiKeysApi (defaultClient);
104+ CreateApiKeyVM createApiKeyVM = new CreateApiKeyVM (); // CreateApiKeyVM |
105+ try {
106+ ApiKeyVM result = apiInstance. apiKeysCreateApiKey(createApiKeyVM);
107+ System . out. println(result);
108+ } catch (ApiException e) {
109+ System . err. println(" Exception when calling ApiKeysApi#apiKeysCreateApiKey" );
110+ System . err. println(" Status code: " + e. getCode());
111+ System . err. println(" Reason: " + e. getResponseBody());
112+ System . err. println(" Response headers: " + e. getResponseHeaders());
113+ e. printStackTrace();
95114 }
115+ }
96116}
117+
97118```
98119
99120## Documentation for API Endpoints
@@ -569,17 +590,19 @@ Class | Method | HTTP request | Description
569590 - [ WebhookTaskVM] ( docs/WebhookTaskVM.md )
570591
571592
593+ <a id =" documentation-for-authorization " ></a >
572594## Documentation for Authorization
573595
596+
574597Authentication schemes defined for the API:
598+ <a id =" JWT " ></a >
575599### JWT
576600
601+ - ** Type** : HTTP Bearer Token authentication (JWT)
577602
578- - ** Type** : HTTP basic authentication
579-
603+ <a id =" ApiKey " ></a >
580604### ApiKey
581605
582-
583606- ** Type** : HTTP basic authentication
584607
585608
@@ -589,4 +612,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
589612
590613## Author
591614
592- https://www.fast-report.com/en/
615+
616+
0 commit comments