GET /api/filters
Listar todos los filtros

Ejemplos

GET /api/filters
200
{
  "total": 63,
  "subtotal": 63,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "search": null,
      "resource_type": "Architecture",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 321349837,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_architectures",
          "id": 350275019,
          "resource_type": "Architecture"
        },
        {
          "name": "create_architectures",
          "id": 912770095,
          "resource_type": "Architecture"
        },
        {
          "name": "edit_architectures",
          "id": 874798611,
          "resource_type": "Architecture"
        },
        {
          "name": "destroy_architectures",
          "id": 586604735,
          "resource_type": "Architecture"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "AuthSource",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 170801529,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_authenticators",
          "id": 687843582,
          "resource_type": "AuthSource"
        },
        {
          "name": "create_authenticators",
          "id": 956119309,
          "resource_type": "AuthSource"
        },
        {
          "name": "edit_authenticators",
          "id": 395314704,
          "resource_type": "AuthSource"
        },
        {
          "name": "destroy_authenticators",
          "id": 1067518973,
          "resource_type": "AuthSource"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Environment",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 1026099682,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_environments",
          "id": 189359466,
          "resource_type": "Environment"
        },
        {
          "name": "create_environments",
          "id": 290807607,
          "resource_type": "Environment"
        },
        {
          "name": "edit_environments",
          "id": 1063021050,
          "resource_type": "Environment"
        },
        {
          "name": "destroy_environments",
          "id": 505866180,
          "resource_type": "Environment"
        },
        {
          "name": "import_environments",
          "id": 782644867,
          "resource_type": "Environment"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "VariableLookupKey",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 592288835,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_external_variables",
          "id": 593459230,
          "resource_type": "VariableLookupKey"
        },
        {
          "name": "create_external_variables",
          "id": 140923897,
          "resource_type": "VariableLookupKey"
        },
        {
          "name": "edit_external_variables",
          "id": 1050695340,
          "resource_type": "VariableLookupKey"
        },
        {
          "name": "destroy_external_variables",
          "id": 693514154,
          "resource_type": "VariableLookupKey"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Domain",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 340438230,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_domains",
          "id": 623290985,
          "resource_type": "Domain"
        },
        {
          "name": "create_domains",
          "id": 776153244,
          "resource_type": "Domain"
        },
        {
          "name": "edit_domains",
          "id": 914687015,
          "resource_type": "Domain"
        },
        {
          "name": "destroy_domains",
          "id": 808331307,
          "resource_type": "Domain"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "CommonParameter",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 222559602,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_globals",
          "id": 101322209,
          "resource_type": "CommonParameter"
        },
        {
          "name": "create_globals",
          "id": 225414942,
          "resource_type": "CommonParameter"
        },
        {
          "name": "edit_globals",
          "id": 363439011,
          "resource_type": "CommonParameter"
        },
        {
          "name": "destroy_globals",
          "id": 318934959,
          "resource_type": "CommonParameter"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Hostgroup",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 977587707,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_hostgroups",
          "id": 51094894,
          "resource_type": "Hostgroup"
        },
        {
          "name": "create_hostgroups",
          "id": 175778558,
          "resource_type": "Hostgroup"
        },
        {
          "name": "edit_hostgroups",
          "id": 214584076,
          "resource_type": "Hostgroup"
        },
        {
          "name": "destroy_hostgroups",
          "id": 1009240528,
          "resource_type": "Hostgroup"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Host",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 721145960,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_hosts",
          "id": 988725676,
          "resource_type": "Host"
        },
        {
          "name": "create_hosts",
          "id": 740433627,
          "resource_type": "Host"
        },
        {
          "name": "edit_hosts",
          "id": 561976263,
          "resource_type": "Host"
        },
        {
          "name": "destroy_hosts",
          "id": 619977594,
          "resource_type": "Host"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Medium",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 503111935,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_media",
          "id": 135202335,
          "resource_type": "Medium"
        },
        {
          "name": "create_media",
          "id": 516151662,
          "resource_type": "Medium"
        },
        {
          "name": "edit_media",
          "id": 329176178,
          "resource_type": "Medium"
        },
        {
          "name": "destroy_media",
          "id": 370531533,
          "resource_type": "Medium"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Model",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 643462867,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_models",
          "id": 537547377,
          "resource_type": "Model"
        },
        {
          "name": "create_models",
          "id": 509054658,
          "resource_type": "Model"
        },
        {
          "name": "edit_models",
          "id": 173772800,
          "resource_type": "Model"
        },
        {
          "name": "destroy_models",
          "id": 147454802,
          "resource_type": "Model"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Operatingsystem",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 291325508,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_operatingsystems",
          "id": 940057595,
          "resource_type": "Operatingsystem"
        },
        {
          "name": "create_operatingsystems",
          "id": 1038489107,
          "resource_type": "Operatingsystem"
        },
        {
          "name": "edit_operatingsystems",
          "id": 887912542,
          "resource_type": "Operatingsystem"
        },
        {
          "name": "destroy_operatingsystems",
          "id": 936871672,
          "resource_type": "Operatingsystem"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Ptable",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 139728896,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_ptables",
          "id": 769440046,
          "resource_type": "Ptable"
        },
        {
          "name": "create_ptables",
          "id": 649673681,
          "resource_type": "Ptable"
        },
        {
          "name": "edit_ptables",
          "id": 1048516464,
          "resource_type": "Ptable"
        },
        {
          "name": "destroy_ptables",
          "id": 953432930,
          "resource_type": "Ptable"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Puppetclass",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 1062414187,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_puppetclasses",
          "id": 849307952,
          "resource_type": "Puppetclass"
        },
        {
          "name": "create_puppetclasses",
          "id": 270035150,
          "resource_type": "Puppetclass"
        },
        {
          "name": "edit_puppetclasses",
          "id": 308015866,
          "resource_type": "Puppetclass"
        },
        {
          "name": "destroy_puppetclasses",
          "id": 76106844,
          "resource_type": "Puppetclass"
        },
        {
          "name": "import_puppetclasses",
          "id": 849710366,
          "resource_type": "Puppetclass"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Usergroup",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 557298380,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_usergroups",
          "id": 44766150,
          "resource_type": "Usergroup"
        },
        {
          "name": "create_usergroups",
          "id": 198876242,
          "resource_type": "Usergroup"
        },
        {
          "name": "edit_usergroups",
          "id": 225115552,
          "resource_type": "Usergroup"
        },
        {
          "name": "destroy_usergroups",
          "id": 1032290172,
          "resource_type": "Usergroup"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "User",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 372277853,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_users",
          "id": 916456187,
          "resource_type": "User"
        },
        {
          "name": "create_users",
          "id": 544005512,
          "resource_type": "User"
        },
        {
          "name": "edit_users",
          "id": 758239380,
          "resource_type": "User"
        },
        {
          "name": "destroy_users",
          "id": 683333673,
          "resource_type": "User"
        }
      ]
    },
    {
      "search": null,
      "resource_type": null,
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 255448041,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "access_settings",
          "id": 139485686,
          "resource_type": null
        },
        {
          "name": "access_dashboard",
          "id": 220719619,
          "resource_type": null
        },
        {
          "name": "view_statistics",
          "id": 955233873,
          "resource_type": null
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Report",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 943645556,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_reports",
          "id": 407024322,
          "resource_type": "Report"
        },
        {
          "name": "destroy_reports",
          "id": 222966002,
          "resource_type": "Report"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "FactValue",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 679608033,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_facts",
          "id": 958901131,
          "resource_type": "FactValue"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Audit",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 528928374,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_audit_logs",
          "id": 202577195,
          "resource_type": "Audit"
        }
      ]
    },
    {
      "search": null,
      "resource_type": "Location",
      "unlimited?": true,
      "created_at": "2019-09-11 14:35:58 UTC",
      "updated_at": "2019-09-11 14:35:58 UTC",
      "override?": false,
      "id": 225912082,
      "role": {
        "name": "Manager",
        "id": 1,
        "description": null,
        "origin": "foreman"
      },
      "permissions": [
        {
          "name": "view_locations",
          "id": 342396477,
          "resource_type": "Location"
        },
        {
          "name": "edit_locations",
          "id": 360701043,
          "resource_type": "Location"
        },
        {
          "name": "create_locations",
          "id": 919402658,
          "resource_type": "Location"
        },
        {
          "name": "destroy_locations",
          "id": 302614650,
          "resource_type": "Location"
        }
      ]
    }
  ]
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

