RESTful API
About the REST Api

RESTful API

RESTful (Representational State Transfer) endpoints are a key architectural style for designing networked applications. They are based on a set of principles that establish a uniform interface between clients and servers. RESTful's endpoints provide a standardized way for clients to interact with resources on a server over the HTTP protocol, making them widely adopted for building scalable and interoperable web services.

You can use Arke APIs to interact with your backend application to create and manage your entities, automate processes, integrate other services, and extend Arke application. In this section you'll find all autogenerated APIs available on Arke, with their definition and methods.

Swagger UI
When you run an Arke backend application you can find a SwaggerUI instance on http://localhost:4000/api/lib/doc/swaggerui (opens in a new tab)

This article describes how to quickly get started with the Arke REST API using curl, our @arkejs/client, or JavaScript.

Before starting

Discover the follows steps to authenticate and validate your request using the ArkeProjectKey and the Authorization headers.

Define your Project

To properly execute an API call on Arke you have always defined the arke-project-key in your Request Headers. This identifies your active project in the multi-tenant environment.

RestfulProjectFlow

curl --location 'https://arkehub.com/api/lib/arke/unit' \
-H 'arke-project-key: {{my-project}}'

Authenticate your request

According to Arke defined permission you have to authenticate the request. So, if arke is defined as public you have not to do it, instead you have to append the access_token (obtained by signin) on the Authorization header.

RestfulAuthFlow

curl --location 'https://arkehub.com/api/lib/arke/unit' \
-H 'Authorization: Bearer {{access_token}}'

Common unit manage API flow

On below, you can find the generic flow to manage a unit CRUD. In the next chapter you'll find all available endpoints to manage your entities in your application.

RestfulCrudFlow