Skip to main content

Accessing and running app services

tip

We recommend using Altogic's client API to access and run your app services through your app endpoints. Yet, you can also use any http client library (e.g., axios, fetch) to make RESTful API requests to your app endpoints.

After deploying your application to an environment, you can access and run your app services by calling the exposed RESTful API endpoints.

To call your endpoints, you basically need three things;

1- The endpoint URL and method. The URL of your endpoint is the concatenation of the root endpoint and its path. You can get the root endpoint information from the environment details view. The API Base URL is the root endpoint of your endpoint. You can get the method and path information of the endpoint from the endpoints view. For example, if you have a root endpoint https://dev001.na-dev-engine.altogic.com/e:611e80ad3e5034001b6603b0 and a POST endpoint with the path /suppliers to create a new supplier in the database, then your endpoint URL becomes https://dev001.na-dev-engine.altogic.com/e:611e80ad3e5034001b6603b0/suppliers. If you send a POST request with the right credentials and input parameters, Algotic executes your endpoint service and creates a supplier object in the database.

Environment details view - API Base URL (root endpoint)Endpoints view - Endpoint methods and paths

You can also get all the required information (URL, path parameters, query string parameters, required headers, authentication requirements and request body structure etc.) about how to call your endpoints from the API documentation. To access the API documentation of your endpoints, navigate to the environments view, select the environment you would like to view, and from the environment view, select the "Endpoints" tab.

Endpoint documentation
info

You cal also access your endpoint URLs and required input parameters structure through the Tester.

2- A valid API key of the environment and a session token, if required

3- Input parameters of your endpoint service (e.g., request body, headers, query parameters)

Building on the example of creating a new supplier in the database, you can call your "Add New Supplier" endpoint as follows:

curl --location --request POST 'https://dev001.na-dev-engine.altogic.com/e:611e80ad3e5034001b6603b0/suppliers' \
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbnZJZCI6IjYwYTYzOWQ4NDgzZDM0MDA1MjRkZTQ3YSIsImtleUlkIjoiNjBhNjNhMmM0ODNkMzQwMDUyNGRlNDdkIiwiaWF0IjoxNjIxNTA2NjA0LCJleHAiOjI0ODU1MDY2MDR9.-w9jGyEkdLsdCO8MDm7EZv9r8uLs71FUUeDnb5t08OE' \
--header 'Session: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbnZJZCI6IjYwYTYzOWQ4NDgzZDM0MDA1MjRkZTQ3YSIsImtleUlkIjoiNjBiYjIwOTM4Yzc2ODkwMDk1NjUzZjQzIiwiaWF0IjoxNjIyODc2MzA3LCJleHAiOjI0ODY4NzYzMDd9.Y-Q5swY7_nS1DaV_m-OyWUhfADZpYPwoHSUfF1fLcXc' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Precision Metal Works Inc.",
"address": {
"street": "123 Clark St.",
"state": "IL",
"zipcode": 90910
}
}'