Skip to content

Latest commit

 

History

History
199 lines (148 loc) · 3.7 KB

README.md

File metadata and controls

199 lines (148 loc) · 3.7 KB

project-IS

Database

  • Create a SQL Database in /Project/middleware-d26/App_Data named DBmiddleware.mdf.
  • Initialize the database.
Install-Package EntityFramework
Update-Database

API Documentation

Applications

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

Containers

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

Subscriptions

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

Datas

Create Data - createData

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 Data - getData

GET http://localhost:65252/api/somiod/App1/Container1/data/NewData
Accept: application/xml

Delete Data - deleteData

DELETE http://localhost:65252/api/somiod/App1/Container1/data/NewData

Discovery

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