GET /api/realms
Liste des domaines

Exemples

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
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

search
optionel

filtrer les résultats

Validations:

  • Must be a String

order
optionel

Champ et sens de tri, ex: ‘id DESC’

Validations:

  • Must be a String

page
optionel

Numéro de la page, commençant par 1

Validations:

  • Must be a number.

per_page
optionel

Nombre de résultats par page à renvoyer

Validations:

  • Must be a number.

Rechercher les champs

Nom du champ Type Valeurs possibles
location string
location_id integer
name string
organization string
organization_id integer
type string

GET /api/realms/:id
Afficher un domaine

Exemples

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
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

ID numérique ou nom de domaine

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
Créer un domaine

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

Exemples

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"
    ]
  }
}

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

realm
requis

Validations:

  • Must be a Hash

realm[name]
requis

Le nom du domaine. Ex. : EXAMPLE.COM

Validations:

  • Must be a String

realm[realm_proxy_id]
requis , nil autorisé

ID Proxy à utiliser dans ce domaine

Validations:

  • Must be a number.

realm[realm_type]
requis

Type de domaine. Ex : FreeIPA ou Active Directory

Validations:

  • Must be a String

realm[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

realm[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


PUT /api/realms/:id
Mise à jour d'un domaine

Exemples

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": []
}

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

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
requis

Validations:

  • Must be a Hash

realm[name]
optionel

Le nom du domaine. Ex. : EXAMPLE.COM

Validations:

  • Must be a String

realm[realm_proxy_id]
optionel , nil autorisé

ID Proxy à utiliser dans ce domaine

Validations:

  • Must be a number.

realm[realm_type]
optionel

Type de domaine. Ex : FreeIPA ou Active Directory

Validations:

  • Must be a String

realm[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

realm[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


DELETE /api/realms/:id
Supprimer un domaine

Exemples

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"
}

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

Validations:

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