Hey! These docs are for version 6.3, which is no longer officially supported. Click here for the latest version, 6.7!

Rest API Config endpoint for tenancies

Object type: tenancy

Request URL: /rest/config/tenancy

Example GET all

Response:

{
   "list" : [
      {
         "description" : "Foo description",
         "id" : "1",
         "name" : "Foo name",
         "primary_role" : {
            "name" : "View all, change none",
            "ref" : "/rest/config/role/13"
         },
         "priority" : "0",
         "ref" : "/rest/config/tenancy/1"
      },
      {
         "description" : "Bar description",
         "id" : "2",
         "name" : "Bar name",
         "primary_role" : {
            "name" : "View all, change none",
            "ref" : "/rest/config/role/13"
         },
         "priority" : "0",
         "ref" : "/rest/config/tenancy/2"
      }
   ],
   "summary" : {
      "allrows" : "2",
      "page" : "1",
      "rows" : "2",
      "totalpages" : "1",
      "totalrows" : "2"
   }
}

Example GET single

Request URL:/rest/config/tenancy/1

Response:

{
   "object" : {
      "description" : "Foo description",
      "id" : "1",
      "name" : "Foo name",
      "primary_role" : {
         "name" : "View all, change none",
         "ref" : "/rest/config/role/13"
      },
      "priority" : "0"
   }
}

Example PUT

Request URL: /rest/config/tenancy/1

Request data:

{
   "object" : {
      "description" : "The description of Foo",
      "name" : "The name of Foo",
      "primary_role" : {
         "name" : "Admin no configurehosts"
      },
      "priority" : "1"
   }
}

Response:

{
   "object" : {
      "description" : "The description of Foo",
      "id" : "1",
      "name" : "The name of Foo",
      "primary_role" : {
         "name" : "Admin no configurehosts",
         "ref" : "/rest/config/role/16"
      },
      "priority" : "1"
   }
}

Example POST

Request URL:/rest/config/tenancy

Request data:

{
   "object" : {
      "description" : "Foo description",
      "name" : "Foo name",
      "primary_role" : {
         "name" : "View all, change none"
      },
      "priority" : "0"
   }
}

Response:

{
   "object" : {
      "description" : "Foo description",
      "id" : "1",
      "name" : "Foo name",
      "primary_role" : {
         "name" : "View all, change none",
         "ref" : "/rest/config/role/13"
      },
      "priority" : "0"
   }
}

Example DELETE

Request URL: /rest/config/tenancy/2

Response:

{
   "success" : "1"
}