Create a SQL Database in /Project/middleware-d26/App_Data
named DBmiddleware.mdf
.
Initialize the database.
Install-Package EntityFramework
Update-Database
Create Application - createNewApplication
POST http://localhost:65252/api/somiod
Content-Type: application/xml
<EntityRequest xmlns =" Middleware-d26" >
<res_type >application</res_type >
<name >NewApplication3</name >
</EntityRequest >
Get Application - getApplication
GET http://localhost:65252/api/somiod/NewApplication
Accept: application/xml
Modify Application - modifyApplication
PUT http://localhost:65252/api/somiod/NewApplication
Content-Type: application/xml
<EntityRequest xmlns =" Middleware-d26" >
<res_type >application</res_type >
<name >ModifiedApplication</name >
</EntityRequest >
Delete Application - deleteApplication
DELETE http://localhost:65252/api/somiod/NewApplication
Create Container - createNewContainer
POST http://localhost:65252/api/somiod/App1
Content-Type: application/xml
<EntityRequest xmlns =" Middleware-d26" >
<res_type >container</res_type >
<name >NewContainer</name >
</EntityRequest >
Get Container - getContainer
GET http://localhost:65252/api/somiod/App1/NewContainer
Accept: application/xml
Modify Container - modifyContainer
PUT http://localhost:65252/api/somiod/App1/NewContainer
Content-Type: application/xml
<EntityRequest xmlns =" Middleware-d26" >
<res_type >container</res_type >
<name >ModifiedContainer</name >
</EntityRequest >
Delete Container - deleteContainer
DELETE http://localhost:65252/api/somiod/App1/ModifiedContainer
Create Subscription - createSubscription
POST http://localhost:65252/api/somiod/App1/Container1
Content-Type: application/xml
<EntityRequest xmlns =" Middleware-d26" >
<res_type >subscription</res_type >
<subscription >
<name >NewSubscription</name >
<event >YourEvent</event >
<endpoint >YourEndpoint</endpoint >
</subscription >
</EntityRequest >
Get Subscription - getSubscription
GET http://localhost:65252/api/somiod/App1/Container1/sub/NewSubscription
Accept: application/xml
Delete Subscription - deleteSubscription
DELETE http://localhost:65252/api/somiod/App1/Container1/sub/NewSubscription
POST http://localhost:65252/api/somiod/App1/Container1
Content-Type: application/xml
<EntityRequest xmlns =" Middleware-d26" >
<res_type >data</res_type >
<data >
<name >NewData</name >
<content >YourContent</content >
</data >
</EntityRequest >
GET http://localhost:65252/api/somiod/App1/Container1/data/NewData
Accept: application/xml
DELETE http://localhost:65252/api/somiod/App1/Container1/data/NewData
Discover Applications - discoverApplications
GET http://localhost:65252/api/somiod
Accept: application/xml
somiod-discover: application
Discover Containers - discoverContainers
GET http://localhost:65252/api/somiod/App1
Accept: application/xml
somiod-discover: container
Discover Subscriptions - discoverSubscriptions
GET http://localhost:65252/api/somiod/App1/Container1
Accept: application/xml
somiod-discover: subscription
Discover Datas - discoverDatas
GET http://localhost:65252/api/somiod/App1/Container1
Accept: application/xml
somiod-discover: data