IPT201_UNIT2
IPT201_UNIT2
AND
INTEGRATION
1. DEVELOPMENT
This refers to the process of creating, designing, coding, testing, and
maintaining software applications, systems, or solutions. It includes
various stages like:
Each API request from the client to the server must contain
all the information needed to understand and process the
request. The server should not store any state about the
client between requests.
Use plural forms for resource names: GET /users (all users),
GET /users/123 (a specific user).
example;
{
"id": 123,
"name": "John Doe",
"email": "john.doe@example.com"
}
Request: POST /users (to create a new user)
Request Body:
{
"name": "Jane Smith",
"email": "jane.smith@example.com"
}
GET /users/1
GET /users/1/posts
GraphQL:
Flexible Data Queries: GraphQL allows clients to request
exactly the data they need. You define a query and specify the
structure of the response (including nested resources) in a
single request. For example:
query {
user(id: 1) {
name
email
posts {
title
content
}
}
}
This query would return the user’s name, email, and posts
in a single response, avoiding over-fetching or under-
fetching.
How: Ensure your API server supports SSL/TLS and that you
have valid certificates installed. This prevents eavesdropping
and man-in-the-middle (MITM) attacks, especially when
sending sensitive data like passwords or API tokens.
Rate Limiting and Throttling