You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Kepware.Api/README.md
+30-9Lines changed: 30 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,17 @@ This package is designed to work with all versions of Kepware that support the C
19
19
|**Connectivity** <br /> *(Channel, Devices, Tags, Tag Groups)*| Y | Y |
20
20
|**Administration** <br /> *(User Groups, Users, UA Endpoints, Local License Server)*| Y[^1]| Y |
21
21
|**Product Info and Health Status**| Y[^4]| Y |
22
-
|**Export Project**| Y[^2]| Y |
22
+
|**Export Project**| Y | Y |
23
23
|**Import Project (via JsonProjectLoad Service)**| N[^2]| N |
24
24
|**Import Project (via CompareAndApply)[^3]**| Y | Y |
25
25
26
26
[^1]: UA Endpoints and Local License Server supported for Kepware Edge only
27
-
[^2]: JsonProjectLoad was added to Kepware Server v6.17 and later builds, the SDK detects the server version and uses the appropriate service or loads the project by multiple requests if using KepwareApiClient.LoadProject.
28
-
[^3]: CompareAndApply is handled by the SDK, it compares the source project with the server project and applies the changes. The JsonProjectLoad service is a direct call to the server to load a project.
27
+
[^2]: JsonProjectLoad was added to Kepware Server v6.17 and later builds.
28
+
[^3]: [CompareAndApply](/Kepware.Api/ClientHandler/ProjectApiHandler.cs) is handled by the SDK. It compares the source project with another server project and applies the changes.
29
29
[^4]: Added to Kepware Server v6.13 and later builds
30
30
31
+
**NOTE:** Exporting a project from a Kepware server is done using the KepwareApiClient.LoadProjectAsync method. This detects the server version and uses the appropriate method to either export/load the whole project or loads the project by multiple requests. This ensures that large projects can be exported/loaded from the Kepware instance as optimally as possible based on the current API design. See [LoadProjectAsync](/Kepware.Api/ClientHandler/ProjectApiHandler.cs) for more details.
32
+
31
33
3. Configuration API *Services* implemented:
32
34
33
35
| Services | KS | KE |
@@ -37,9 +39,8 @@ This package is designed to work with all versions of Kepware that support the C
37
39
|**ProjectLoad and ProjectSave**| N | N |
38
40
|**JsonProjectLoad\*\*** <br /> *(used for import project feature)*| Y | Y |
39
41
40
-
4. Synchronize configurations between your application and Kepware server.
41
-
5. Supports advanced operations like project comparison, entity synchronization, and driver property queries.
42
-
6. Built-in support for Dependency Injection to simplify integration.
42
+
4. Supports advanced operations like project comparison, entity synchronization, and driver property queries.
43
+
5. Built-in support for Dependency Injection to simplify integration.
43
44
44
45
## Installation
45
46
@@ -51,16 +52,36 @@ Kepware.Api NuGet package is available from NuGet repository.
51
52
```
52
53
53
54
2. Register the `KepwareApiClient` in your application using Dependency Injection:
55
+
54
56
```csharp
55
57
services.AddKepwareApiClient(
56
58
name: "default",
57
59
baseUrl: "https://localhost:57512",
58
60
apiUserName: "Administrator",
59
61
apiPassword: "StrongAdminPassword2025!",
60
-
disableCertificateValidation: true
62
+
disableCertificateValidation: false
61
63
);
62
64
```
63
65
66
+
or
67
+
68
+
```csharp
69
+
varclientOptions=newKepwareClientOptions
70
+
{
71
+
HostUri=newUri("https://localhost:57512"),
72
+
Username="Administrator",
73
+
Password="StrongAdminPassword2025!",
74
+
Timeout=TimeSpan.FromSeconds(60),
75
+
DisableCertifcateValidation=false,
76
+
ProjectLoadTagLimit=100000
77
+
};
78
+
79
+
services.AddKepwareApiClient(
80
+
name: "default",
81
+
options: clientOptions
82
+
);
83
+
```
84
+
64
85
## Key Methods
65
86
66
87
### Connection and Status
@@ -77,9 +98,9 @@ Kepware.Api NuGet package is available from NuGet repository.
77
98
Retrieves product information about the Kepware server.
0 commit comments