1
1
# fastreport-cloud-sdk
2
2
3
3
FastReport Cloud
4
-
5
4
- API version: v1
6
5
7
6
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator )
8
7
9
8
10
9
* Automatically generated by the [ OpenAPI Generator] ( https://openapi-generator.tech ) *
11
10
11
+
12
12
## Requirements
13
13
14
14
Building the API client library requires:
15
-
16
15
1 . Java 1.8+
17
- 2 . Maven/Gradle
16
+ 2 . Maven (3.8.3+) /Gradle (7.2+)
18
17
19
18
## Installation
20
19
21
20
To install the API client library to your local Maven repository, simply execute:
22
21
23
22
``` shell
24
- git clone https://github.com/FastReports/FastReport-Cloud-Java.git
25
- cd FastReport-Cloud-Java
26
23
mvn clean install
27
24
```
28
25
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
+
29
34
### Maven users
30
35
31
36
Add this dependency to your project's POM:
@@ -34,7 +39,7 @@ Add this dependency to your project's POM:
34
39
<dependency >
35
40
<groupId >cloud.fastreport.sdk</groupId >
36
41
<artifactId >fastreport-cloud-sdk</artifactId >
37
- <version >2024.1.21 </version >
42
+ <version >2024.1.22 </version >
38
43
<scope >compile</scope >
39
44
</dependency >
40
45
```
@@ -44,7 +49,14 @@ Add this dependency to your project's POM:
44
49
Add this dependency to your project's build file:
45
50
46
51
``` 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
+ }
48
60
```
49
61
50
62
### Others
@@ -57,43 +69,52 @@ mvn clean package
57
69
58
70
Then manually install the following JARs:
59
71
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 `
62
74
63
75
## Getting Started
64
76
65
77
Please follow the [ installation] ( #installation ) instruction and execute the following Java code:
66
78
67
79
``` java
68
- import cloud.fastreport.* ;
80
+
81
+ // Import classes:
82
+ import cloud.fastreport.ApiClient ;
83
+ import cloud.fastreport.ApiException ;
84
+ import cloud.fastreport.Configuration ;
69
85
import 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();
95
114
}
115
+ }
96
116
}
117
+
97
118
```
98
119
99
120
## Documentation for API Endpoints
@@ -569,17 +590,19 @@ Class | Method | HTTP request | Description
569
590
- [ WebhookTaskVM] ( docs/WebhookTaskVM.md )
570
591
571
592
593
+ <a id =" documentation-for-authorization " ></a >
572
594
## Documentation for Authorization
573
595
596
+
574
597
Authentication schemes defined for the API:
598
+ <a id =" JWT " ></a >
575
599
### JWT
576
600
601
+ - ** Type** : HTTP Bearer Token authentication (JWT)
577
602
578
- - ** Type** : HTTP basic authentication
579
-
603
+ <a id =" ApiKey " ></a >
580
604
### ApiKey
581
605
582
-
583
606
- ** Type** : HTTP basic authentication
584
607
585
608
@@ -589,4 +612,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
589
612
590
613
## Author
591
614
592
- https://www.fast-report.com/en/
615
+
616
+
0 commit comments