- Create a SQL Database in
/Project/middleware-d26/App_Data
namedDBmiddleware.mdf
. - Initialize the database.
Install-Package EntityFramework
Update-Database
POST http://localhost:65252/api/somiod
Content-Type: application/xml
<EntityRequest xmlns="Middleware-d26">
<res_type>application</res_type>
<name>NewApplication3</name>
</EntityRequest>
GET http://localhost:65252/api/somiod/NewApplication
Accept: application/xml
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 http://localhost:65252/api/somiod/NewApplication
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 http://localhost:65252/api/somiod/App1/NewContainer
Accept: application/xml
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 http://localhost:65252/api/somiod/App1/ModifiedContainer
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 http://localhost:65252/api/somiod/App1/Container1/sub/NewSubscription
Accept: application/xml
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
GET http://localhost:65252/api/somiod
Accept: application/xml
somiod-discover: application
GET http://localhost:65252/api/somiod/App1
Accept: application/xml
somiod-discover: container
GET http://localhost:65252/api/somiod/App1/Container1
Accept: application/xml
somiod-discover: subscription
GET http://localhost:65252/api/somiod/App1/Container1
Accept: application/xml
somiod-discover: data