Skip to content

Commit 2c28872

Browse files
committed
doc: updated readme
1 parent 4579a07 commit 2c28872

1 file changed

Lines changed: 30 additions & 9 deletions

File tree

Kepware.Api/README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ This package is designed to work with all versions of Kepware that support the C
1919
| **Connectivity** <br /> *(Channel, Devices, Tags, Tag Groups)* | Y | Y |
2020
| **Administration** <br /> *(User Groups, Users, UA Endpoints, Local License Server)* | Y[^1] | Y |
2121
| **Product Info and Health Status** | Y[^4] | Y |
22-
| **Export Project** | Y[^2] | Y |
22+
| **Export Project** | Y | Y |
2323
| **Import Project (via JsonProjectLoad Service)** | N[^2] | N |
2424
| **Import Project (via CompareAndApply)[^3]** | Y | Y |
2525

2626
[^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.
2929
[^4]: Added to Kepware Server v6.13 and later builds
3030

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+
3133
3. Configuration API *Services* implemented:
3234

3335
| Services | KS | KE |
@@ -37,9 +39,8 @@ This package is designed to work with all versions of Kepware that support the C
3739
| **ProjectLoad and ProjectSave** | N | N |
3840
| **JsonProjectLoad\*\*** <br /> *(used for import project feature)* | Y | Y |
3941

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.
4344

4445
## Installation
4546

@@ -51,16 +52,36 @@ Kepware.Api NuGet package is available from NuGet repository.
5152
```
5253

5354
2. Register the `KepwareApiClient` in your application using Dependency Injection:
55+
5456
```csharp
5557
services.AddKepwareApiClient(
5658
name: "default",
5759
baseUrl: "https://localhost:57512",
5860
apiUserName: "Administrator",
5961
apiPassword: "StrongAdminPassword2025!",
60-
disableCertificateValidation: true
62+
disableCertificateValidation: false
6163
);
6264
```
6365

66+
or
67+
68+
```csharp
69+
var clientOptions = new KepwareClientOptions
70+
{
71+
HostUri = new Uri("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+
6485
## Key Methods
6586

6687
### Connection and Status
@@ -77,9 +98,9 @@ Kepware.Api NuGet package is available from NuGet repository.
7798
Retrieves product information about the Kepware server.
7899

79100
### Project Management
80-
- **Load Project:**
101+
- **Export / Load Project:**
81102
```csharp
82-
var project = await api.LoadProject(blnLoadFullProject:true);
103+
var project = await api.LoadProjectAsync(blnLoadFullProject:true);
83104
```
84105
Loads the current project from the Kepware server.
85106

0 commit comments

Comments
 (0)