search
opcional

filtrar resultados

Validations:

  • Must be a String

order
opcional

Orden y campo de clasificación, p. ej., ‘id DESC’

Validations:

  • Must be a String

page
opcional

Número de página, comenzando por 1

Validations:

  • Must be a number.

per_page
opcional

Número de resultados por página para devolver

Validations:

  • Must be a number.

Campos de búsqueda

Nombre del campo Tipo Valores posibles
limited true, false
location string
location_id integer
organization string
organization_id integer
override true, false
permission string
resource string
role string
role_id integer
search text
unlimited true, false

GET /api/filters/:id
Mostrar un filtro

Ejemplos

GET /api/filters/321349837
200
{
  "search": null,
  "resource_type": "Architecture",
  "unlimited?": true,
  "created_at": "2019-09-11 14:35:58 UTC",
  "updated_at": "2019-09-11 14:35:58 UTC",
  "override?": false,
  "id": 321349837,
  "role": {
    "name": "Manager",
    "id": 1,
    "description": null,
    "origin": "foreman"
  },
  "permissions": [
    {
      "name": "view_architectures",
      "id": 350275019,
      "resource_type": "Architecture"
    },
    {
      "name": "create_architectures",
      "id": 912770095,
      "resource_type": "Architecture"
    },
    {
      "name": "edit_architectures",
      "id": 874798611,
      "resource_type": "Architecture"
    },
    {
      "name": "destroy_architectures",
      "id": 586604735,
      "resource_type": "Architecture"
    }
  ],
  "locations": [],
  "organizations": []
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

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/filters
Crear un filtro

Ejemplos

POST /api/filters
{
  "filter": {
    "role_id": 8,
    "permission_ids": [
      350275019
    ]
  }
}
201
{
  "search": null,
  "resource_type": "Architecture",
  "unlimited?": true,
  "created_at": "2019-09-11 14:35:59 UTC",
  "updated_at": "2019-09-11 14:35:59 UTC",
  "override?": false,
  "id": 1062414188,
  "role": {
    "name": "Destroy hosts",
    "id": 8,
    "description": null,
    "origin": ""
  },
  "permissions": [
    {
      "name": "view_architectures",
      "id": 350275019,
      "resource_type": "Architecture"
    }
  ],
  "locations": [],
  "organizations": []
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

filter
requerido

Validations:

  • Must be a Hash

filter[role_id]
requerido

Validations:

  • Must be a String

filter[search]
opcional , nil permitido

Validations:

  • Must be a String

filter[override]
opcional , nil permitido

Validations:

  • Must be one of: true, false, 1, 0.

filter[permission_ids]
opcional , nil permitido

Validations:

  • Must be an array of any type

filter[organization_ids]
opcional , nil permitido

Validations:

  • Must be an array of any type

filter[location_ids]
opcional , nil permitido

Validations:

  • Must be an array of any type


PUT /api/filters/:id
Actualizar un filtro

Ejemplos

PUT /api/filters/10997177
{
  "filter": {
    "role_id": 8,
    "permission_ids": [
      740433627
    ]
  }
}
200
{
  "search": null,
  "resource_type": "Host",
  "unlimited?": true,
  "created_at": "2019-09-11 14:35:58 UTC",
  "updated_at": "2019-09-11 14:35:58 UTC",
  "override?": false,
  "id": 10997177,
  "role": {
    "name": "Destroy hosts",
    "id": 8,
    "description": null,
    "origin": ""
  },
  "permissions": [
    {
      "name": "create_hosts",
      "id": 740433627,
      "resource_type": "Host"
    }
  ],
  "locations": [],
  "organizations": []
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String

filter
requerido

Validations:

  • Must be a Hash

filter[role_id]
opcional

Validations:

  • Must be a String

filter[search]
opcional , nil permitido

Validations:

  • Must be a String

filter[override]
opcional , nil permitido

Validations:

  • Must be one of: true, false, 1, 0.

filter[permission_ids]
opcional , nil permitido

Validations:

  • Must be an array of any type

filter[organization_ids]
opcional , nil permitido

Validations:

  • Must be an array of any type

filter[location_ids]
opcional , nil permitido

Validations:

  • Must be an array of any type


DELETE /api/filters/:id
Borrar un filtro

Ejemplos

DELETE /api/filters/10997177
{
  "filter": {}
}
200
{
  "id": 10997177,
  "search": null,
  "role_id": 8,
  "created_at": "2019-09-11T14:35:58.980Z",
  "updated_at": "2019-09-11T14:35:58.980Z",
  "taxonomy_search": null,
  "override": false
}

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String