Skip to content

Api Domains Post

Carlos Badenes edited this page Mar 31, 2016 · 1 revision

Create Domain Instance

A new domain will be created.

Request

POST http://zavijava.dia.fi.upm.es:8888/api/domains/
HEADER:
  Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c
Content-Type: application/json
{
    "name": "my-domain",
    "sources": [
    {
      "uri": "sources/11111111-2222-1111-1111-111111111111"
    },
    {
      "uri": "sources/11111111-3333-1111-1111-111111111111"
    }
    ],
    "documents": [
    {
      "uri": "documents/11111111-2222-1111-1111-111111111111"
    },
    {
      "uri": "documents/11111111-3333-1111-1111-111111111111"
    }
    ]
}
  • curl:
curl -i -X POST -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" -d "{'name': 'new-name','sources': [{  'uri': 'sources/11111111-2222-1111-1111-111111111111'},{  'uri': 'sources/11111111-3333-1111-1111-111111111111'}],'documents': [{  'uri': 'documents/11111111-2222-1111-1111-111111111111'},{  'uri': 'documents/11111111-3333-1111-1111-111111111111'}]}" http://zavijava.dia.fi.upm.es:8888/api/domains

Response

202 Accepted
{
    "uri": "domains/11111111-2222-3333-4444-555555555555"
}
Clone this wiki locally