Atlato Developer
DocsUse CasesCommunitySupport
DocsUse CasesCommunitySupport
Facebook
Linkedin
Instagram
  1. API Request
  • Overview
    • Developer Platform
  • Getting Started
    • Register Account
    • Manage Apps
    • Manage a Company
    • App Access
    • Store App Access
    • Mode
  • App Store
    • Authentication
    • Access Rights
    • Event Log
    • Company Settings
    • Manage Account
  • Device Integration
    • Design
    • Installation
    • Device List
  • Device API
    • Protocols
    • New Integration
    • Data Output
    • Device Input Names
  • Deployment
    • Custom Client App
  • API Request
    • REST API
    • Request Structure
    • Metadata
    • Pagination
    • Errors
    • Troubleshooting
  • Support
    • Developer Request Types
  • Guides
    • Best practices
    • Timezones
    • Libraries
    • Key Concepts
    • Terms of Use
    • Rate limits
  • Feedback Center
    • Feedback
    • Community
    • FAQ
  • Api Integration
    • Use token in your app
    • Event Logging API
    • Meta Data API
    • Lastest Device Data API
    • Past Device Data API
    • Devices API
    • Country City Currency API
  • App Integration APIs
    • Meta Data
    • Meta Data API
    • Lastest Device Data API
    • Past Device Data API
    • Event Logging API
    • Devices API
    • Country City Currency API
  • Developer Platform
    • Access
    • User
    • Device
    • Manage Account
    • Company
  1. API Request

REST API

Introduction to REST API#

What is an API?#

API stands for Application Programming Interface. It is a set of rules that allow different software entities to communicate with each other. APIs define the methods and data formats that applications can use to communicate and interact with an external service or library.

What is REST?#

REST stands for Representational State Transfer. It is an architectural style for designing networked applications. RESTful systems use HTTP requests to perform CRUD (Create, Read, Update, Delete) operations on resources. A resource can be any object, data, or service that can be accessed via a unique URI (Uniform Resource Identifier).

Core Principles of REST#

Statelessness
Each HTTP request from a client to server must contain all the information the server needs to fulfill that request. The server should not store any context about the client between requests. This is known as statelessness.
Client-Server Architecture
The client and server are separate entities that interact with each other. This separation allows the client and server to evolve independently.
Uniform Interface
REST APIs have a uniform interface that simplifies and decouples the architecture. This interface should be standardized and followed consistently.
Layered System
A REST API may be composed of several layers, each with its own function, such as security, load balancing, and caching. Each layer communicates only with the layer directly adjacent to it.
Cacheability
Responses from the server should be labeled as cacheable or non-cacheable, allowing clients to cache responses to improve performance.

Key Components of REST#

Resources#

A resource is an object or representation of something that can be accessed via a REST API. Resources are identified by URIs. For example, in an online bookstore, a resource could be a book, an author, or an order.

HTTP Methods#

REST APIs use standard HTTP methods to perform operations on resources:
GET: Retrieve a resource.
POST: Create a new resource.
PUT: Update an existing resource.
DELETE: Remove a resource.

HTTP Status Codes#

HTTP status codes are used to indicate the outcome of an HTTP request. Some common status codes include:
200 OK: The request was successful.
201 Created: A new resource was created successfully.
400 Bad Request: The request was invalid.
401 Unauthorized: Authentication is required.
INFO
Please refer the Errors documentation for further information

REST API Design Best Practices#

Usege Of Nouns for Resources
Appropriate Usege Of HTTP Methods
Use Proper Status Codes
Support Filtering, Sorting, and Pagination
Versioning
INFO
Please refer the Best practices documentation for further information
REST APIs are a fundamental aspect of modern web development, providing a standardized way for different systems to interact over the web. By adhering to REST principles and best practices, developers can create scalable, maintainable, and efficient APIs that facilitate seamless communication between clients and servers.

How to use REST API#

1
Choose an endpoint for your request
Choose an endpoint to make a request to. You can explore Atlato's API documentation to discover endpoints that you can use to interact with Atlato's API.
Identify the HTTP method and path of the endpoint. You will send these with your request.
Identify and provide the necessary parameters.
2
Create an access token
Create an access token to authenticate your request. You can save your token and use it for multiple requests. Give the token any scopes or permissions that are required to access the endpoint. You will send this token in an Authorization header with your request. For more information, see Authentication
3
Access the response
Every request will return an HTTP status code that indicates the success of the response. For more information about response codes, see Errors
You can use a try/catch block to catch an error if it occurs.
Modified at 2024-07-19 08:35:28
Previous
API Request
Next
Request Structure
Built with