Kameleo Local API Client

  • Created

Kameleo Local API is an HTTP REST interface provided by the CLI component. By default, it is only available on the localhost interface. The documentation of the endpoints can be found on SwaggerHub or http://localhost:5050/swagger URL once the CLI component has been started. You can command Kameleo to interact with virtual browser profiles by calling these endpoints. Let's see an example scenario:

  1. Creating a virtual browser profile:
    Endpoint to use: POST /profiles/new

  2. Launching the browser for the virtual browser profile:
    Endpoint to use: GET /profiles/{guid}/start

  3. Stopping the browser:
    Endpoint to use: GET /profiles/{guid}/stop

  4. Saving the virtual browser profile to a file:
    Endpoint to use: POST /profiles/{guid}/save

You can use any programming language to call these HTTP endpoints, but we created three libraries in 3 different languages for your convenience. You will find a client in your preferred library that will wrap these endpoints, and the usage is straightforward. We provide plenty of examples to make the learning process easier.

Javascript library

The Javascript library is available on the NPM registry. You can use this package with any Javascript, Node.js, Typescript project. We provide several code samples in the Examples repository's nodejs folder. The source code is available on GitHub; please open an issue there if you have any problems.

.NET library

The C# library is available on NuGet. You can use this package with any .NET, C# project. We provide several code samples in the Examples repository's dotnet-csharp folder. The source code is available on GitHub; please open an issue there if you have any problems.

Python library

The Python library is available on PyPI. You can use this package with any Python script. We provide several code samples in the Examples repository's python folder. The source code is available on GitHub; please open an issue there if you have any problems.

Compatibility questions

We adhere to semantic versioning for the CLI component and local-api-client libraries and do not make incompatible or breaking changes except when absolutely necessary. When we must update the Local API, we make sure to provide a backward-compatible update. This means that a new version of CLI does not require a corresponding update to the local-api-client library. However, we recommend always using the latest version of Kameleo and the latest version of the local-api-client library.

Please refer to the following table for compatibility between the components.

Release date CLI version Recommended library version
2021-09-14 v2.4.1 v2.3.2
2021-12-14 v2.5.0 v2.3.2
2022-01-28 v2.6.0 v2.6.0
2022-06-01 v2.7.3 v2.6.0
2022-07-25 v2.8.0 v2.6.0
2022-08-19 v2.9.0 v2.9.0

Was this article helpful?

0 out of 0 found this helpful