GET /api/organizations/114267492/ptables 200 { "total": 1, "subtotal": 1, "page": 1, "per_page": 20, "search": "ptable328", "sort": { "by": null, "order": null }, "results": [ { "description": null, "os_family": "Redhat", "created_at": "2022-03-29 08:36:32 UTC", "updated_at": "2022-03-29 08:36:32 UTC", "name": "ptable328", "id": 1007981757 } ] }
Param name | Description |
---|---|
operatingsystem_id optional |
ID of operating system Validations:
|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
search optional |
filter results Validations:
|
order optional |
Sort and order by a searchable field, e.g. ‘ Maruku could not parse this XML/HTML: <field> DESC' Validations:
|
page optional |
Page number, starting at 1 Validations:
|
per_page optional |
Number of results per page to return, ‘all’ to return all results Validations:
|
Field name | Type | Possible values |
---|---|---|
default | true, false | |
family | string | |
id | integer | |
layout | text | |
location | string | |
location_id | integer | |
locked | true, false | |
name | string | |
organization | string | |
organization_id | integer | |
snippet | true, false | |
template | text | |
vendor | string |
GET /api/ptables/1007981754-ptable326 200 { "layout": "zerombr\nclearpart --all --initlabel\npart /boot --fstype ext3 --size=<%= 10 * 10 %> --asprimary\npart / --fstype ext3 --size=1024 --grow\npart swap --recommended", "locked": false, "description": null, "os_family": "Redhat", "created_at": "2022-03-29 08:36:32 UTC", "updated_at": "2022-03-29 08:36:32 UTC", "name": "ptable326", "id": 1007981754, "operatingsystems": [ { "id": 1073012828, "name": "Redhat", "title": "RHEL 6.1" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
POST /api/ptables { "name": "ptable_test", "layout": "d-i partman-auto/disk", "ptable": { "layout": "d-i partman-auto/disk", "name": "ptable_test" } } 201 { "layout": "d-i partman-auto/disk", "locked": false, "description": null, "os_family": null, "created_at": "2022-03-29 08:36:31 UTC", "updated_at": "2022-03-29 08:36:31 UTC", "name": "ptable_test", "id": 1007981746, "operatingsystems": [], "locations": [], "organizations": [] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
ptable required |
Validations:
|
ptable[name] required |
Validations:
|
ptable[description] optional , nil allowed |
Validations:
|
ptable[layout] required |
Validations:
|
ptable[snippet] optional , nil allowed |
Validations:
|
ptable[audit_comment] optional , nil allowed |
Validations:
|
ptable[locked] optional , nil allowed |
Whether or not the template is locked for editing Validations:
|
ptable[os_family] optional , nil allowed |
Validations:
|
ptable[operatingsystem_ids] optional , nil allowed |
Array of operating system IDs to associate with the partition table Validations:
|
ptable[host_ids] optional , nil allowed |
Array of host IDs to associate with the partition table Validations:
|
ptable[hostgroup_ids] optional , nil allowed |
Array of host group IDs to associate with the partition table Validations:
|
ptable[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
ptable[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
POST /api/ptables/import { "ptable": { "name": "ptable340", "template": "b" } } 201 { "template": "b", "name": "ptable340", "id": 1007981772, "snippet": false, "description": null, "template_kind_id": null, "created_at": "2022-03-29T08:36:34.786Z", "updated_at": "2022-03-29T08:36:34.811Z", "locked": false, "default": false, "vendor": null, "os_family": "Redhat" }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
ptable required |
Validations:
|
ptable[name] optional |
template name Validations:
|
ptable[template] optional |
template contents including metadata Validations:
|
ptable[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
ptable[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
options optional |
Validations:
|
options[force] optional , nil allowed |
use if you want update locked templates Validations:
|
options[associate] optional , nil allowed |
determines when the template should associate objects based on metadata, new means only when new template is being created, always means both for new and existing template which is only being updated, never ignores metadata Validations:
|
options[lock] optional , nil allowed |
lock imported templates (false by default) Validations:
|
options[default] optional , nil allowed |
makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default) Validations:
|
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
version optional |
template version Validations:
|
PUT /api/ptables/1007981741 { "ptable": { "os_family": "Coreos" } } 200 { "layout": "zerombr\nclearpart --all --initlabel\npart /boot --fstype ext3 --size=<%= 10 * 10 %> --asprimary\npart / --fstype ext3 --size=1024 --grow\npart swap --recommended", "locked": false, "description": null, "os_family": "Coreos", "created_at": "2022-03-29 08:36:30 UTC", "updated_at": "2022-03-29 08:36:30 UTC", "name": "ptable314", "id": 1007981741, "operatingsystems": [], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
ptable required |
Validations:
|
ptable[name] optional |
Validations:
|
ptable[description] optional , nil allowed |
Validations:
|
ptable[layout] optional |
Validations:
|
ptable[snippet] optional , nil allowed |
Validations:
|
ptable[audit_comment] optional , nil allowed |
Validations:
|
ptable[locked] optional , nil allowed |
Whether or not the template is locked for editing Validations:
|
ptable[os_family] optional , nil allowed |
Validations:
|
ptable[operatingsystem_ids] optional , nil allowed |
Array of operating system IDs to associate with the partition table Validations:
|
ptable[host_ids] optional , nil allowed |
Array of host IDs to associate with the partition table Validations:
|
ptable[hostgroup_ids] optional , nil allowed |
Array of host group IDs to associate with the partition table Validations:
|
ptable[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
ptable[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
DELETE /api/ptables/1007981740-ptable313 { "ptable": {} } 422 { "error": { "id": 1007981740, "errors": { "base": [ "ptable313 is used by host748" ] }, "full_messages": [ "ptable313 is used by host748" ] } }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
POST /api/ptables/1007981744-ptable317/clone { "ptable": { "name": "MyClone" } } 201 { "name": "MyClone", "id": 1007981744, "template": "zerombr\nclearpart --all --initlabel\npart /boot --fstype ext3 --size=<%= 10 * 10 %> --asprimary\npart / --fstype ext3 --size=1024 --grow\npart swap --recommended", "snippet": false, "template_kind_id": null, "created_at": "2022-03-29T08:36:30.883Z", "updated_at": "2022-03-29T08:36:30.907Z", "locked": false, "default": false, "vendor": null, "os_family": "Redhat", "description": null }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
ptable required |
Validations:
|
ptable[name] required |
template name Validations:
|
GET /api/ptables/1007981749-ptable321/export 200 <%# name: ptable321 snippet: false model: Ptable os_family: Redhat organizations: - Organization 1 locations: - Location 1 -%> zerombr clearpart --all --initlabel part /boot --fstype ext3 --size=<%= 10 * 10 %> --asprimary part / --fstype ext3 --size=1024 --grow part swap --recommended
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|