Domain API v2

From Memsource
Jump to: navigation, search

Create New Domain

action: api/v2/domain/create
    token                       string
    name                        string                             

response: JSON
    {
      "id": 238                 // id of the new domain
    }

Get Domain

action: api/v2/domain/get
    token                       string
    domain                      domain(Domain)

response: JSON
   {
     "id":3,
     "name":"domain"
   }

List Domains

action: api/v2/domain/list
    token                       string
    page                        integer            O(0)
    name                        string             O

response: JSON
   [
     {
       "id":3,
       "name":"domain"
     }
   ]

Edit Domain

action: api/v2/domain/edit
    token                       string
    domain                      domain(Domain)
    name                        string

response: empty

Delete Domain

action: api/v2/domain/delete
    token                       string
    domain                      domain(Domain)

response: empty