0% found this document useful (0 votes)
9 views18 pages

Subscription and Warehousing

The document outlines the requirements for Task 1, including submission details, content structure, and plagiarism policies. It covers key concepts related to subscriptions, data warehousing, APIs, and databases, specifically focusing on oneM2M, PostgreSQL, and FastAPI. Additionally, it provides examples of API methods and coding for subscriptions.

Uploaded by

claudis21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views18 pages

Subscription and Warehousing

The document outlines the requirements for Task 1, including submission details, content structure, and plagiarism policies. It covers key concepts related to subscriptions, data warehousing, APIs, and databases, specifically focusing on oneM2M, PostgreSQL, and FastAPI. Additionally, it provides examples of API methods and coding for subscriptions.

Uploaded by

claudis21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

{

Subscriptions and
Data Warehousing
< Lets Play with API’s >

... Likhith Kanigolla


}
Announcements for Task - 1
● Submission date is 3rd November 2024.
● There will be sub tasks added from the concepts covered in today’s session.
● A PDF report along with the screen recording of all the tasks needs to uploaded
● Name, College Name should be mentioned in the PDF report and should be saved in the
format of Name_collegeName.pdf and Name_collegeName.mp4
● Plagiarism will be checked, so don’t copy from others.
● This submission is mandatory and will be counted towards your course completion.
Table of contents

01 Introduction
Basic Keywords and Definition and Recap

02 Subscription
What are subscriptions and how are we
using it

03 Warehousing
Databases and Warehousing
oneM2M
{ oneM2M
Resource Tree
• IN-CSE(Infrastructure Node –
Common Service Entity)
• AE(Application Entity)
• CNT(Container)
• CIN(Container Instance)


SUB(Subscription)
ACP(Access Control Policy) }
API
Application Programming Interface

• Allows us to connect two servers

• Send information and receive information

• Client sends the request and server sends


back the response
Types of APIs

REST
(Representational State Transfer)

A popular type of web


API that uses HTTP
SOAP
(Simple Object Access Protocol)
methods and URLs
for communication. A protocol using XML GraphQL
for messaging;
commonly used in An API query language
enterprise systems. that enables clients
to request only the
data they need.
HTTP
Hypertext Transfer Protocol
A collection of request methods to specify what action is to be performed on a
particular resource. The most commonly used HTTP request methods
are GET, POST, PUT, PATCH, and DELETE. These are equivalent to the CRUD
operations (create, read, update, and delete).
Understanding APIs

GET POST
POST method is used to send
GET method is used to data to a server to create
request data from a server. a new resource. This data
It retrieves information is usually sent in the
from a specified resource request body, making POST
without making any changes suitable for submitting
to it. form data or uploading files.

PUT DELETE
PUT method is used to DELETE method is used to
update an existing resource remove a specified resource
on the server. It typically from the server.
requires sending the entire
modified resource in the
request body.
Database?
A database is a collection of organized data, information
and records.
PostgreSQL
PostgreSQL, or Postgres, is an
advanced, open-source relational
database management system
(RDBMS).

Reliability: Known for high fault tolerance


and stability.

Extensibility: Supports custom functions,


data types, and extensions.

Performance: Optimized for complex


queries and large datasets.

Security: Strong access control features,


such as role-based access and SSL.
python FastAPI

FastAPI is a modern, fast (high- • Fast to code with minimal setup.


performance) web framework for • High-performance, on par with
building APIs with Python 3.7+. NodeJS and Go.
• Based on standard Python type
hints, ensuring readability and
type safety.

} ..
Here are four libraries

FastAPI Pydantic
Core framework for Used within FastAPI to
define models and
building the API. validate data, making APIs
more reliable.

Uvicorn Psycopg2
An ASGI server to serve A PostgreSQL database
FastAPI applications. adapter for Python that
Provides excellent enables connections to
performance for async PostgreSQL databases.
tasks.
{ ..
Let’s code a API

} ..
oneM2M Subscription

POST /~/in-cse/cnt-548494990 HTTP/1.1


Host: localhost:2000
X-M2M-Origin: admin:admin
Content-Type: application/json;ty=23
Content-Length: 129

{
"m2m:sub": {
"rn": "SUB-DT-12",
"nu": "http://localhost:8000/subscription_data",
"nct": "2"
}
}
{ ..
Let’s code a Subscription
API

} ..
{ ..
Let’s code a Subscription
API
< Which can also post/store data in a databse >

} ..
Any Questions?

Likhith Kanigolla

You might also like