---
title: "Config - Tenancy"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/rest-api/config/api-config-tenancy/index.html"
---
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"
    }
```

