Note: You are looking at a static snapshot of documentation related to Robot Framework automations. The most recent documentation is at https://robocorp.com/docs

Working with HTTP and APIs

API-based automation approach

Even though when discussing RPA in general, the emphasis is often on the fact that RPA enables automation even where APIs are not available, when they actually are, it's a good idea to use them.

An API will change less often than a user interface and will generally be built with the developer in mind. If best practices are followed, it will have versioning, breaking changes will be announced and managed, and it will constitute a solid base for your automation projects. And then, if the API does not cover 100% of what you need to accomplish with a specific service or application, you can still go ahead and combine your API-based approach with one or more additional approaches, like browser automation, image-based locators, etc.

Which automation library should you use?

To interact with APIs and HTTP servers, you can use the RPA.HTTP library, part of RPA Framework. It builds upon the requests Python library, and the corresponding robotframework-requests Robot Framework library.

Getting started with RPA.HTTP

Added convenience methods

The RPA.HTTP library adds some convenience methods for very simple operations. These methods do not require to set up a session, for example.

Robot example

Check out the HTTP API Robot for an example of interacting with a full API using the RPA.HTTP library.