Subscription and Warehousing
Subscription and Warehousing
Subscriptions and
Data Warehousing
< Lets Play with API’s >
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
REST
(Representational State Transfer)
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).
} ..
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
{
"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