GET /api/realms
Llista dels reialmes

Examples

GET /api/realms
200
{
  "total": 4,
  "subtotal": 4,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "name": "myrealm.net",
      "realm_type": "FreeIPA",
      "created_at": "2019-09-11 14:41:58 UTC",
      "updated_at": "2019-09-11 14:41:58 UTC",
      "id": 664044182,
      "realm_proxy_id": 982965213,
      "realm_proxy_name": "Realm Proxy",
      "realm_proxy": {
        "name": "Realm Proxy",
        "id": 982965213,
        "url": "http://else.where:1337"
      }
    },
    {
      "name": "unused.net",
      "realm_type": "FreeIPA",
      "created_at": "2019-09-11 14:41:58 UTC",
      "updated_at": "2019-09-11 14:41:58 UTC",
      "id": 90728897,
      "realm_proxy_id": 982965213,
      "realm_proxy_name": "Realm Proxy",
      "realm_proxy": {
        "name": "Realm Proxy",
        "id": 982965213,
        "url": "http://else.where:1337"
      }
    },
    {
      "name": "useless.net",
      "realm_type": "FreeIPA",
      "created_at": "2019-09-11 14:41:58 UTC",
      "updated_at": "2019-09-11 14:41:58 UTC",
      "id": 229305443,
      "realm_proxy_id": 982965213,
      "realm_proxy_name": "Realm Proxy",
      "realm_proxy": {
        "name": "Realm Proxy",
        "id": 982965213,
        "url": "http://else.where:1337"
      }
    },
    {
      "name": "yourrealm.net",
      "realm_type": "FreeIPA",
      "created_at": "2019-09-11 14:41:58 UTC",
      "updated_at": "2019-09-11 14:41:58 UTC",
      "id": 936160439,
      "realm_proxy_id": 982965213,
      "realm_proxy_name": "Realm Proxy",
      "realm_proxy": {
        "name": "Realm Proxy",
        "id": 982965213,
        "url": "http://else.where:1337"
      }
    }
  ]
}

Params

Param Name Description
location_id
Optional

Abast per ubicacions

Validations:

  • Must be a Integer

organization_id
Optional

Abast per organitzacions

Validations:

  • Must be a Integer

search
Optional

filtra els resultats

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
Optional

Nombre de resultats per pàgina a retornar

Validations:

  • Must be a number.

Search fields

Field name Tipus Possible values
location string
location_id integer
name string
organization string
organization_id integer
type string

GET /api/realms/:id
Mostra un reialme

Examples

GET /api/realms/myrealm.net
200
{
  "name": "myrealm.net",
  "realm_type": "FreeIPA",
  "created_at": "2019-09-11 14:41:58 UTC",
  "updated_at": "2019-09-11 14:41:58 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
    }
  ]
}

Params

Param Name Description
location_id
Optional

Abast per ubicacions

Validations:

  • Must be a Integer

organization_id
Optional

Abast per organitzacions

Validations:

  • Must be a Integer

id
Required

ID numèric o nom del reialme

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
Crea un reialme

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

Examples

POST /api/realms
{
  "realm": {
    "name": ""
  }
}
422
{
  "error": {
    "id": null,
    "errors": {
      "realm_proxy_id": [
        "was not found",
        "can't be blank"
      ],
      "name": [
        "can't be blank"
      ],
      "realm_type": [
        "can't be blank",
        "is not included in the list"
      ]
    },
    "full_messages": [
      "Realm proxy was not found",
      "Realm proxy can't be blank",
      "Name can't be blank",
      "Realm type can't be blank",
      "Realm type is not included in the list"
    ]
  }
}

Params

Param Name Description
location_id
Optional

Abast per ubicacions

Validations:

  • Must be a Integer

organization_id
Optional

Abast per organitzacions

Validations:

  • Must be a Integer

realm
Required

Validations:

  • Must be a Hash

realm[name]
Required

El nom del reialme, p. ex. EXAMPLE.COM

Validations:

  • Must be a String

realm[realm_proxy_id]
Required , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Proxy ID to use within this realm

Validations:

  • Must be a number.

realm[realm_type]
Required

Tipus de reialme, p. ex. FreeIPA o Active Directory

Validations:

  • Must be a String

realm[location_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les ubicacions amb els ID donats

Validations:

  • Must be an array of any type

realm[organization_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les organitzacions amb els ID donats.

Validations:

  • Must be an array of any type


PUT /api/realms/:id
Actualitza un reialme

Examples

PUT /api/realms/myrealm.net
{
  "realm": {
    "name": ""
  }
}
422
{
  "error": {
    "id": 664044182,
    "errors": {
      "name": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Name can't be blank"
    ]
  }
}

Params

Param Name Description
location_id
Optional

Abast per ubicacions

Validations:

  • Must be a Integer

organization_id
Optional

Abast per organitzacions

Validations:

  • Must be a Integer

id
Required

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
Required

Validations:

  • Must be a Hash

realm[name]
Optional

El nom del reialme, p. ex. EXAMPLE.COM

Validations:

  • Must be a String

realm[realm_proxy_id]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Proxy ID to use within this realm

Validations:

  • Must be a number.

realm[realm_type]
Optional

Tipus de reialme, p. ex. FreeIPA o Active Directory

Validations:

  • Must be a String

realm[location_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les ubicacions amb els ID donats

Validations:

  • Must be an array of any type

realm[organization_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les organitzacions amb els ID donats.

Validations:

  • Must be an array of any type


DELETE /api/realms/:id
Suprimeix un reialme

Examples

DELETE /api/realms/myrealm.net
{
  "realm": {}
}
200
{
  "id": 664044182,
  "name": "myrealm.net",
  "realm_type": "FreeIPA",
  "realm_proxy_id": 982965213,
  "created_at": "2019-09-11T14:41:58.529Z",
  "updated_at": "2019-09-11T14:41:58.529Z"
}

Params

Param Name Description
location_id
Optional

Abast per ubicacions

Validations:

  • Must be a Integer

organization_id
Optional

Abast per organitzacions

Validations:

  • Must be a Integer

id
Required

Validations:

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