GET /api/realms
Список областей

Примеры

GET /api/locations/447626439/realms
200
{
  "total": 2,
  "subtotal": 2,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "name": "myrealm.net",
      "realm_type": "FreeIPA",
      "created_at": "2019-11-07 09:06:52 UTC",
      "updated_at": "2019-11-07 09:06:52 UTC",
      "id": 664044182,
      "realm_proxy_id": 982965213,
      "realm_proxy_name": null,
      "realm_proxy": null
    },
    {
      "name": "yourrealm.net",
      "realm_type": "FreeIPA",
      "created_at": "2019-11-07 09:06:52 UTC",
      "updated_at": "2019-11-07 09:06:52 UTC",
      "id": 936160439,
      "realm_proxy_id": 982965213,
      "realm_proxy_name": null,
      "realm_proxy": null
    }
  ]
}

Параметры

Имя параметра Описание
location_id
необязательно

Ограничить местоположением

Validations:

  • Must be a Integer

organization_id
необязательно

Ограничить организацией

Validations:

  • Must be a Integer

search
необязательно

отфильтровать результаты

Validations:

  • Must be a String

order
необязательно

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
необязательно

Номер страницы, начиная с 1

Validations:

  • Must be a number.

per_page
необязательно

Число элементов на странице

Validations:

  • Must be a number.

Search fields

Field name Тип Possible values
location string
location_id integer
name string
organization string
organization_id integer
type string

GET /api/realms/:id
Показать область

Примеры

GET /api/realms/myrealm.net
200
{
  "name": "myrealm.net",
  "realm_type": "FreeIPA",
  "created_at": "2019-11-07 09:06:52 UTC",
  "updated_at": "2019-11-07 09:06:52 UTC",
  "id": 664044182,
  "realm_proxy_id": 982965213,
  "realm_proxy_name": "Realm Proxy",
  "realm_proxy": {
    "name": "Realm Proxy",
    "id": 982965213,
    "url": "http://else.where:1337"
  },
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

id
обязательно

Цифровой код или имя области

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/realms
Создать область

The name field is used for the name of the realm.

Примеры

POST /api/realms
{
  "realm": {
    "name": "realm.net",
    "realm_proxy_id": 0,
    "realm_type": "FreeIPA"
  }
}
422
{
  "error": {
    "id": null,
    "errors": {
      "realm_proxy_id": [
        "was not found"
      ]
    },
    "full_messages": [
      "Realm proxy was not found"
    ]
  }
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

realm
обязательно

Validations:

  • Must be a Hash

realm[name]
обязательно

Имя области, например EXAMPLE.COM

Validations:

  • Must be a String

realm[realm_proxy_id]
обязательно , nil разрешен

Proxy ID to use within this realm

Validations:

  • Must be a number.

realm[realm_type]
обязательно

Тип области, например FreeIPA или Active Directory

Validations:

  • Must be a String

realm[location_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ местоположения с заданным кодом

Validations:

  • Must be an array of any type

realm[organization_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ организации с заданным кодом

Validations:

  • Must be an array of any type


PUT /api/realms/:id
Изменить область

Примеры

PUT /api/realms/90728897
{
  "realm": {
    "name": "realm.new"
  }
}
200
{
  "name": "realm.new",
  "realm_type": "FreeIPA",
  "created_at": "2019-11-07 09:07:46 UTC",
  "updated_at": "2019-11-07 09:08:06 UTC",
  "id": 90728897,
  "realm_proxy_id": 982965213,
  "realm_proxy_name": "Realm Proxy",
  "realm_proxy": {
    "name": "Realm Proxy",
    "id": 982965213,
    "url": "http://else.where:1337"
  },
  "locations": [],
  "organizations": []
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

realm
обязательно

Validations:

  • Must be a Hash

realm[name]
необязательно

Имя области, например EXAMPLE.COM

Validations:

  • Must be a String

realm[realm_proxy_id]
необязательно , nil разрешен

Proxy ID to use within this realm

Validations:

  • Must be a number.

realm[realm_type]
необязательно

Тип области, например FreeIPA или Active Directory

Validations:

  • Must be a String

realm[location_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ местоположения с заданным кодом

Validations:

  • Must be an array of any type

realm[organization_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ организации с заданным кодом

Validations:

  • Must be an array of any type


DELETE /api/realms/:id
Удалить область

Примеры

DELETE /api/realms/myrealm.net
{
  "realm": {}
}
200
{
  "id": 664044182,
  "name": "myrealm.net",
  "realm_type": "FreeIPA",
  "realm_proxy_id": 982965213,
  "created_at": "2019-11-07T09:07:46.176Z",
  "updated_at": "2019-11-07T09:07:46.176Z"
}

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

id
обязательно

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.