Templates
This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
Number of results to return per page.
The initial index from which to return the results.
Which field to use when ordering the results.
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
A search term.
123http://api.example.org/accounts/?offset=400&limit=100http://api.example.org/accounts/?offset=200&limit=100GET /templates/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}
]
}Handle post request, suitable for single and multi creation
Args: request ([dict]): can be dict or list of dicts
Returns: [type]: [description]
Token-based authentication with required prefix "Token"
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
POST /templates/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 372
"name='text'&os='LEG'&is_protected=true§ions=[{'name':'text','retrieval_method':'FILE','retrieval_output':'PTXT','target':'text','template':1,'fields':[{'name':'text','order':1,'retrieval_value':'text','override_target':true,'new_target':'text','retrieval_method':'FILE','retrieval_output':'PTXT','section':1,'options':null}],'options':null,'is_active':true}]"{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
GET /templates/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
PUT /templates/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 372
"name='text'&os='LEG'&is_protected=true§ions=[{'name':'text','retrieval_method':'FILE','retrieval_output':'PTXT','target':'text','template':1,'fields':[{'name':'text','order':1,'retrieval_value':'text','override_target':true,'new_target':'text','retrieval_method':'FILE','retrieval_output':'PTXT','section':1,'options':null}],'options':null,'is_active':true}]"{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
No response body
No content
DELETE /templates/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
No response body
No content
This class will define the view behavior
Args: viewsets ([OCSVIewSet])
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
PATCH /templates/{id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 372
"name='text'&os='LEG'&is_protected=true§ions=[{'name':'text','retrieval_method':'FILE','retrieval_output':'PTXT','target':'text','template':1,'fields':[{'name':'text','order':1,'retrieval_value':'text','override_target':true,'new_target':'text','retrieval_method':'FILE','retrieval_output':'PTXT','section':1,'options':null}],'options':null,'is_active':true}]"{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}Export a template and its nested sections and fields, using specific serializers to strip ids and fk relations
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
GET /templates/{id}/export/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}Import (append) one or more sections, with their nested fields, into an existing template. Used by the partial template import: the sections come from an exported template file and are attached as brand new sections, so any provided id is dropped and the template is forced to the target one.
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
POST /templates/{id}/import-sections/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 372
"name='text'&os='LEG'&is_protected=true§ions=[{'name':'text','retrieval_method':'FILE','retrieval_output':'PTXT','target':'text','template':1,'fields':[{'name':'text','order':1,'retrieval_value':'text','override_target':true,'new_target':'text','retrieval_method':'FILE','retrieval_output':'PTXT','section':1,'options':null}],'options':null,'is_active':true}]"{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}List the version history for this template
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
GET /templates/{id}/versions/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}List the version history for this template
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
POST /templates/{id}/versions/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 372
"name='text'&os='LEG'&is_protected=true§ions=[{'name':'text','retrieval_method':'FILE','retrieval_output':'PTXT','target':'text','template':1,'fields':[{'name':'text','order':1,'retrieval_value':'text','override_target':true,'new_target':'text','retrieval_method':'FILE','retrieval_output':'PTXT','section':1,'options':null}],'options':null,'is_active':true}]"{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}Retrieve a single version, including its full snapshot, or delete it
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
GET /templates/{id}/versions/{version_id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}Retrieve a single version, including its full snapshot, or delete it
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
No response body
No content
DELETE /templates/{id}/versions/{version_id}/ HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
No response body
No content
Restore the template to the state captured in a previous version.
Token-based authentication with required prefix "Token"
A unique integer value identifying this template.
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
This serialize class provide the API representation
LEG- LegacyDEB- Linux (Debian based)RHEL- Linux (RHEL based)MAC- MacWIN- WindowsSNMP- SNMPVIRT- Virtualization
POST /templates/{id}/versions/{version_id}/rollback/ HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 372
"name='text'&os='LEG'&is_protected=true§ions=[{'name':'text','retrieval_method':'FILE','retrieval_output':'PTXT','target':'text','template':1,'fields':[{'name':'text','order':1,'retrieval_value':'text','override_target':true,'new_target':'text','retrieval_method':'FILE','retrieval_output':'PTXT','section':1,'options':null}],'options':null,'is_active':true}]"{
"id": 1,
"name": "text",
"os": "LEG",
"is_protected": true,
"last_update": "2026-01-01T00:00:00.000Z",
"sections": [
{
"id": 1,
"name": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"target": "text",
"template": 1,
"fields": [
{
"id": 1,
"name": "text",
"order": 1,
"retrieval_value": "text",
"override_target": true,
"new_target": "text",
"retrieval_method": "FILE",
"retrieval_output": "PTXT",
"section": 1,
"options": null
}
],
"options": null,
"is_active": true
}
]
}Last updated

