# Vela SDK

## Calling Platform APIs: HTTP vs. Java SDK

Our platform APIs can be accessed via HTTP or a Java SDK.

### HTTP

Our HTTP APIs follow REST standards, making them accessible to any client capable of sending HTTP requests, regardless of programming language.

This is the preferred method for front-end UI projects due to its broad compatibility and reduced adaptation effort for front-end applications.

### Java SDK

For Java-based client applications within our app framework, the Java SDK offers an alternative.

The Java SDK acts as a Java interface, providing developers with a clearer understanding of API details and integration.

However, changes to the platform API, such as adding optional fields, may require updates to both the SDK and the invoking application.

## Vela SDK (V1)

### Concept

Vela SDK (V1) relies on the insureMO app framework foundation.

This provides benefits like automatic configuration, data caching, and streamlined message transformation. However, it's limited to Java and incompatible with applications lacking app framework support.

### Source

Update your `pom.xml` with the following:

*   **vela-all-dependency**: Manages all GIMO & ICS components.
*   **vela.all.version**: Defines the GIMO & ICS dependency version.

```note
Ensure the `vela-parent` version is synchronized with the `vela.all.version`.
```

![SDK POM](./image/tool/platform_sdk_pom.png)

Find the latest versions in our Maven repository:

Maven Repository Links:

*   vela-parent: [https://repo.insuremo.com/artifactory/list/libs-release-local/com/ebao/vela/vela-parent/](https://repo.insuremo.com/artifactory/list/libs-release-local/com/ebao/vela/vela-parent/)
*   vela-all-dependency: [https://repo.insuremo.com/artifactory/list/libs-release-local/com/ebao/vela/vela-all-dependency/](https://repo.insuremo.com/artifactory/list/libs-release-local/com/ebao/vela/vela-all-dependency/)

Public Maven Repository Links:

*   vela-parent: [https://public.insuremo.com/ui/repos/tree/General/maven-local/com/ebao/vela/vela-parent/](https://public.insuremo.com/ui/repos/tree/General/maven-local/com/ebao/vela/vela-parent/)
*   vela-all-dependency: [https://public.insuremo.com/ui/repos/tree/General/maven-local/com/ebao/vela/vela-all-dependency/](https://public.insuremo.com/ui/repos/tree/General/maven-local/com/ebao/vela/vela-all-dependency/)

Always use the latest hotfix version from the Maven repository. Once a hotfix version is adopted, continue using it until a specific hotfix is required or a new major platform release is introduced.

Upgrades are generally compatible. Contact insureMO support for assistance with any conflicts during the upgrade.

### Platform API Versioning

Our platform undergoes regular upgrades (image upgrades via Docker).

HTTP API calls automatically connect to the latest platform version after each image upgrade.

SDK version upgrades are client-controlled. The project team is responsible for upgrading the SDK version.

### Principle

Regularly update the platform SDK to:

*   Utilize the latest platform API features.
*   Resolve security vulnerabilities.
*   Improve performance.

Upgrade based on the project phase:

*   **New projects:** Use the latest platform SDK dependency.
*   **Production projects:** Align the platform SDK dependency with the production environment version after each platform upgrade.

Keeping the SDK updated is crucial as the platform evolves. Maintaining compatibility for older SDK versions with the latest platform image version is challenging.

The platform team will implement mandatory platform version checks in development environments to encourage regular upgrades. These checks will be enforced after the latest platform version is deployed across all public cloud production environments.

If you receive an error message like this, upgrade immediately:

`...platform.foundation.exception.SystemError: There is min vela version required, please upgrade vela.version in dependency to: 23.05, current is: 23.01.268`
