API Reference
This reference documents the public package surface exported by
glpi_python_client. Internal implementation modules and
underscore-prefixed helpers are intentionally omitted.
Clients
The package exposes two clients with identical endpoint surfaces. The asynchronous one is hand-written and the synchronous one is generated from it, so neither wraps the other and the two cannot drift apart.
- class GlpiClient(*, glpi_api_url, server_timezone, client_id=None, client_secret=None, username=None, password=None, glpi_entity=None, glpi_profile=None, entity_recursive=False, language='en_GB', verify_ssl=True, auth_token_refresh=None, v1_base_url=None, v1_user_token=None, v1_app_token=None)[source]
Bases:
TicketMixin,TicketTaskMixin,FollowupMixin,SolutionMixin,TimelineDocumentMixin,TeamMemberMixin,DocumentMixin,ContractMixin,ComputerMixin,UserMixin,EntityMixin,LocationMixin,ContractTypeMixin,KBCategoryMixin,KBArticleMixin,KBArticleCommentMixin,KBArticleRevisionMixin,PluginFieldsMixin,TicketContextMixin,StatisticsMixin,_BaseGlpiClient,TransportMixinGLPI client backed by the contract-aligned API mixins.
The client owns the shared HTTP session, the OAuth token manager, and the optional legacy v1 session used for binary document uploads and the Fields plugin endpoints. Token acquisition is serialised by the lock from
glpi_python_client._sync._concurrency, which is the right primitive for this surface – see that module for why the two surfaces cannot share one.Construction parameters and
from_env()are documented on_BaseGlpiClient.Methods
add_ticket_team_member(ticket_id, member)Add one team member to a ticket.
close()Release every resource owned by the client.
create_computer(computer)Create one GLPI computer.
create_contract(contract)Create one GLPI contract.
create_contract_cost(contract_id, cost)Create one cost line against a GLPI contract.
create_contract_type(contract_type)Create one GLPI contract type.
create_document(document)Create one GLPI document metadata record.
create_entity(entity)Create one GLPI entity.
create_item_plugin_field_row(*, itemtype, ...)Create one fresh plugin-fields value row.
create_kb_article(article)Create one knowledge base article and return its new identifier.
create_kb_article_comment(article_id, comment)Create one comment on a knowledge base article.
create_kb_category(category)Create one knowledge base category and return its new identifier.
create_location(location)Create one GLPI location.
create_ticket(ticket)Create one GLPI ticket.
create_ticket_followup(ticket_id, followup)Create one followup on a ticket.
create_ticket_solution(ticket_id, solution)Create one solution on a ticket.
create_ticket_task(ticket_id, task)Create one task on a ticket.
create_user(user)Create one GLPI user.
delete_computer(computer_id, *[, force])Delete one GLPI computer by identifier.
delete_contract(contract_id, *[, force])Delete one GLPI contract by identifier.
delete_contract_cost(contract_id, cost_id, *)Delete one cost line from a GLPI contract.
delete_contract_type(contract_type_id, *[, ...])Delete one GLPI contract type by identifier.
delete_document(document_id, *[, force])Delete one GLPI document by identifier.
delete_entity(entity_id, *[, force])Delete one GLPI entity by identifier.
delete_kb_article(article_id, *[, force])Delete one knowledge base article by identifier.
delete_kb_article_comment(article_id, ...[, ...])Delete one knowledge base article comment by identifier.
delete_kb_category(category_id, *[, force])Delete one knowledge base category by identifier.
delete_location(location_id, *[, force])Delete one GLPI location by identifier.
delete_ticket(ticket_id, *[, force])Delete one GLPI ticket by identifier.
delete_ticket_followup(ticket_id, followup_id, *)Delete one ticket followup by identifier.
delete_ticket_solution(ticket_id, solution_id, *)Delete one ticket solution by identifier.
delete_ticket_task(ticket_id, task_id, *[, ...])Delete one ticket task by identifier.
delete_user(user_id, *[, force])Delete one GLPI user by identifier.
download_document_content(document_id)Download the raw binary payload for one GLPI document.
find_user_by_email(email, *[, rsql_filter, ...])Return the first user holding
email, orNone.from_env(*[, env, prefix])Build a client instance from environment variables.
get_computer(computer_id)Fetch one GLPI computer by identifier.
get_computer_contract(computer_id, link_id)Fetch one contract link recorded against a GLPI computer.
get_contract(contract_id)Fetch one GLPI contract by identifier.
get_contract_cost(contract_id, cost_id)Fetch one cost line recorded against a GLPI contract.
get_contract_type(contract_type_id)Fetch one GLPI contract type by identifier.
get_document(document_id)Fetch one GLPI document by identifier.
get_entity(entity_id)Fetch one GLPI entity by identifier.
get_kb_article(article_id)Fetch one knowledge base article by identifier.
get_kb_article_comment(article_id, comment_id)Fetch one knowledge base article comment by identifier.
get_kb_article_revision(article_id, revision, *)Fetch one revision of a knowledge base article by revision number.
get_kb_category(category_id)Fetch one knowledge base category by identifier.
get_location(location_id)Fetch one GLPI location by identifier.
get_task_durations(*[, start_date, ...])Return task duration totals with optional per-task detail.
get_task_statistics(ticket_ids)Return task duration totals grouped by user and ticket.
get_ticket(ticket_id)Fetch one GLPI ticket by identifier.
get_ticket_context(ticket_id)Return one aggregated ticket context view.
get_ticket_custom_fields(ticket_id)Return the custom-field values defined for one ticket.
get_ticket_followup(ticket_id, followup_id)Fetch one ticket followup by identifier.
get_ticket_solution(ticket_id, solution_id)Fetch one ticket solution by identifier.
get_ticket_statistics(*[, start_date, ...])Return ticket counts grouped by entity, status, priority, and type.
get_ticket_task(ticket_id, task_id)Fetch one ticket task by identifier.
get_ticket_timeline_document(ticket_id, ...)Fetch one document linked to the ticket timeline by its document ID.
get_user(user_id)Fetch one GLPI user by identifier.
get_user_activity(*[, user_id, username, ...])Return per-user GLPI activity aggregated across tickets and tasks.
iter_search_computers([rsql_filter, ...])Yield successive pages of GLPI computers until exhausted.
iter_search_contract_types([rsql_filter, ...])Yield successive pages of GLPI contract types until exhausted.
iter_search_contracts([rsql_filter, ...])Yield successive pages of GLPI contracts until exhausted.
iter_search_documents([rsql_filter, batch_size])Yield successive pages of GLPI documents until exhausted.
iter_search_entities([rsql_filter, batch_size])Yield successive pages of GLPI entities until exhausted.
iter_search_kb_articles([rsql_filter, ...])Yield successive pages of GLPI knowledge base articles until exhausted.
iter_search_kb_categories([rsql_filter, ...])Yield successive pages of GLPI knowledge base categories until exhausted.
iter_search_locations([rsql_filter, batch_size])Yield successive pages of GLPI locations until exhausted.
iter_search_tickets([rsql_filter, ...])Yield successive pages of GLPI tickets until exhausted.
iter_search_users([rsql_filter, batch_size, ...])Yield successive pages of GLPI users until exhausted.
link_computer_contract(computer_id, link)Link one GLPI contract to one computer.
link_ticket_timeline_document(ticket_id, ...)Link an existing GLPI document to one ticket timeline.
list_computer_contracts(computer_id, *[, ...])List the contracts linked to one GLPI computer.
list_contract_costs(contract_id, *[, limit, ...])List the cost lines recorded against one GLPI contract.
list_item_plugin_field_rows(itemtype, ...)List the value rows of one container for one parent item.
list_kb_article_comments(article_id)List every comment attached to one knowledge base article.
list_kb_article_revisions(article_id, *[, ...])List revisions of one knowledge base article.
list_plugin_fields_containers([itemtype])List
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_computers([rsql_filter, limit, ...])Search GLPI computers with an optional RSQL filter.
search_contract_types([rsql_filter, limit, ...])Search GLPI contract types with an optional RSQL filter.
search_contracts([rsql_filter, limit, ...])Search GLPI contracts with an optional RSQL filter.
search_documents([rsql_filter, limit, start])Search GLPI documents with an optional raw RSQL filter.
search_entities([rsql_filter, limit, start])Search GLPI entities with an optional RSQL filter.
search_kb_articles([rsql_filter, limit, ...])Search GLPI knowledge base articles with an optional RSQL filter.
search_kb_categories([rsql_filter, limit, ...])Search GLPI knowledge base categories with an optional RSQL filter.
search_locations([rsql_filter, limit, start])Search GLPI locations with an optional RSQL filter.
search_tickets([rsql_filter, limit, start, ...])Search GLPI tickets with an optional RSQL filter.
search_users([rsql_filter, limit, start, ...])Search GLPI users with an optional RSQL filter.
set_kb_article_categories(article_id, ...)Set the categories of one knowledge base article.
set_ticket_custom_fields(ticket_id, values)Persist custom-field values on one ticket.
stream_document_content(document_id, *[, ...])Stream the binary payload of one GLPI document in chunks.
unlink_computer_contract(computer_id, link_id, *)Remove one contract link from a GLPI computer.
unlink_ticket_timeline_document(ticket_id, ...)Unlink one timeline document from a ticket.
update_computer(computer_id, computer)Update one GLPI computer with a partial body.
update_computer_contract(computer_id, ...)Update one computer-contract link with a partial body.
update_contract(contract_id, contract)Update one GLPI contract with a partial body.
update_contract_cost(contract_id, cost_id, cost)Update one contract cost line with a partial body.
update_contract_type(contract_type_id, ...)Update one GLPI contract type with a partial body.
update_document(document_id, document)Update one GLPI document with a partial body.
update_entity(entity_id, entity)Update one GLPI entity with a partial body.
update_item_plugin_field_row(*, itemtype, ...)Update one existing plugin-fields value row.
update_kb_article(article_id, article)Update one knowledge base article with a partial body.
update_kb_article_comment(article_id, ...)Update one knowledge base article comment with a partial body.
update_kb_category(category_id, category)Update one knowledge base category with a partial body.
update_location(location_id, location)Update one GLPI location with a partial body.
update_ticket(ticket_id, ticket)Update one GLPI ticket with a partial body.
update_ticket_followup(ticket_id, ...)Update one ticket followup with a partial body.
update_ticket_solution(ticket_id, ...)Update one ticket solution with a partial body.
update_ticket_task(ticket_id, task_id, task)Update one ticket task with a partial body.
update_ticket_timeline_document(ticket_id, ...)Update one timeline document link with a partial body.
update_user(user_id, user)Update one GLPI user with a partial body.
upload_document(*, filename, content[, ...])Upload one binary document via the legacy v1 multipart endpoint.
Build the shared resources for a GLPI client.
- Parameters:
- glpi_api_url
str Base URL of the GLPI v2 REST API, e.g.
https://glpi.example.com/api.php/v2.- server_timezone
str|tzinfo IANA name of the timezone the GLPI server runs in (e.g.
"Europe/Paris"), or atzinfo. Required: GLPI does not advertise it, and it governs both directions of every timestamp the client exchanges.Reading, it interprets the timestamps the server sends without an offset. Writing, it is what makes an aware
datetimearrive as the moment it names: GLPI reads the naive prefix of a timestamp and discards the offset, so the value has to be converted onto the server’s clock before it is sent. Measured on a live instance, offsets from-08:00to+14:00written to one field all stored the same wall clock.There is no default because every candidate is wrong somewhere – guessing UTC against a Europe/Paris instance shifts those timestamps by an hour or two and never raises. Prefer a name over a fixed offset: a name follows DST, and one instance emits both
+01:00and+02:00.- client_id
str|None,optional OAuth client identifier used to obtain access tokens.
- client_secret
str|None,optional OAuth client secret paired with
client_id.- username
str|None,optional GLPI account username used for the OAuth password grant.
- password
str|None,optional GLPI account password used for the OAuth password grant.
- glpi_entity
int|None,optional Default
GLPI-Entityheader sent with each request.- glpi_profile
int|None,optional Default
GLPI-Profileheader sent with each request.- entity_recursivebool,
optional When
TruetheGLPI-Entity-Recursiveheader is sent so entity scope includes child entities.- language
str,optional Default
Accept-Languageheader value (e.g."en_GB").- verify_sslbool,
optional Whether the HTTP session verifies the server certificate.
- auth_token_refresh
int|None,optional Number of seconds before token expiry at which the auth manager proactively refreshes the access token.
- v1_base_url
str|None,optional Base URL of the legacy GLPI v1 API used as a fallback for binary document uploads and the Fields plugin endpoints.
- v1_user_token
str|None,optional user_tokenfor the v1 fallback session.- v1_app_token
str|None,optional app_tokenfor the v1 fallback session.
- glpi_api_url
- Parameters:
glpi_api_url (str)
server_timezone (str | tzinfo)
client_id (str | None)
client_secret (str | None)
username (str | None)
password (str | None)
glpi_entity (int | None)
glpi_profile (int | None)
entity_recursive (bool)
language (str)
verify_ssl (bool)
auth_token_refresh (int | None)
v1_base_url (str | None)
v1_user_token (str | None)
v1_app_token (str | None)
Methods
add_ticket_team_member(ticket_id, member)Add one team member to a ticket.
close()Release every resource owned by the client.
create_computer(computer)Create one GLPI computer.
create_contract(contract)Create one GLPI contract.
create_contract_cost(contract_id, cost)Create one cost line against a GLPI contract.
create_contract_type(contract_type)Create one GLPI contract type.
create_document(document)Create one GLPI document metadata record.
create_entity(entity)Create one GLPI entity.
create_item_plugin_field_row(*, itemtype, ...)Create one fresh plugin-fields value row.
create_kb_article(article)Create one knowledge base article and return its new identifier.
create_kb_article_comment(article_id, comment)Create one comment on a knowledge base article.
create_kb_category(category)Create one knowledge base category and return its new identifier.
create_location(location)Create one GLPI location.
create_ticket(ticket)Create one GLPI ticket.
create_ticket_followup(ticket_id, followup)Create one followup on a ticket.
create_ticket_solution(ticket_id, solution)Create one solution on a ticket.
create_ticket_task(ticket_id, task)Create one task on a ticket.
create_user(user)Create one GLPI user.
delete_computer(computer_id, *[, force])Delete one GLPI computer by identifier.
delete_contract(contract_id, *[, force])Delete one GLPI contract by identifier.
delete_contract_cost(contract_id, cost_id, *)Delete one cost line from a GLPI contract.
delete_contract_type(contract_type_id, *[, ...])Delete one GLPI contract type by identifier.
delete_document(document_id, *[, force])Delete one GLPI document by identifier.
delete_entity(entity_id, *[, force])Delete one GLPI entity by identifier.
delete_kb_article(article_id, *[, force])Delete one knowledge base article by identifier.
delete_kb_article_comment(article_id, ...[, ...])Delete one knowledge base article comment by identifier.
delete_kb_category(category_id, *[, force])Delete one knowledge base category by identifier.
delete_location(location_id, *[, force])Delete one GLPI location by identifier.
delete_ticket(ticket_id, *[, force])Delete one GLPI ticket by identifier.
delete_ticket_followup(ticket_id, followup_id, *)Delete one ticket followup by identifier.
delete_ticket_solution(ticket_id, solution_id, *)Delete one ticket solution by identifier.
delete_ticket_task(ticket_id, task_id, *[, ...])Delete one ticket task by identifier.
delete_user(user_id, *[, force])Delete one GLPI user by identifier.
download_document_content(document_id)Download the raw binary payload for one GLPI document.
find_user_by_email(email, *[, rsql_filter, ...])Return the first user holding
email, orNone.from_env(*[, env, prefix])Build a client instance from environment variables.
get_computer(computer_id)Fetch one GLPI computer by identifier.
get_computer_contract(computer_id, link_id)Fetch one contract link recorded against a GLPI computer.
get_contract(contract_id)Fetch one GLPI contract by identifier.
get_contract_cost(contract_id, cost_id)Fetch one cost line recorded against a GLPI contract.
get_contract_type(contract_type_id)Fetch one GLPI contract type by identifier.
get_document(document_id)Fetch one GLPI document by identifier.
get_entity(entity_id)Fetch one GLPI entity by identifier.
get_kb_article(article_id)Fetch one knowledge base article by identifier.
get_kb_article_comment(article_id, comment_id)Fetch one knowledge base article comment by identifier.
get_kb_article_revision(article_id, revision, *)Fetch one revision of a knowledge base article by revision number.
get_kb_category(category_id)Fetch one knowledge base category by identifier.
get_location(location_id)Fetch one GLPI location by identifier.
get_task_durations(*[, start_date, ...])Return task duration totals with optional per-task detail.
get_task_statistics(ticket_ids)Return task duration totals grouped by user and ticket.
get_ticket(ticket_id)Fetch one GLPI ticket by identifier.
get_ticket_context(ticket_id)Return one aggregated ticket context view.
get_ticket_custom_fields(ticket_id)Return the custom-field values defined for one ticket.
get_ticket_followup(ticket_id, followup_id)Fetch one ticket followup by identifier.
get_ticket_solution(ticket_id, solution_id)Fetch one ticket solution by identifier.
get_ticket_statistics(*[, start_date, ...])Return ticket counts grouped by entity, status, priority, and type.
get_ticket_task(ticket_id, task_id)Fetch one ticket task by identifier.
get_ticket_timeline_document(ticket_id, ...)Fetch one document linked to the ticket timeline by its document ID.
get_user(user_id)Fetch one GLPI user by identifier.
get_user_activity(*[, user_id, username, ...])Return per-user GLPI activity aggregated across tickets and tasks.
iter_search_computers([rsql_filter, ...])Yield successive pages of GLPI computers until exhausted.
iter_search_contract_types([rsql_filter, ...])Yield successive pages of GLPI contract types until exhausted.
iter_search_contracts([rsql_filter, ...])Yield successive pages of GLPI contracts until exhausted.
iter_search_documents([rsql_filter, batch_size])Yield successive pages of GLPI documents until exhausted.
iter_search_entities([rsql_filter, batch_size])Yield successive pages of GLPI entities until exhausted.
iter_search_kb_articles([rsql_filter, ...])Yield successive pages of GLPI knowledge base articles until exhausted.
iter_search_kb_categories([rsql_filter, ...])Yield successive pages of GLPI knowledge base categories until exhausted.
iter_search_locations([rsql_filter, batch_size])Yield successive pages of GLPI locations until exhausted.
iter_search_tickets([rsql_filter, ...])Yield successive pages of GLPI tickets until exhausted.
iter_search_users([rsql_filter, batch_size, ...])Yield successive pages of GLPI users until exhausted.
link_computer_contract(computer_id, link)Link one GLPI contract to one computer.
link_ticket_timeline_document(ticket_id, ...)Link an existing GLPI document to one ticket timeline.
list_computer_contracts(computer_id, *[, ...])List the contracts linked to one GLPI computer.
list_contract_costs(contract_id, *[, limit, ...])List the cost lines recorded against one GLPI contract.
list_item_plugin_field_rows(itemtype, ...)List the value rows of one container for one parent item.
list_kb_article_comments(article_id)List every comment attached to one knowledge base article.
list_kb_article_revisions(article_id, *[, ...])List revisions of one knowledge base article.
list_plugin_fields_containers([itemtype])List
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_computers([rsql_filter, limit, ...])Search GLPI computers with an optional RSQL filter.
search_contract_types([rsql_filter, limit, ...])Search GLPI contract types with an optional RSQL filter.
search_contracts([rsql_filter, limit, ...])Search GLPI contracts with an optional RSQL filter.
search_documents([rsql_filter, limit, start])Search GLPI documents with an optional raw RSQL filter.
search_entities([rsql_filter, limit, start])Search GLPI entities with an optional RSQL filter.
search_kb_articles([rsql_filter, limit, ...])Search GLPI knowledge base articles with an optional RSQL filter.
search_kb_categories([rsql_filter, limit, ...])Search GLPI knowledge base categories with an optional RSQL filter.
search_locations([rsql_filter, limit, start])Search GLPI locations with an optional RSQL filter.
search_tickets([rsql_filter, limit, start, ...])Search GLPI tickets with an optional RSQL filter.
search_users([rsql_filter, limit, start, ...])Search GLPI users with an optional RSQL filter.
set_kb_article_categories(article_id, ...)Set the categories of one knowledge base article.
set_ticket_custom_fields(ticket_id, values)Persist custom-field values on one ticket.
stream_document_content(document_id, *[, ...])Stream the binary payload of one GLPI document in chunks.
unlink_computer_contract(computer_id, link_id, *)Remove one contract link from a GLPI computer.
unlink_ticket_timeline_document(ticket_id, ...)Unlink one timeline document from a ticket.
update_computer(computer_id, computer)Update one GLPI computer with a partial body.
update_computer_contract(computer_id, ...)Update one computer-contract link with a partial body.
update_contract(contract_id, contract)Update one GLPI contract with a partial body.
update_contract_cost(contract_id, cost_id, cost)Update one contract cost line with a partial body.
update_contract_type(contract_type_id, ...)Update one GLPI contract type with a partial body.
update_document(document_id, document)Update one GLPI document with a partial body.
update_entity(entity_id, entity)Update one GLPI entity with a partial body.
update_item_plugin_field_row(*, itemtype, ...)Update one existing plugin-fields value row.
update_kb_article(article_id, article)Update one knowledge base article with a partial body.
update_kb_article_comment(article_id, ...)Update one knowledge base article comment with a partial body.
update_kb_category(category_id, category)Update one knowledge base category with a partial body.
update_location(location_id, location)Update one GLPI location with a partial body.
update_ticket(ticket_id, ticket)Update one GLPI ticket with a partial body.
update_ticket_followup(ticket_id, ...)Update one ticket followup with a partial body.
update_ticket_solution(ticket_id, ...)Update one ticket solution with a partial body.
update_ticket_task(ticket_id, task_id, task)Update one ticket task with a partial body.
update_ticket_timeline_document(ticket_id, ...)Update one timeline document link with a partial body.
update_user(user_id, user)Update one GLPI user with a partial body.
upload_document(*, filename, content[, ...])Upload one binary document via the legacy v1 multipart endpoint.
- Raises:
GlpiValidationErrorIf the supplied configuration is incomplete or invalid (e.g. missing OAuth credentials together with no v1 fallback).
- Parameters:
glpi_api_url (str)
server_timezone (str | tzinfo)
client_id (str | None)
client_secret (str | None)
username (str | None)
password (str | None)
glpi_entity (int | None)
glpi_profile (int | None)
entity_recursive (bool)
language (str)
verify_ssl (bool)
auth_token_refresh (int | None)
v1_base_url (str | None)
v1_user_token (str | None)
v1_app_token (str | None)
- __enter__()[source]
Return the client unchanged for use in a
withblock.- Returns:
SelfThe client itself, suitable for chaining method calls.
- Return type:
- __exit__(exc_type, exc, tb)[source]
Close the client on
withblock exit.- Parameters:
- exc_type
type[BaseException] |None Exception class raised inside the
withblock, if any.- exc
BaseException|None Exception instance raised inside the block, if any.
- tb
TracebackType|None Traceback associated with
exc.
- exc_type
- Parameters:
exc_type (type[BaseException] | None)
exc (BaseException | None)
tb (TracebackType | None)
- Return type:
None
- add_ticket_team_member(ticket_id, member)
Add one team member to a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to receive the new member.
- member
PostTeamMember Request body describing the member. The
idfield is the target user/group/supplier identifier,typeis one of"User","Group"or"Supplier", androleis one of"requester","assigned"or"observer".
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- close()[source]
Release every resource owned by the client.
The shared HTTP session is closed, the optional v1 fallback session is closed, and the client is marked as closed so subsequent calls raise immediately. The method is idempotent.
- Return type:
None
- create_computer(computer)
Create one GLPI computer.
- Parameters:
- computer
PostComputer Request body describing the computer to create.
- computer
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
computer (PostComputer)
- Return type:
- create_contract(contract)
Create one GLPI contract.
- Parameters:
- contract
PostContract Request body describing the contract to create.
- contract
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
contract (PostContract)
- Return type:
- create_contract_cost(contract_id, cost)
Create one cost line against a GLPI contract.
- Parameters:
- contract_id
GlpiId Numeric identifier of the owning contract.
- cost
PostContractCost Request body describing the cost line to create.
- contract_id
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
contract_id (int)
cost (PostContractCost)
- Return type:
- create_contract_type(contract_type)
Create one GLPI contract type.
- Parameters:
- contract_type
PostContractType Request body describing the contract type to create.
- contract_type
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
contract_type (PostContractType)
- Return type:
- create_document(document)
Create one GLPI document metadata record.
Binary uploads use
upload_document()instead of the JSON metadata endpoint exposed here.- Parameters:
- document
PostDocument Request body describing the document metadata.
- document
- Returns:
intIdentifier assigned by the GLPI server to the new document.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
document (PostDocument)
- Return type:
- create_entity(entity)
Create one GLPI entity.
- Parameters:
- entity
PostEntity Request body describing the entity to create.
- entity
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
entity (PostEntity)
- Return type:
- create_item_plugin_field_row(*, itemtype, items_id, container_id, container_name, values, entities_id=None)
Create one fresh plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item the row is attached to.
- container_id
int Identifier of the originating
GetPluginFieldsContainer.- container_name
str Internal name of the container, used to derive the value itemtype.
- values
dict[str,object] Field-name → value mapping for the dynamic columns declared on the container.
- entities_id
int|None,optional Entity to associate the row with. When omitted the GLPI server applies its default scope.
- itemtype
- Returns:
intIdentifier of the newly created row.
- Parameters:
- Return type:
- create_kb_article(article)
Create one knowledge base article and return its new identifier.
When
article.categoriesis a non-empty list, the categories are applied through the legacy fallback (set_kb_article_categories()) because the v2 API cannot write them; this requires a configured v1 session.Noneor an empty list is skipped — a freshly created article has no categories to clear — so callers that omit categories never need a v1 session. The v2 create is not undone if the category assignment fails: the article already exists, so the failure raises aRuntimeErrornaming the new article id (chaining the original error) and leaves the article in place for you to re-assign categories.- Parameters:
article (PostKBArticle)
- Return type:
- create_kb_article_comment(article_id, comment)
Create one comment on a knowledge base article.
- Parameters:
article_id (int)
comment (PostKBArticleComment)
- Return type:
- create_kb_category(category)
Create one knowledge base category and return its new identifier.
- Parameters:
category (PostKBCategory)
- Return type:
- create_location(location)
Create one GLPI location.
- Parameters:
- location
PostLocation Request body describing the location to create.
- location
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
location (PostLocation)
- Return type:
- create_ticket(ticket)
Create one GLPI ticket.
- Parameters:
- ticket
PostTicket Request body describing the ticket to create. Any extra fields are forwarded verbatim through
extra_payload.
- ticket
- Returns:
intIdentifier assigned by the GLPI server to the new ticket.
- Raises:
GlpiStatusErrorIf the HTTP status is not success.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket (PostTicket)
- Return type:
- create_ticket_followup(ticket_id, followup)
Create one followup on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup
PostFollowup Request body describing the followup to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new followup.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
followup (PostFollowup)
- Return type:
- create_ticket_solution(ticket_id, solution)
Create one solution on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution
PostSolution Request body describing the solution to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new solution.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
solution (PostSolution)
- Return type:
- create_ticket_task(ticket_id, task)
Create one task on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task
PostTicketTask Request body describing the task to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new task.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
task (PostTicketTask)
- Return type:
- create_user(user)
Create one GLPI user.
- Parameters:
- user
PostUser Request body describing the user to create.
- user
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
user (PostUser)
- Return type:
- delete_computer(computer_id, *, force=None)
Delete one GLPI computer by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_contract(contract_id, *, force=None)
Delete one GLPI contract by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_contract_cost(contract_id, cost_id, *, force=None)
Delete one cost line from a GLPI contract.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_contract_type(contract_type_id, *, force=None)
Delete one GLPI contract type by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_document(document_id, *, force=None)
Delete one GLPI document by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_entity(entity_id, *, force=None)
Delete one GLPI entity by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_kb_article(article_id, *, force=None)
Delete one knowledge base article by identifier.
- delete_kb_article_comment(article_id, comment_id, *, force=None)
Delete one knowledge base article comment by identifier.
- delete_kb_category(category_id, *, force=None)
Delete one knowledge base category by identifier.
- delete_location(location_id, *, force=None)
Delete one GLPI location by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket(ticket_id, *, force=None)
Delete one GLPI ticket by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket_followup(ticket_id, followup_id, *, force=None)
Delete one ticket followup by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket_solution(ticket_id, solution_id, *, force=None)
Delete one ticket solution by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket_task(ticket_id, task_id, *, force=None)
Delete one ticket task by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_user(user_id, *, force=None)
Delete one GLPI user by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- download_document_content(document_id)
Download the raw binary payload for one GLPI document.
- Parameters:
- document_id
GlpiId Numeric identifier of the document whose binary content is requested.
- document_id
- Returns:
bytesRaw bytes returned by the GLPI download endpoint.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- find_user_by_email(email, *, rsql_filter='', batch_size=100, skip_entity=True)
Return the first user holding
email, orNone.This scans. GLPI exposes e-mail addresses as
User.emails, a nested array, and the v2 filter engine cannot join a nested array – the structurally identicalTicket.teamanswers HTTP 500 for its declared subfields and is silently ignored for every other spelling. So there is no server-side e-mail filter to use, and the addresses have to be compared client-side.Nothing about that is cheap: the scan costs one request per
batch_sizeusers until it matches, so it is meant for occasional resolution, not for a per-request lookup. Narrow it withrsql_filterwhen you can ("is_active==true"is the usual one), and cache the resulting id rather than calling this again.A server-side fast path is deliberately not attempted. GLPI v2 ignores a filter field it does not recognise and answers with the whole unfiltered table, so a guessed e-mail filter would not fail – it would return a plausible non-empty page whose first row is the wrong person. Guessing is the one thing this helper exists to stop each caller doing separately.
- Parameters:
- email
str Address to look for. Compared case-insensitively after trimming surrounding whitespace, the way mail systems treat it.
- rsql_filter
str,optional Raw RSQL filter narrowing the population scanned. Empty by default, which scans every visible user.
- batch_size
int,optional Users fetched per request while scanning (defaults to 100).
- skip_entitybool,
optional When
True(the default) theGLPI-Entityheader is omitted so the scan spans every entity the caller can see. A user whose account lives outside the client’s configured entity is invisible otherwise, and the helper would answerNonefor somebody who exists.
- email
- Returns:
- Raises:
GlpiValidationErrorIf
emailis blank – which would otherwise scan the whole directory and match nothing.
- Parameters:
- Return type:
GetUser | None
- classmethod from_env(*, env=None, prefix='GLPI_', **overrides)
Build a client instance from environment variables.
The variables follow the conventional
<PREFIX><NAME>naming (GLPI_API_URL,GLPI_CLIENT_ID,GLPI_CLIENT_SECRET,GLPI_USERNAME,GLPI_PASSWORD,GLPI_VERIFY_SSL,GLPI_V1_BASE_URL,GLPI_V1_USER_TOKEN,GLPI_V1_APP_TOKEN,GLPI_ENTITY,GLPI_PROFILE,GLPI_ENTITY_RECURSIVE,GLPI_LANGUAGE,GLPI_AUTH_TOKEN_REFRESH,GLPI_SERVER_TIMEZONE).- Parameters:
- Returns:
SelfA fully configured client ready to perform requests.
- Raises:
GlpiValidationErrorIf the resolved configuration is missing a required field.
- Parameters:
- Return type:
Self
- get_computer(computer_id)
Fetch one GLPI computer by identifier.
- Parameters:
- computer_id
GlpiId Numeric identifier of the computer to retrieve.
- computer_id
- Returns:
GetComputerValidated computer payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
computer_id (int)
- Return type:
- get_computer_contract(computer_id, link_id)
Fetch one contract link recorded against a GLPI computer.
- Parameters:
- computer_id
GlpiId Numeric identifier of the owning computer.
- link_id
GlpiId Numeric identifier of the contract link to retrieve.
- computer_id
- Returns:
GetContractItemValidated contract link payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_contract(contract_id)
Fetch one GLPI contract by identifier.
- Parameters:
- contract_id
GlpiId Numeric identifier of the contract to retrieve.
- contract_id
- Returns:
GetContractValidated contract payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_id (int)
- Return type:
- get_contract_cost(contract_id, cost_id)
Fetch one cost line recorded against a GLPI contract.
- Parameters:
- contract_id
GlpiId Numeric identifier of the owning contract.
- cost_id
GlpiId Numeric identifier of the cost line to retrieve.
- contract_id
- Returns:
GetContractCostValidated cost line payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_contract_type(contract_type_id)
Fetch one GLPI contract type by identifier.
- Parameters:
- contract_type_id
GlpiId Numeric identifier of the contract type to retrieve.
- contract_type_id
- Returns:
GetContractTypeValidated contract type payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_type_id (int)
- Return type:
- get_document(document_id)
Fetch one GLPI document by identifier.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to retrieve.
- document_id
- Returns:
GetDocumentValidated document metadata payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- get_entity(entity_id)
Fetch one GLPI entity by identifier.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to retrieve.
- entity_id
- Returns:
GetEntityValidated entity payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
- Return type:
- get_kb_article(article_id)
Fetch one knowledge base article by identifier.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
article_id (int)
- Return type:
- get_kb_article_comment(article_id, comment_id)
Fetch one knowledge base article comment by identifier.
- Parameters:
- Return type:
- get_kb_article_revision(article_id, revision, *, language=None)
Fetch one revision of a knowledge base article by revision number.
- Parameters:
- Return type:
- get_kb_category(category_id)
Fetch one knowledge base category by identifier.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
category_id (int)
- Return type:
- get_location(location_id)
Fetch one GLPI location by identifier.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to retrieve.
- location_id
- Returns:
GetLocationValidated location payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
- Return type:
- get_task_durations(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, user_id=None, user_editor_id=None, user_recipient_id=None, extra_filter=None, return_task_details=False)
Return task duration totals with optional per-task detail.
Builds an RSQL filter from the supplied parameters, collects all matching tickets by iterating
iter_search_tickets(), computesduration_by_entityby groupingget_task_statistics()results against the per-ticket entity map, and optionally returns a flat list of individual task records.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00). Defaults toend_date - default_days + 1when omitted.- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (defaults to 30 and must be a positive integer).- entity_id
int|None,optional Restrict to tickets in this entity.
- entity_name
str|None,optional Resolve entity by name and restrict to matched entities (ignored when
entity_idis given).- user_id
int|None,optional Restrict to tickets where the user is an assignee or requester (OR semantics across both roles).
- user_editor_id
int|None,optional Restrict to tickets last updated by this user.
- user_recipient_id
int|None,optional Restrict to tickets where this user is the requester.
- extra_filter
str|None,optional Optional raw RSQL fragment appended as an AND clause.
- return_task_detailsbool,
optional When
True, include ataskslist of individual task records in the returned mapping (defaultFalse).
- start_date
- Returns:
TaskDurationsResultMapping with
start_date,end_date,total_duration,task_count,duration_by_user,duration_by_entity, andtasks(Nonewhenreturn_task_details=False).
- Raises:
GlpiValidationErrorIf
default_days < 1,start_date/end_dateis not a valid ISO date, orstart_dateis afterend_date.
- Parameters:
- Return type:
TaskDurationsResult
- get_task_statistics(ticket_ids)
Return task duration totals grouped by user and ticket.
The helper expects a list of ticket identifiers because GLPI does not publish a global task collection endpoint. Callers typically gather the relevant ticket identifiers through
search_ticketsfirst.- Parameters:
- Returns:
TaskStatisticsResultMapping with
ticket_count,task_count,total_duration,duration_by_user, andduration_by_ticketentries (durations are integer seconds, matching the GLPIdurationfield).
- Parameters:
- Return type:
TaskStatisticsResult
- get_ticket(ticket_id)
Fetch one GLPI ticket by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to retrieve.
- ticket_id
- Returns:
GetTicketValidated ticket payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- get_ticket_context(ticket_id)
Return one aggregated ticket context view.
The primary ticket fetch and the four timeline list calls are issued through
gather: concurrently on the async surface, sequentially on the generated sync one.- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to assemble.
- ticket_id
- Returns:
GlpiTicketContextAggregated view bundling the primary ticket together with its tasks, followups, solutions, and timeline document links.
- Raises:
GlpiStatusErrorIf any of the underlying GLPI calls returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- get_ticket_custom_fields(ticket_id)
Return the custom-field values defined for one ticket.
The result is a nested mapping shaped as
{container_name: {field_name: value, ...}}. Containers that do not yet have a persisted value row for the ticket are skipped.
- get_ticket_followup(ticket_id, followup_id)
Fetch one ticket followup by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to retrieve.
- ticket_id
- Returns:
GetFollowupValidated followup payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_ticket_solution(ticket_id, solution_id)
Fetch one ticket solution by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to retrieve.
- ticket_id
- Returns:
GetSolutionValidated solution payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_ticket_statistics(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, extra_filter=None)
Return ticket counts grouped by entity, status, priority, and type.
The date window is applied to the GLPI
date_creationfield and results are aggregated locally in Python. Returned identifiers are the raw GLPI numeric values that callers can resolve with the dedicatedsearch_*helpers when human labels are needed.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00). Defaults toend_date - default_days + 1when omitted.- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (defaults to 30 and must be a positive integer).- entity_id
int|None,optional When provided, restricts results to tickets belonging to the entity with this GLPI identifier.
- entity_name
str|None,optional When provided (and
entity_idisNone), the name is resolved viasearch_entitiesand the matched entity IDs are used to filter tickets. If no entity matches,{"entities": {}}is returned immediately.- extra_filter
str|None,optional Optional raw RSQL fragment to
ANDwith the date window on the server side.
- start_date
- Returns:
- Raises:
GlpiValidationErrorIf
default_days < 1,start_date/end_dateis not a valid ISO date, orstart_dateis afterend_date.
- Parameters:
- Return type:
- get_ticket_task(ticket_id, task_id)
Fetch one ticket task by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to retrieve.
- ticket_id
- Returns:
GetTicketTaskValidated task payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_ticket_timeline_document(ticket_id, document_link_id)
Fetch one document linked to the ticket timeline by its document ID.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the linked document to retrieve.
- ticket_id
- Returns:
GetDocumentValidated document payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_user(user_id)
Fetch one GLPI user by identifier.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to retrieve.
- user_id
- Returns:
GetUserValidated user payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
user_id (int)
- Return type:
- get_user_activity(*, user_id=None, username=None, realname=None, firstname=None, start_date=None, end_date=None, default_days=30)
Return per-user GLPI activity aggregated across tickets and tasks.
Aggregates tickets where each matched user is an assignee, tickets where the user is a requester, and task durations over the requested date window. When multiple users resolve to the same display key their results are merged.
- Parameters:
- user_id
int|None,optional Identify the user by GLPI numeric identifier.
- username
str|None,optional Filter by username (substring match).
- realname
str|None,optional Filter by family name (substring match).
- firstname
str|None,optional Filter by given name (substring match).
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the activity window (inclusive from 00:00:00).- end_date
str|None,optional ISO
YYYY-MM-DDend of the activity window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (default 30).
- user_id
- Returns:
UserActivityResultMapping with one
userskey. Each user key maps to aUserActivityEntrywithuser_ids,tickets_as_technician,tickets_as_recipient, andtask_durations.
- Raises:
GlpiValidationErrorIf none of
user_id,username,realname, orfirstnameare supplied, or if the supplied criteria match no GLPI users.
- Parameters:
- Return type:
UserActivityResult
- iter_search_computers(rsql_filter='', *, batch_size=50, sort=None)
Yield successive pages of GLPI computers until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_computers()call.- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_mod:desc". Forwarded to each page request; omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Yields:
list[GetComputer]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_contract_types(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI contract types until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_contract_types()call.
- rsql_filter
- Yields:
list[GetContractType]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_contracts(rsql_filter='', *, batch_size=50, sort=None)
Yield successive pages of GLPI contracts until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_contracts()call.- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_begin:desc". Forwarded to each page request; omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Yields:
list[GetContract]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_documents(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI documents until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_documents()call.
- rsql_filter
- Yields:
list[GetDocument]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_entities(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI entities until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page. Entity calls bypass theGLPI-Entityheader so cross-entity lookups remain possible.- Parameters:
- Yields:
- Parameters:
- Return type:
- iter_search_kb_articles(rsql_filter='', *, batch_size=50, sort=None, language=None)
Yield successive pages of GLPI knowledge base articles until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_kb_articles()call.- sort
str|None,optional sortquery parameter forwarded to each page request, spelledfieldorfield:direction(e.g."date_mod:desc"). A space before the direction answers HTTP 400.- language
str|None,optional GLPI language code forwarded to each page request to select a translated view.
- rsql_filter
- Yields:
list[GetKBArticle]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_kb_categories(rsql_filter='', *, batch_size=50, sort=None, language=None)
Yield successive pages of GLPI knowledge base categories until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_kb_categories()call.- sort
str|None,optional sortquery parameter forwarded to each page request, spelledfieldorfield:direction(e.g."date_mod:desc"). A space before the direction answers HTTP 400.- language
str|None,optional GLPI language code forwarded to each page request to select a translated view.
- rsql_filter
- Yields:
list[GetKBCategory]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_locations(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI locations until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_locations()call.
- rsql_filter
- Yields:
list[GetLocation]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- iter_search_tickets(rsql_filter='', *, batch_size=50, sort=None, fields=())
Yield successive pages of GLPI tickets until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible ticket.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_tickets()call.- sort
str|None,optional sortquery parameter forwarded to each page request, spelledfieldorfield:direction(e.g."date_mod:desc"). A space before the direction answers HTTP 400.- fields
tuple[str, …],optional Restricted set of contract field names to request.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- iter_search_users(rsql_filter='', *, batch_size=50, skip_entity=False)
Yield successive pages of GLPI users until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible user.- batch_size
int,optional Number of records requested per page (default 50).
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- link_computer_contract(computer_id, link)
Link one GLPI contract to one computer.
The
itemtypeanditems_idfields are set fromcomputer_idrather than taken fromlink. The GLPI contract typesitemtypeas a free string, so a caller-supplied value is a silent mis-link waiting to happen; this helper already knows which asset it is working on.- Parameters:
- computer_id
GlpiId Numeric identifier of the computer the contract covers.
- link
PostContractItem Request body naming the contract to link. Any
itemtypeoritems_idset on it is replaced.
- computer_id
- Returns:
intIdentifier assigned to the new link by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
computer_id (int)
link (PostContractItem)
- Return type:
- link_ticket_timeline_document(ticket_id, document_link)
Link an existing GLPI document to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link
PostTimelineDocument Request body describing the link (typically the timeline position; document and ticket identifiers are inferred from the URL).
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new link.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
document_link (PostTimelineDocument)
- Return type:
- list_computer_contracts(computer_id, *, limit=50, start=0)
List the contracts linked to one GLPI computer.
- Parameters:
- Returns:
list[GetContractItem]Contract links belonging to the computer.
- Parameters:
- Return type:
- list_contract_costs(contract_id, *, limit=50, start=0)
List the cost lines recorded against one GLPI contract.
- Parameters:
- Returns:
list[GetContractCost]Cost lines belonging to the contract.
- Parameters:
- Return type:
- list_item_plugin_field_rows(itemtype, items_id, container_name)
List the value rows of one container for one parent item.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item.
- container_name
str Internal name of the container as exposed by
GetPluginFieldsContainer.name.
- itemtype
- Returns:
list[GetPluginFieldsValueRow]Zero or one row depending on whether the plugin has already persisted any value for this item.
- Parameters:
- Return type:
- list_kb_article_comments(article_id)
List every comment attached to one knowledge base article.
- Parameters:
article_id (int)
- Return type:
- list_kb_article_revisions(article_id, *, language=None)
List revisions of one knowledge base article.
- list_plugin_fields_containers(itemtype=None)
List
PluginFieldsContainerrows registered on the server.- Parameters:
- Returns:
list[GetPluginFieldsContainer]Containers visible to the authenticated user.
- Parameters:
itemtype (str | None)
- Return type:
- list_plugin_fields_fields(container_id=None)
List
PluginFieldsFielddeclarations.- Parameters:
- Returns:
list[GetPluginFieldsField]Field declarations visible to the authenticated user.
- Parameters:
container_id (int | None)
- Return type:
- list_ticket_followups(ticket_id)
List all followups linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetFollowup]Followups returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_solutions(ticket_id)
List all solutions linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetSolution]Solutions returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_tasks(ticket_id)
List all tasks linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetTicketTask]Tasks returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_team_members(ticket_id)
List the team members currently linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket whose team members are listed.
- ticket_id
- Returns:
list[GetTeamMember]Team members validated against the contract
TeamMemberschema.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_timeline_documents(ticket_id)
List all documents linked to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetDocument]Document records returned by the GLPI server. The live API wraps each entry in a
{"type": "Document_Item", "item": {...}}envelope whoseitemvalue is a fullDocumentrecord; the envelope is unwrapped automatically.
- Parameters:
ticket_id (int)
- Return type:
- remove_ticket_team_member(ticket_id, member)
Remove one team member from a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket the member belongs to.
- member
PostTeamMember Request body identifying the member to remove (same shape as
add_ticket_team_member()).
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- search_computers(rsql_filter='', *, limit=50, start=0, sort=None)
Search GLPI computers with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_mod:desc". Omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Returns:
list[GetComputer]Computers matching the filter.
- Parameters:
- Return type:
- search_contract_types(rsql_filter='', *, limit=50, start=0)
Search GLPI contract types with an optional RSQL filter.
- Parameters:
- Returns:
list[GetContractType]Contract types matching the filter.
- Parameters:
- Return type:
- search_contracts(rsql_filter='', *, limit=50, start=0, sort=None)
Search GLPI contracts with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_begin:desc". Omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Returns:
list[GetContract]Contracts matching the filter.
- Parameters:
- Return type:
- search_documents(rsql_filter='', *, limit=50, start=0)
Search GLPI documents with an optional raw RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL expression forwarded to the
filterquery parameter (for example"name=='*manual*'"). When empty the parameter is omitted and the server returns its default paginated listing.- limit
int,optional Maximum number of records to return (defaults to 50).
- start
int,optional Zero-based offset for pagination (defaults to 0).
- rsql_filter
- Returns:
list[GetDocument]Documents matching the filter window.
- Parameters:
- Return type:
- search_entities(rsql_filter='', *, limit=50, start=0)
Search GLPI entities with an optional RSQL filter.
- Parameters:
- Returns:
- Parameters:
- Return type:
- search_kb_articles(rsql_filter='', *, limit=50, start=0, sort=None, language=None)
Search GLPI knowledge base articles with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter, spelledfieldorfield:direction(e.g."date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a barefieldsorts ascending, and a separateorderparameter is ignored.- language
str|None,optional GLPI language code forwarded as the
languagequery parameter to select a translated view.
- rsql_filter
- Returns:
list[GetKBArticle]Articles matching the filter.
- Parameters:
- Return type:
- search_kb_categories(rsql_filter='', *, limit=50, start=0, sort=None, language=None)
Search GLPI knowledge base categories with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter, spelledfieldorfield:direction(e.g."name:asc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a barefieldsorts ascending, and a separateorderparameter is ignored.- language
str|None,optional GLPI language code forwarded as the
languagequery parameter to select a translated view.
- rsql_filter
- Returns:
list[GetKBCategory]Categories matching the filter.
- Parameters:
- Return type:
- search_locations(rsql_filter='', *, limit=50, start=0)
Search GLPI locations with an optional RSQL filter.
- Parameters:
- Returns:
list[GetLocation]Locations matching the filter.
- Parameters:
- Return type:
- search_tickets(rsql_filter='', *, limit=50, start=0, sort=None, fields=())
Search GLPI tickets with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter (for example"name==hello"or"status==2"). Empty by default, which lists every visible ticket.- limit
int,optional Maximum number of records returned by the GLPI server in one request.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter, spelledfieldorfield:direction(e.g."date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a barefieldsorts ascending, and a separateorderparameter is ignored.- fields
tuple[str, …],optional Restricted set of contract field names to request. Empty tuple lets the GLPI server pick its default field set.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- search_users(rsql_filter='', *, limit=50, start=0, skip_entity=False)
Search GLPI users with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter, for example"username==alice". Empty by default.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- server_timezone: tzinfo
- set_kb_article_categories(article_id, category_ids)
Set the categories of one knowledge base article.
GLPI 11 stores KB categories as a many-to-many relationship that the v2 API exposes as read-only (
KBArticle.categories[].idisreadOnly), so it silently drops category writes. This helper sets the underlying_categoriesfield through the legacy v1 API, which requiresv1_base_url/v1_user_tokento be configured (pointing at the legacyapirest.php).The supplied ids REPLACE the article’s full category set; passing an empty sequence clears every category. Category ids are not validated against the server — an unknown id simply is not linked.
- Raises:
RuntimeErrorWhen no legacy v1 session is configured on the client.
GlpiStatusErrorWhen the legacy API returns a non-success status.
- Parameters:
- Return type:
None
- set_ticket_custom_fields(ticket_id, values)
Persist custom-field values on one ticket.
Existing value rows are updated in place; missing rows are created with the supplied payload. Containers/fields that the server does not know about raise
GlpiValidationErrorbefore any write to keep the call atomic from the caller’s perspective.- Parameters:
- ticket_id
int Identifier of the ticket whose custom values must be set.
- values
dict[str,dict[str,Any]] Nested mapping
{container_name: {field_name: value}}describing the columns to write. Container and field names must match whatlist_plugin_fields_containers()andlist_plugin_fields_fields()return.
- ticket_id
- Parameters:
- Return type:
None
- stream_document_content(document_id, *, chunk_size=65536)
Stream the binary payload of one GLPI document in chunks.
Use this instead of
download_document_content()when the file may be large: that method holds the whole body in memory before returning, so a 500 MB attachment costs 500 MB of process memory even if the caller only writes it straight to disk.- Parameters:
- document_id
GlpiId Numeric identifier of the document whose binary content is requested.
- chunk_size
int,optional Bytes requested per chunk (defaults to 64 KiB).
- document_id
- Yields:
bytesSuccessive chunks of the document body. The final chunk may be shorter than
chunk_size.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
Examples
Writing a document to disk without buffering it:
with open("attachment.pdf", "wb") as handle: async for chunk in client.stream_document_content(42): handle.write(chunk)
- unlink_computer_contract(computer_id, link_id, *, force=None)
Remove one contract link from a GLPI computer.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- unlink_ticket_timeline_document(ticket_id, document_link_id, *, force=None)
Unlink one timeline document from a ticket.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- update_computer(computer_id, computer)
Update one GLPI computer with a partial body.
- Parameters:
- computer_id
GlpiId Numeric identifier of the computer to update.
- computer
PatchComputer Partial request body.
- computer_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
computer_id (int)
computer (PatchComputer)
- Return type:
None
- update_computer_contract(computer_id, link_id, link)
Update one computer-contract link with a partial body.
The
itemtypeanditems_idfields are set fromcomputer_idrather than taken fromlink, for the same reason aslink_computer_contract().- Parameters:
- computer_id
GlpiId Numeric identifier of the owning computer.
- link_id
GlpiId Numeric identifier of the contract link to update.
- link
PatchContractItem Partial request body. Any
itemtypeoritems_idset on it is replaced.
- computer_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
computer_id (int)
link_id (int)
link (PatchContractItem)
- Return type:
None
- update_contract(contract_id, contract)
Update one GLPI contract with a partial body.
- Parameters:
- contract_id
GlpiId Numeric identifier of the contract to update.
- contract
PatchContract Partial request body.
- contract_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_id (int)
contract (PatchContract)
- Return type:
None
- update_contract_cost(contract_id, cost_id, cost)
Update one contract cost line with a partial body.
- Parameters:
- contract_id
GlpiId Numeric identifier of the owning contract.
- cost_id
GlpiId Numeric identifier of the cost line to update.
- cost
PatchContractCost Partial request body.
- contract_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_id (int)
cost_id (int)
cost (PatchContractCost)
- Return type:
None
- update_contract_type(contract_type_id, contract_type)
Update one GLPI contract type with a partial body.
- Parameters:
- contract_type_id
GlpiId Numeric identifier of the contract type to update.
- contract_type
PatchContractType Partial request body.
- contract_type_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_type_id (int)
contract_type (PatchContractType)
- Return type:
None
- update_document(document_id, document)
Update one GLPI document with a partial body.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to update.
- document
PatchDocument Partial request body.
- document_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
document (PatchDocument)
- Return type:
None
- update_entity(entity_id, entity)
Update one GLPI entity with a partial body.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to update.
- entity
PatchEntity Partial request body.
- entity_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
entity (PatchEntity)
- Return type:
None
- update_item_plugin_field_row(*, itemtype, container_name, row_id, values)
Update one existing plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype the container is attached to.
- container_name
str Internal name of the container.
- row_id
int Identifier of the existing value row (as returned by
list_item_plugin_field_rows()).- values
dict[str,object] Field-name → value mapping for the columns to update. Only the fields supplied here are touched; the others keep their previous value.
- itemtype
- Parameters:
- Return type:
None
- update_kb_article(article_id, article)
Update one knowledge base article with a partial body.
When
article.categoriesis provided — including an empty list to clear every category — the categories are applied through the legacy fallback (set_kb_article_categories()) after the v2 patch, because the v2 API cannot write them; this requires a configured v1 session.None(the default) leaves categories untouched. Unlike create, update is not rolled back on a category failure — the v2 field changes are already applied.- Parameters:
article_id (int)
article (PatchKBArticle)
- Return type:
None
- update_kb_article_comment(article_id, comment_id, comment)
Update one knowledge base article comment with a partial body.
- Parameters:
article_id (int)
comment_id (int)
comment (PatchKBArticleComment)
- Return type:
None
- update_kb_category(category_id, category)
Update one knowledge base category with a partial body.
- Parameters:
category_id (int)
category (PatchKBCategory)
- Return type:
None
- update_location(location_id, location)
Update one GLPI location with a partial body.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to update.
- location
PatchLocation Partial request body.
- location_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
location (PatchLocation)
- Return type:
None
- update_ticket(ticket_id, ticket)
Update one GLPI ticket with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to update.
- ticket
PatchTicket Partial request body. Only fields explicitly set are sent.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
ticket (PatchTicket)
- Return type:
None
- update_ticket_followup(ticket_id, followup_id, followup)
Update one ticket followup with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to update.
- followup
PatchFollowup Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
followup_id (int)
followup (PatchFollowup)
- Return type:
None
- update_ticket_solution(ticket_id, solution_id, solution)
Update one ticket solution with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to update.
- solution
PatchSolution Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
solution_id (int)
solution (PatchSolution)
- Return type:
None
- update_ticket_task(ticket_id, task_id, task)
Update one ticket task with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to update.
- task
PatchTicketTask Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
task_id (int)
task (PatchTicketTask)
- Return type:
None
- update_ticket_timeline_document(ticket_id, document_link_id, document_link)
Update one timeline document link with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the timeline document link to update.
- document_link
PatchTimelineDocument Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
document_link_id (int)
document_link (PatchTimelineDocument)
- Return type:
None
- update_user(user_id, user)
Update one GLPI user with a partial body.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to update.
- user
PatchUser Partial request body. Only fields explicitly set are sent.
- user_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- upload_document(*, filename, content, mime_type='application/octet-stream', document_name=None, ticket_id=None, entity_id=None)
Upload one binary document via the legacy v1 multipart endpoint.
Document uploads use the legacy v1 multipart endpoint because the GLPI v2 API does not advertise a binary upload route. The upload is dispatched through the same v1 session as every other v1 call, so it needs
v1_base_urlandv1_user_tokento be configured on the client.- Parameters:
- filename
str Name to advertise in the multipart form. Required and must be non-empty.
- content
bytes Raw binary payload to upload.
- mime_type
str,optional MIME type advertised in the multipart part (defaults to
application/octet-stream).- document_name
str|None,optional Human-readable display name. Defaults to
filenamewhen omitted.- ticket_id
int|None,optional Identifier of one ticket to attach the uploaded document to.
- entity_id
int|None,optional Identifier of one GLPI entity to scope the upload to.
- filename
- Returns:
- Raises:
GlpiValidationErrorIf
filenameis empty.RuntimeErrorIf the v1 session is not configured on the client.
- Parameters:
- Return type:
- class AsyncGlpiClient(*, glpi_api_url, server_timezone, client_id=None, client_secret=None, username=None, password=None, glpi_entity=None, glpi_profile=None, entity_recursive=False, language='en_GB', verify_ssl=True, auth_token_refresh=None, v1_base_url=None, v1_user_token=None, v1_app_token=None)[source]
Bases:
TicketMixin,TicketTaskMixin,FollowupMixin,SolutionMixin,TimelineDocumentMixin,TeamMemberMixin,DocumentMixin,ContractMixin,ComputerMixin,UserMixin,EntityMixin,LocationMixin,ContractTypeMixin,KBCategoryMixin,KBArticleMixin,KBArticleCommentMixin,KBArticleRevisionMixin,PluginFieldsMixin,TicketContextMixin,StatisticsMixin,_BaseGlpiClient,TransportMixinGLPI client backed by the contract-aligned API mixins.
The client owns the shared HTTP session, the OAuth token manager, and the optional legacy v1 session used for binary document uploads and the Fields plugin endpoints. Token acquisition is serialised by the lock from
glpi_python_client._async._concurrency, which is the right primitive for this surface – see that module for why the two surfaces cannot share one.Construction parameters and
from_env()are documented on_BaseGlpiClient.Methods
add_ticket_team_member(ticket_id, member)Add one team member to a ticket.
close()Release every resource owned by the client.
create_computer(computer)Create one GLPI computer.
create_contract(contract)Create one GLPI contract.
create_contract_cost(contract_id, cost)Create one cost line against a GLPI contract.
create_contract_type(contract_type)Create one GLPI contract type.
create_document(document)Create one GLPI document metadata record.
create_entity(entity)Create one GLPI entity.
create_item_plugin_field_row(*, itemtype, ...)Create one fresh plugin-fields value row.
create_kb_article(article)Create one knowledge base article and return its new identifier.
create_kb_article_comment(article_id, comment)Create one comment on a knowledge base article.
create_kb_category(category)Create one knowledge base category and return its new identifier.
create_location(location)Create one GLPI location.
create_ticket(ticket)Create one GLPI ticket.
create_ticket_followup(ticket_id, followup)Create one followup on a ticket.
create_ticket_solution(ticket_id, solution)Create one solution on a ticket.
create_ticket_task(ticket_id, task)Create one task on a ticket.
create_user(user)Create one GLPI user.
delete_computer(computer_id, *[, force])Delete one GLPI computer by identifier.
delete_contract(contract_id, *[, force])Delete one GLPI contract by identifier.
delete_contract_cost(contract_id, cost_id, *)Delete one cost line from a GLPI contract.
delete_contract_type(contract_type_id, *[, ...])Delete one GLPI contract type by identifier.
delete_document(document_id, *[, force])Delete one GLPI document by identifier.
delete_entity(entity_id, *[, force])Delete one GLPI entity by identifier.
delete_kb_article(article_id, *[, force])Delete one knowledge base article by identifier.
delete_kb_article_comment(article_id, ...[, ...])Delete one knowledge base article comment by identifier.
delete_kb_category(category_id, *[, force])Delete one knowledge base category by identifier.
delete_location(location_id, *[, force])Delete one GLPI location by identifier.
delete_ticket(ticket_id, *[, force])Delete one GLPI ticket by identifier.
delete_ticket_followup(ticket_id, followup_id, *)Delete one ticket followup by identifier.
delete_ticket_solution(ticket_id, solution_id, *)Delete one ticket solution by identifier.
delete_ticket_task(ticket_id, task_id, *[, ...])Delete one ticket task by identifier.
delete_user(user_id, *[, force])Delete one GLPI user by identifier.
download_document_content(document_id)Download the raw binary payload for one GLPI document.
find_user_by_email(email, *[, rsql_filter, ...])Return the first user holding
email, orNone.from_env(*[, env, prefix])Build a client instance from environment variables.
get_computer(computer_id)Fetch one GLPI computer by identifier.
get_computer_contract(computer_id, link_id)Fetch one contract link recorded against a GLPI computer.
get_contract(contract_id)Fetch one GLPI contract by identifier.
get_contract_cost(contract_id, cost_id)Fetch one cost line recorded against a GLPI contract.
get_contract_type(contract_type_id)Fetch one GLPI contract type by identifier.
get_document(document_id)Fetch one GLPI document by identifier.
get_entity(entity_id)Fetch one GLPI entity by identifier.
get_kb_article(article_id)Fetch one knowledge base article by identifier.
get_kb_article_comment(article_id, comment_id)Fetch one knowledge base article comment by identifier.
get_kb_article_revision(article_id, revision, *)Fetch one revision of a knowledge base article by revision number.
get_kb_category(category_id)Fetch one knowledge base category by identifier.
get_location(location_id)Fetch one GLPI location by identifier.
get_task_durations(*[, start_date, ...])Return task duration totals with optional per-task detail.
get_task_statistics(ticket_ids)Return task duration totals grouped by user and ticket.
get_ticket(ticket_id)Fetch one GLPI ticket by identifier.
get_ticket_context(ticket_id)Return one aggregated ticket context view.
get_ticket_custom_fields(ticket_id)Return the custom-field values defined for one ticket.
get_ticket_followup(ticket_id, followup_id)Fetch one ticket followup by identifier.
get_ticket_solution(ticket_id, solution_id)Fetch one ticket solution by identifier.
get_ticket_statistics(*[, start_date, ...])Return ticket counts grouped by entity, status, priority, and type.
get_ticket_task(ticket_id, task_id)Fetch one ticket task by identifier.
get_ticket_timeline_document(ticket_id, ...)Fetch one document linked to the ticket timeline by its document ID.
get_user(user_id)Fetch one GLPI user by identifier.
get_user_activity(*[, user_id, username, ...])Return per-user GLPI activity aggregated across tickets and tasks.
iter_search_computers([rsql_filter, ...])Yield successive pages of GLPI computers until exhausted.
iter_search_contract_types([rsql_filter, ...])Yield successive pages of GLPI contract types until exhausted.
iter_search_contracts([rsql_filter, ...])Yield successive pages of GLPI contracts until exhausted.
iter_search_documents([rsql_filter, batch_size])Yield successive pages of GLPI documents until exhausted.
iter_search_entities([rsql_filter, batch_size])Yield successive pages of GLPI entities until exhausted.
iter_search_kb_articles([rsql_filter, ...])Yield successive pages of GLPI knowledge base articles until exhausted.
iter_search_kb_categories([rsql_filter, ...])Yield successive pages of GLPI knowledge base categories until exhausted.
iter_search_locations([rsql_filter, batch_size])Yield successive pages of GLPI locations until exhausted.
iter_search_tickets([rsql_filter, ...])Yield successive pages of GLPI tickets until exhausted.
iter_search_users([rsql_filter, batch_size, ...])Yield successive pages of GLPI users until exhausted.
link_computer_contract(computer_id, link)Link one GLPI contract to one computer.
link_ticket_timeline_document(ticket_id, ...)Link an existing GLPI document to one ticket timeline.
list_computer_contracts(computer_id, *[, ...])List the contracts linked to one GLPI computer.
list_contract_costs(contract_id, *[, limit, ...])List the cost lines recorded against one GLPI contract.
list_item_plugin_field_rows(itemtype, ...)List the value rows of one container for one parent item.
list_kb_article_comments(article_id)List every comment attached to one knowledge base article.
list_kb_article_revisions(article_id, *[, ...])List revisions of one knowledge base article.
list_plugin_fields_containers([itemtype])List
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_computers([rsql_filter, limit, ...])Search GLPI computers with an optional RSQL filter.
search_contract_types([rsql_filter, limit, ...])Search GLPI contract types with an optional RSQL filter.
search_contracts([rsql_filter, limit, ...])Search GLPI contracts with an optional RSQL filter.
search_documents([rsql_filter, limit, start])Search GLPI documents with an optional raw RSQL filter.
search_entities([rsql_filter, limit, start])Search GLPI entities with an optional RSQL filter.
search_kb_articles([rsql_filter, limit, ...])Search GLPI knowledge base articles with an optional RSQL filter.
search_kb_categories([rsql_filter, limit, ...])Search GLPI knowledge base categories with an optional RSQL filter.
search_locations([rsql_filter, limit, start])Search GLPI locations with an optional RSQL filter.
search_tickets([rsql_filter, limit, start, ...])Search GLPI tickets with an optional RSQL filter.
search_users([rsql_filter, limit, start, ...])Search GLPI users with an optional RSQL filter.
set_kb_article_categories(article_id, ...)Set the categories of one knowledge base article.
set_ticket_custom_fields(ticket_id, values)Persist custom-field values on one ticket.
stream_document_content(document_id, *[, ...])Stream the binary payload of one GLPI document in chunks.
unlink_computer_contract(computer_id, link_id, *)Remove one contract link from a GLPI computer.
unlink_ticket_timeline_document(ticket_id, ...)Unlink one timeline document from a ticket.
update_computer(computer_id, computer)Update one GLPI computer with a partial body.
update_computer_contract(computer_id, ...)Update one computer-contract link with a partial body.
update_contract(contract_id, contract)Update one GLPI contract with a partial body.
update_contract_cost(contract_id, cost_id, cost)Update one contract cost line with a partial body.
update_contract_type(contract_type_id, ...)Update one GLPI contract type with a partial body.
update_document(document_id, document)Update one GLPI document with a partial body.
update_entity(entity_id, entity)Update one GLPI entity with a partial body.
update_item_plugin_field_row(*, itemtype, ...)Update one existing plugin-fields value row.
update_kb_article(article_id, article)Update one knowledge base article with a partial body.
update_kb_article_comment(article_id, ...)Update one knowledge base article comment with a partial body.
update_kb_category(category_id, category)Update one knowledge base category with a partial body.
update_location(location_id, location)Update one GLPI location with a partial body.
update_ticket(ticket_id, ticket)Update one GLPI ticket with a partial body.
update_ticket_followup(ticket_id, ...)Update one ticket followup with a partial body.
update_ticket_solution(ticket_id, ...)Update one ticket solution with a partial body.
update_ticket_task(ticket_id, task_id, task)Update one ticket task with a partial body.
update_ticket_timeline_document(ticket_id, ...)Update one timeline document link with a partial body.
update_user(user_id, user)Update one GLPI user with a partial body.
upload_document(*, filename, content[, ...])Upload one binary document via the legacy v1 multipart endpoint.
Build the shared resources for a GLPI client.
- Parameters:
- glpi_api_url
str Base URL of the GLPI v2 REST API, e.g.
https://glpi.example.com/api.php/v2.- server_timezone
str|tzinfo IANA name of the timezone the GLPI server runs in (e.g.
"Europe/Paris"), or atzinfo. Required: GLPI does not advertise it, and it governs both directions of every timestamp the client exchanges.Reading, it interprets the timestamps the server sends without an offset. Writing, it is what makes an aware
datetimearrive as the moment it names: GLPI reads the naive prefix of a timestamp and discards the offset, so the value has to be converted onto the server’s clock before it is sent. Measured on a live instance, offsets from-08:00to+14:00written to one field all stored the same wall clock.There is no default because every candidate is wrong somewhere – guessing UTC against a Europe/Paris instance shifts those timestamps by an hour or two and never raises. Prefer a name over a fixed offset: a name follows DST, and one instance emits both
+01:00and+02:00.- client_id
str|None,optional OAuth client identifier used to obtain access tokens.
- client_secret
str|None,optional OAuth client secret paired with
client_id.- username
str|None,optional GLPI account username used for the OAuth password grant.
- password
str|None,optional GLPI account password used for the OAuth password grant.
- glpi_entity
int|None,optional Default
GLPI-Entityheader sent with each request.- glpi_profile
int|None,optional Default
GLPI-Profileheader sent with each request.- entity_recursivebool,
optional When
TruetheGLPI-Entity-Recursiveheader is sent so entity scope includes child entities.- language
str,optional Default
Accept-Languageheader value (e.g."en_GB").- verify_sslbool,
optional Whether the HTTP session verifies the server certificate.
- auth_token_refresh
int|None,optional Number of seconds before token expiry at which the auth manager proactively refreshes the access token.
- v1_base_url
str|None,optional Base URL of the legacy GLPI v1 API used as a fallback for binary document uploads and the Fields plugin endpoints.
- v1_user_token
str|None,optional user_tokenfor the v1 fallback session.- v1_app_token
str|None,optional app_tokenfor the v1 fallback session.
- glpi_api_url
- Parameters:
glpi_api_url (str)
server_timezone (str | tzinfo)
client_id (str | None)
client_secret (str | None)
username (str | None)
password (str | None)
glpi_entity (int | None)
glpi_profile (int | None)
entity_recursive (bool)
language (str)
verify_ssl (bool)
auth_token_refresh (int | None)
v1_base_url (str | None)
v1_user_token (str | None)
v1_app_token (str | None)
Methods
add_ticket_team_member(ticket_id, member)Add one team member to a ticket.
close()Release every resource owned by the client.
create_computer(computer)Create one GLPI computer.
create_contract(contract)Create one GLPI contract.
create_contract_cost(contract_id, cost)Create one cost line against a GLPI contract.
create_contract_type(contract_type)Create one GLPI contract type.
create_document(document)Create one GLPI document metadata record.
create_entity(entity)Create one GLPI entity.
create_item_plugin_field_row(*, itemtype, ...)Create one fresh plugin-fields value row.
create_kb_article(article)Create one knowledge base article and return its new identifier.
create_kb_article_comment(article_id, comment)Create one comment on a knowledge base article.
create_kb_category(category)Create one knowledge base category and return its new identifier.
create_location(location)Create one GLPI location.
create_ticket(ticket)Create one GLPI ticket.
create_ticket_followup(ticket_id, followup)Create one followup on a ticket.
create_ticket_solution(ticket_id, solution)Create one solution on a ticket.
create_ticket_task(ticket_id, task)Create one task on a ticket.
create_user(user)Create one GLPI user.
delete_computer(computer_id, *[, force])Delete one GLPI computer by identifier.
delete_contract(contract_id, *[, force])Delete one GLPI contract by identifier.
delete_contract_cost(contract_id, cost_id, *)Delete one cost line from a GLPI contract.
delete_contract_type(contract_type_id, *[, ...])Delete one GLPI contract type by identifier.
delete_document(document_id, *[, force])Delete one GLPI document by identifier.
delete_entity(entity_id, *[, force])Delete one GLPI entity by identifier.
delete_kb_article(article_id, *[, force])Delete one knowledge base article by identifier.
delete_kb_article_comment(article_id, ...[, ...])Delete one knowledge base article comment by identifier.
delete_kb_category(category_id, *[, force])Delete one knowledge base category by identifier.
delete_location(location_id, *[, force])Delete one GLPI location by identifier.
delete_ticket(ticket_id, *[, force])Delete one GLPI ticket by identifier.
delete_ticket_followup(ticket_id, followup_id, *)Delete one ticket followup by identifier.
delete_ticket_solution(ticket_id, solution_id, *)Delete one ticket solution by identifier.
delete_ticket_task(ticket_id, task_id, *[, ...])Delete one ticket task by identifier.
delete_user(user_id, *[, force])Delete one GLPI user by identifier.
download_document_content(document_id)Download the raw binary payload for one GLPI document.
find_user_by_email(email, *[, rsql_filter, ...])Return the first user holding
email, orNone.from_env(*[, env, prefix])Build a client instance from environment variables.
get_computer(computer_id)Fetch one GLPI computer by identifier.
get_computer_contract(computer_id, link_id)Fetch one contract link recorded against a GLPI computer.
get_contract(contract_id)Fetch one GLPI contract by identifier.
get_contract_cost(contract_id, cost_id)Fetch one cost line recorded against a GLPI contract.
get_contract_type(contract_type_id)Fetch one GLPI contract type by identifier.
get_document(document_id)Fetch one GLPI document by identifier.
get_entity(entity_id)Fetch one GLPI entity by identifier.
get_kb_article(article_id)Fetch one knowledge base article by identifier.
get_kb_article_comment(article_id, comment_id)Fetch one knowledge base article comment by identifier.
get_kb_article_revision(article_id, revision, *)Fetch one revision of a knowledge base article by revision number.
get_kb_category(category_id)Fetch one knowledge base category by identifier.
get_location(location_id)Fetch one GLPI location by identifier.
get_task_durations(*[, start_date, ...])Return task duration totals with optional per-task detail.
get_task_statistics(ticket_ids)Return task duration totals grouped by user and ticket.
get_ticket(ticket_id)Fetch one GLPI ticket by identifier.
get_ticket_context(ticket_id)Return one aggregated ticket context view.
get_ticket_custom_fields(ticket_id)Return the custom-field values defined for one ticket.
get_ticket_followup(ticket_id, followup_id)Fetch one ticket followup by identifier.
get_ticket_solution(ticket_id, solution_id)Fetch one ticket solution by identifier.
get_ticket_statistics(*[, start_date, ...])Return ticket counts grouped by entity, status, priority, and type.
get_ticket_task(ticket_id, task_id)Fetch one ticket task by identifier.
get_ticket_timeline_document(ticket_id, ...)Fetch one document linked to the ticket timeline by its document ID.
get_user(user_id)Fetch one GLPI user by identifier.
get_user_activity(*[, user_id, username, ...])Return per-user GLPI activity aggregated across tickets and tasks.
iter_search_computers([rsql_filter, ...])Yield successive pages of GLPI computers until exhausted.
iter_search_contract_types([rsql_filter, ...])Yield successive pages of GLPI contract types until exhausted.
iter_search_contracts([rsql_filter, ...])Yield successive pages of GLPI contracts until exhausted.
iter_search_documents([rsql_filter, batch_size])Yield successive pages of GLPI documents until exhausted.
iter_search_entities([rsql_filter, batch_size])Yield successive pages of GLPI entities until exhausted.
iter_search_kb_articles([rsql_filter, ...])Yield successive pages of GLPI knowledge base articles until exhausted.
iter_search_kb_categories([rsql_filter, ...])Yield successive pages of GLPI knowledge base categories until exhausted.
iter_search_locations([rsql_filter, batch_size])Yield successive pages of GLPI locations until exhausted.
iter_search_tickets([rsql_filter, ...])Yield successive pages of GLPI tickets until exhausted.
iter_search_users([rsql_filter, batch_size, ...])Yield successive pages of GLPI users until exhausted.
link_computer_contract(computer_id, link)Link one GLPI contract to one computer.
link_ticket_timeline_document(ticket_id, ...)Link an existing GLPI document to one ticket timeline.
list_computer_contracts(computer_id, *[, ...])List the contracts linked to one GLPI computer.
list_contract_costs(contract_id, *[, limit, ...])List the cost lines recorded against one GLPI contract.
list_item_plugin_field_rows(itemtype, ...)List the value rows of one container for one parent item.
list_kb_article_comments(article_id)List every comment attached to one knowledge base article.
list_kb_article_revisions(article_id, *[, ...])List revisions of one knowledge base article.
list_plugin_fields_containers([itemtype])List
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_computers([rsql_filter, limit, ...])Search GLPI computers with an optional RSQL filter.
search_contract_types([rsql_filter, limit, ...])Search GLPI contract types with an optional RSQL filter.
search_contracts([rsql_filter, limit, ...])Search GLPI contracts with an optional RSQL filter.
search_documents([rsql_filter, limit, start])Search GLPI documents with an optional raw RSQL filter.
search_entities([rsql_filter, limit, start])Search GLPI entities with an optional RSQL filter.
search_kb_articles([rsql_filter, limit, ...])Search GLPI knowledge base articles with an optional RSQL filter.
search_kb_categories([rsql_filter, limit, ...])Search GLPI knowledge base categories with an optional RSQL filter.
search_locations([rsql_filter, limit, start])Search GLPI locations with an optional RSQL filter.
search_tickets([rsql_filter, limit, start, ...])Search GLPI tickets with an optional RSQL filter.
search_users([rsql_filter, limit, start, ...])Search GLPI users with an optional RSQL filter.
set_kb_article_categories(article_id, ...)Set the categories of one knowledge base article.
set_ticket_custom_fields(ticket_id, values)Persist custom-field values on one ticket.
stream_document_content(document_id, *[, ...])Stream the binary payload of one GLPI document in chunks.
unlink_computer_contract(computer_id, link_id, *)Remove one contract link from a GLPI computer.
unlink_ticket_timeline_document(ticket_id, ...)Unlink one timeline document from a ticket.
update_computer(computer_id, computer)Update one GLPI computer with a partial body.
update_computer_contract(computer_id, ...)Update one computer-contract link with a partial body.
update_contract(contract_id, contract)Update one GLPI contract with a partial body.
update_contract_cost(contract_id, cost_id, cost)Update one contract cost line with a partial body.
update_contract_type(contract_type_id, ...)Update one GLPI contract type with a partial body.
update_document(document_id, document)Update one GLPI document with a partial body.
update_entity(entity_id, entity)Update one GLPI entity with a partial body.
update_item_plugin_field_row(*, itemtype, ...)Update one existing plugin-fields value row.
update_kb_article(article_id, article)Update one knowledge base article with a partial body.
update_kb_article_comment(article_id, ...)Update one knowledge base article comment with a partial body.
update_kb_category(category_id, category)Update one knowledge base category with a partial body.
update_location(location_id, location)Update one GLPI location with a partial body.
update_ticket(ticket_id, ticket)Update one GLPI ticket with a partial body.
update_ticket_followup(ticket_id, ...)Update one ticket followup with a partial body.
update_ticket_solution(ticket_id, ...)Update one ticket solution with a partial body.
update_ticket_task(ticket_id, task_id, task)Update one ticket task with a partial body.
update_ticket_timeline_document(ticket_id, ...)Update one timeline document link with a partial body.
update_user(user_id, user)Update one GLPI user with a partial body.
upload_document(*, filename, content[, ...])Upload one binary document via the legacy v1 multipart endpoint.
- Raises:
GlpiValidationErrorIf the supplied configuration is incomplete or invalid (e.g. missing OAuth credentials together with no v1 fallback).
- Parameters:
glpi_api_url (str)
server_timezone (str | tzinfo)
client_id (str | None)
client_secret (str | None)
username (str | None)
password (str | None)
glpi_entity (int | None)
glpi_profile (int | None)
entity_recursive (bool)
language (str)
verify_ssl (bool)
auth_token_refresh (int | None)
v1_base_url (str | None)
v1_user_token (str | None)
v1_app_token (str | None)
- async add_ticket_team_member(ticket_id, member)
Add one team member to a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to receive the new member.
- member
PostTeamMember Request body describing the member. The
idfield is the target user/group/supplier identifier,typeis one of"User","Group"or"Supplier", androleis one of"requester","assigned"or"observer".
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- async close()[source]
Release every resource owned by the client.
The shared HTTP session is closed, the optional v1 fallback session is closed, and the client is marked as closed so subsequent calls raise immediately. The method is idempotent.
- Return type:
None
- async create_computer(computer)
Create one GLPI computer.
- Parameters:
- computer
PostComputer Request body describing the computer to create.
- computer
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
computer (PostComputer)
- Return type:
- async create_contract(contract)
Create one GLPI contract.
- Parameters:
- contract
PostContract Request body describing the contract to create.
- contract
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
contract (PostContract)
- Return type:
- async create_contract_cost(contract_id, cost)
Create one cost line against a GLPI contract.
- Parameters:
- contract_id
GlpiId Numeric identifier of the owning contract.
- cost
PostContractCost Request body describing the cost line to create.
- contract_id
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
contract_id (int)
cost (PostContractCost)
- Return type:
- async create_contract_type(contract_type)
Create one GLPI contract type.
- Parameters:
- contract_type
PostContractType Request body describing the contract type to create.
- contract_type
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
contract_type (PostContractType)
- Return type:
- async create_document(document)
Create one GLPI document metadata record.
Binary uploads use
upload_document()instead of the JSON metadata endpoint exposed here.- Parameters:
- document
PostDocument Request body describing the document metadata.
- document
- Returns:
intIdentifier assigned by the GLPI server to the new document.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
document (PostDocument)
- Return type:
- async create_entity(entity)
Create one GLPI entity.
- Parameters:
- entity
PostEntity Request body describing the entity to create.
- entity
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
entity (PostEntity)
- Return type:
- async create_item_plugin_field_row(*, itemtype, items_id, container_id, container_name, values, entities_id=None)
Create one fresh plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item the row is attached to.
- container_id
int Identifier of the originating
GetPluginFieldsContainer.- container_name
str Internal name of the container, used to derive the value itemtype.
- values
dict[str,object] Field-name → value mapping for the dynamic columns declared on the container.
- entities_id
int|None,optional Entity to associate the row with. When omitted the GLPI server applies its default scope.
- itemtype
- Returns:
intIdentifier of the newly created row.
- Parameters:
- Return type:
- async create_kb_article(article)
Create one knowledge base article and return its new identifier.
When
article.categoriesis a non-empty list, the categories are applied through the legacy fallback (set_kb_article_categories()) because the v2 API cannot write them; this requires a configured v1 session.Noneor an empty list is skipped — a freshly created article has no categories to clear — so callers that omit categories never need a v1 session. The v2 create is not undone if the category assignment fails: the article already exists, so the failure raises aRuntimeErrornaming the new article id (chaining the original error) and leaves the article in place for you to re-assign categories.- Parameters:
article (PostKBArticle)
- Return type:
- async create_kb_article_comment(article_id, comment)
Create one comment on a knowledge base article.
- Parameters:
article_id (int)
comment (PostKBArticleComment)
- Return type:
- async create_kb_category(category)
Create one knowledge base category and return its new identifier.
- Parameters:
category (PostKBCategory)
- Return type:
- async create_location(location)
Create one GLPI location.
- Parameters:
- location
PostLocation Request body describing the location to create.
- location
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
location (PostLocation)
- Return type:
- async create_ticket(ticket)
Create one GLPI ticket.
- Parameters:
- ticket
PostTicket Request body describing the ticket to create. Any extra fields are forwarded verbatim through
extra_payload.
- ticket
- Returns:
intIdentifier assigned by the GLPI server to the new ticket.
- Raises:
GlpiStatusErrorIf the HTTP status is not success.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket (PostTicket)
- Return type:
- async create_ticket_followup(ticket_id, followup)
Create one followup on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup
PostFollowup Request body describing the followup to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new followup.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
followup (PostFollowup)
- Return type:
- async create_ticket_solution(ticket_id, solution)
Create one solution on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution
PostSolution Request body describing the solution to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new solution.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
solution (PostSolution)
- Return type:
- async create_ticket_task(ticket_id, task)
Create one task on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task
PostTicketTask Request body describing the task to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new task.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
task (PostTicketTask)
- Return type:
- async create_user(user)
Create one GLPI user.
- Parameters:
- user
PostUser Request body describing the user to create.
- user
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
user (PostUser)
- Return type:
- async delete_computer(computer_id, *, force=None)
Delete one GLPI computer by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_contract(contract_id, *, force=None)
Delete one GLPI contract by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_contract_cost(contract_id, cost_id, *, force=None)
Delete one cost line from a GLPI contract.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_contract_type(contract_type_id, *, force=None)
Delete one GLPI contract type by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_document(document_id, *, force=None)
Delete one GLPI document by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_entity(entity_id, *, force=None)
Delete one GLPI entity by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_kb_article(article_id, *, force=None)
Delete one knowledge base article by identifier.
- async delete_kb_article_comment(article_id, comment_id, *, force=None)
Delete one knowledge base article comment by identifier.
- async delete_kb_category(category_id, *, force=None)
Delete one knowledge base category by identifier.
- async delete_location(location_id, *, force=None)
Delete one GLPI location by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket(ticket_id, *, force=None)
Delete one GLPI ticket by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket_followup(ticket_id, followup_id, *, force=None)
Delete one ticket followup by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket_solution(ticket_id, solution_id, *, force=None)
Delete one ticket solution by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket_task(ticket_id, task_id, *, force=None)
Delete one ticket task by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_user(user_id, *, force=None)
Delete one GLPI user by identifier.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async download_document_content(document_id)
Download the raw binary payload for one GLPI document.
- Parameters:
- document_id
GlpiId Numeric identifier of the document whose binary content is requested.
- document_id
- Returns:
bytesRaw bytes returned by the GLPI download endpoint.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- async find_user_by_email(email, *, rsql_filter='', batch_size=100, skip_entity=True)
Return the first user holding
email, orNone.This scans. GLPI exposes e-mail addresses as
User.emails, a nested array, and the v2 filter engine cannot join a nested array – the structurally identicalTicket.teamanswers HTTP 500 for its declared subfields and is silently ignored for every other spelling. So there is no server-side e-mail filter to use, and the addresses have to be compared client-side.Nothing about that is cheap: the scan costs one request per
batch_sizeusers until it matches, so it is meant for occasional resolution, not for a per-request lookup. Narrow it withrsql_filterwhen you can ("is_active==true"is the usual one), and cache the resulting id rather than calling this again.A server-side fast path is deliberately not attempted. GLPI v2 ignores a filter field it does not recognise and answers with the whole unfiltered table, so a guessed e-mail filter would not fail – it would return a plausible non-empty page whose first row is the wrong person. Guessing is the one thing this helper exists to stop each caller doing separately.
- Parameters:
- email
str Address to look for. Compared case-insensitively after trimming surrounding whitespace, the way mail systems treat it.
- rsql_filter
str,optional Raw RSQL filter narrowing the population scanned. Empty by default, which scans every visible user.
- batch_size
int,optional Users fetched per request while scanning (defaults to 100).
- skip_entitybool,
optional When
True(the default) theGLPI-Entityheader is omitted so the scan spans every entity the caller can see. A user whose account lives outside the client’s configured entity is invisible otherwise, and the helper would answerNonefor somebody who exists.
- email
- Returns:
- Raises:
GlpiValidationErrorIf
emailis blank – which would otherwise scan the whole directory and match nothing.
- Parameters:
- Return type:
GetUser | None
- classmethod from_env(*, env=None, prefix='GLPI_', **overrides)
Build a client instance from environment variables.
The variables follow the conventional
<PREFIX><NAME>naming (GLPI_API_URL,GLPI_CLIENT_ID,GLPI_CLIENT_SECRET,GLPI_USERNAME,GLPI_PASSWORD,GLPI_VERIFY_SSL,GLPI_V1_BASE_URL,GLPI_V1_USER_TOKEN,GLPI_V1_APP_TOKEN,GLPI_ENTITY,GLPI_PROFILE,GLPI_ENTITY_RECURSIVE,GLPI_LANGUAGE,GLPI_AUTH_TOKEN_REFRESH,GLPI_SERVER_TIMEZONE).- Parameters:
- Returns:
SelfA fully configured client ready to perform requests.
- Raises:
GlpiValidationErrorIf the resolved configuration is missing a required field.
- Parameters:
- Return type:
Self
- async get_computer(computer_id)
Fetch one GLPI computer by identifier.
- Parameters:
- computer_id
GlpiId Numeric identifier of the computer to retrieve.
- computer_id
- Returns:
GetComputerValidated computer payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
computer_id (int)
- Return type:
- async get_computer_contract(computer_id, link_id)
Fetch one contract link recorded against a GLPI computer.
- Parameters:
- computer_id
GlpiId Numeric identifier of the owning computer.
- link_id
GlpiId Numeric identifier of the contract link to retrieve.
- computer_id
- Returns:
GetContractItemValidated contract link payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_contract(contract_id)
Fetch one GLPI contract by identifier.
- Parameters:
- contract_id
GlpiId Numeric identifier of the contract to retrieve.
- contract_id
- Returns:
GetContractValidated contract payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_id (int)
- Return type:
- async get_contract_cost(contract_id, cost_id)
Fetch one cost line recorded against a GLPI contract.
- Parameters:
- contract_id
GlpiId Numeric identifier of the owning contract.
- cost_id
GlpiId Numeric identifier of the cost line to retrieve.
- contract_id
- Returns:
GetContractCostValidated cost line payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_contract_type(contract_type_id)
Fetch one GLPI contract type by identifier.
- Parameters:
- contract_type_id
GlpiId Numeric identifier of the contract type to retrieve.
- contract_type_id
- Returns:
GetContractTypeValidated contract type payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_type_id (int)
- Return type:
- async get_document(document_id)
Fetch one GLPI document by identifier.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to retrieve.
- document_id
- Returns:
GetDocumentValidated document metadata payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- async get_entity(entity_id)
Fetch one GLPI entity by identifier.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to retrieve.
- entity_id
- Returns:
GetEntityValidated entity payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
- Return type:
- async get_kb_article(article_id)
Fetch one knowledge base article by identifier.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
article_id (int)
- Return type:
- async get_kb_article_comment(article_id, comment_id)
Fetch one knowledge base article comment by identifier.
- Parameters:
- Return type:
- async get_kb_article_revision(article_id, revision, *, language=None)
Fetch one revision of a knowledge base article by revision number.
- Parameters:
- Return type:
- async get_kb_category(category_id)
Fetch one knowledge base category by identifier.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
category_id (int)
- Return type:
- async get_location(location_id)
Fetch one GLPI location by identifier.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to retrieve.
- location_id
- Returns:
GetLocationValidated location payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
- Return type:
- async get_task_durations(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, user_id=None, user_editor_id=None, user_recipient_id=None, extra_filter=None, return_task_details=False)
Return task duration totals with optional per-task detail.
Builds an RSQL filter from the supplied parameters, collects all matching tickets by iterating
iter_search_tickets(), computesduration_by_entityby groupingget_task_statistics()results against the per-ticket entity map, and optionally returns a flat list of individual task records.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00). Defaults toend_date - default_days + 1when omitted.- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (defaults to 30 and must be a positive integer).- entity_id
int|None,optional Restrict to tickets in this entity.
- entity_name
str|None,optional Resolve entity by name and restrict to matched entities (ignored when
entity_idis given).- user_id
int|None,optional Restrict to tickets where the user is an assignee or requester (OR semantics across both roles).
- user_editor_id
int|None,optional Restrict to tickets last updated by this user.
- user_recipient_id
int|None,optional Restrict to tickets where this user is the requester.
- extra_filter
str|None,optional Optional raw RSQL fragment appended as an AND clause.
- return_task_detailsbool,
optional When
True, include ataskslist of individual task records in the returned mapping (defaultFalse).
- start_date
- Returns:
TaskDurationsResultMapping with
start_date,end_date,total_duration,task_count,duration_by_user,duration_by_entity, andtasks(Nonewhenreturn_task_details=False).
- Raises:
GlpiValidationErrorIf
default_days < 1,start_date/end_dateis not a valid ISO date, orstart_dateis afterend_date.
- Parameters:
- Return type:
TaskDurationsResult
- async get_task_statistics(ticket_ids)
Return task duration totals grouped by user and ticket.
The helper expects a list of ticket identifiers because GLPI does not publish a global task collection endpoint. Callers typically gather the relevant ticket identifiers through
search_ticketsfirst.- Parameters:
- Returns:
TaskStatisticsResultMapping with
ticket_count,task_count,total_duration,duration_by_user, andduration_by_ticketentries (durations are integer seconds, matching the GLPIdurationfield).
- Parameters:
- Return type:
TaskStatisticsResult
- async get_ticket(ticket_id)
Fetch one GLPI ticket by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to retrieve.
- ticket_id
- Returns:
GetTicketValidated ticket payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- async get_ticket_context(ticket_id)
Return one aggregated ticket context view.
The primary ticket fetch and the four timeline list calls are issued through
gather: concurrently on the async surface, sequentially on the generated sync one.- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to assemble.
- ticket_id
- Returns:
GlpiTicketContextAggregated view bundling the primary ticket together with its tasks, followups, solutions, and timeline document links.
- Raises:
GlpiStatusErrorIf any of the underlying GLPI calls returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- async get_ticket_custom_fields(ticket_id)
Return the custom-field values defined for one ticket.
The result is a nested mapping shaped as
{container_name: {field_name: value, ...}}. Containers that do not yet have a persisted value row for the ticket are skipped.
- async get_ticket_followup(ticket_id, followup_id)
Fetch one ticket followup by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to retrieve.
- ticket_id
- Returns:
GetFollowupValidated followup payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_ticket_solution(ticket_id, solution_id)
Fetch one ticket solution by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to retrieve.
- ticket_id
- Returns:
GetSolutionValidated solution payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_ticket_statistics(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, extra_filter=None)
Return ticket counts grouped by entity, status, priority, and type.
The date window is applied to the GLPI
date_creationfield and results are aggregated locally in Python. Returned identifiers are the raw GLPI numeric values that callers can resolve with the dedicatedsearch_*helpers when human labels are needed.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00). Defaults toend_date - default_days + 1when omitted.- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (defaults to 30 and must be a positive integer).- entity_id
int|None,optional When provided, restricts results to tickets belonging to the entity with this GLPI identifier.
- entity_name
str|None,optional When provided (and
entity_idisNone), the name is resolved viasearch_entitiesand the matched entity IDs are used to filter tickets. If no entity matches,{"entities": {}}is returned immediately.- extra_filter
str|None,optional Optional raw RSQL fragment to
ANDwith the date window on the server side.
- start_date
- Returns:
- Raises:
GlpiValidationErrorIf
default_days < 1,start_date/end_dateis not a valid ISO date, orstart_dateis afterend_date.
- Parameters:
- Return type:
- async get_ticket_task(ticket_id, task_id)
Fetch one ticket task by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to retrieve.
- ticket_id
- Returns:
GetTicketTaskValidated task payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_ticket_timeline_document(ticket_id, document_link_id)
Fetch one document linked to the ticket timeline by its document ID.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the linked document to retrieve.
- ticket_id
- Returns:
GetDocumentValidated document payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_user(user_id)
Fetch one GLPI user by identifier.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to retrieve.
- user_id
- Returns:
GetUserValidated user payload.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
user_id (int)
- Return type:
- async get_user_activity(*, user_id=None, username=None, realname=None, firstname=None, start_date=None, end_date=None, default_days=30)
Return per-user GLPI activity aggregated across tickets and tasks.
Aggregates tickets where each matched user is an assignee, tickets where the user is a requester, and task durations over the requested date window. When multiple users resolve to the same display key their results are merged.
- Parameters:
- user_id
int|None,optional Identify the user by GLPI numeric identifier.
- username
str|None,optional Filter by username (substring match).
- realname
str|None,optional Filter by family name (substring match).
- firstname
str|None,optional Filter by given name (substring match).
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the activity window (inclusive from 00:00:00).- end_date
str|None,optional ISO
YYYY-MM-DDend of the activity window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (default 30).
- user_id
- Returns:
UserActivityResultMapping with one
userskey. Each user key maps to aUserActivityEntrywithuser_ids,tickets_as_technician,tickets_as_recipient, andtask_durations.
- Raises:
GlpiValidationErrorIf none of
user_id,username,realname, orfirstnameare supplied, or if the supplied criteria match no GLPI users.
- Parameters:
- Return type:
UserActivityResult
- async iter_search_computers(rsql_filter='', *, batch_size=50, sort=None)
Yield successive pages of GLPI computers until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_computers()call.- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_mod:desc". Forwarded to each page request; omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Yields:
list[GetComputer]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_contract_types(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI contract types until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_contract_types()call.
- rsql_filter
- Yields:
list[GetContractType]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_contracts(rsql_filter='', *, batch_size=50, sort=None)
Yield successive pages of GLPI contracts until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_contracts()call.- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_begin:desc". Forwarded to each page request; omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Yields:
list[GetContract]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_documents(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI documents until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_documents()call.
- rsql_filter
- Yields:
list[GetDocument]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_entities(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI entities until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page. Entity calls bypass theGLPI-Entityheader so cross-entity lookups remain possible.- Parameters:
- Yields:
- Parameters:
- Return type:
- async iter_search_kb_articles(rsql_filter='', *, batch_size=50, sort=None, language=None)
Yield successive pages of GLPI knowledge base articles until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_kb_articles()call.- sort
str|None,optional sortquery parameter forwarded to each page request, spelledfieldorfield:direction(e.g."date_mod:desc"). A space before the direction answers HTTP 400.- language
str|None,optional GLPI language code forwarded to each page request to select a translated view.
- rsql_filter
- Yields:
list[GetKBArticle]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_kb_categories(rsql_filter='', *, batch_size=50, sort=None, language=None)
Yield successive pages of GLPI knowledge base categories until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_kb_categories()call.- sort
str|None,optional sortquery parameter forwarded to each page request, spelledfieldorfield:direction(e.g."date_mod:desc"). A space before the direction answers HTTP 400.- language
str|None,optional GLPI language code forwarded to each page request to select a translated view.
- rsql_filter
- Yields:
list[GetKBCategory]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_locations(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI locations until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible record.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_locations()call.
- rsql_filter
- Yields:
list[GetLocation]One page per iteration. The last yielded batch may be shorter than
batch_size.
- Parameters:
- Return type:
- async iter_search_tickets(rsql_filter='', *, batch_size=50, sort=None, fields=())
Yield successive pages of GLPI tickets until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible ticket.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_tickets()call.- sort
str|None,optional sortquery parameter forwarded to each page request, spelledfieldorfield:direction(e.g."date_mod:desc"). A space before the direction answers HTTP 400.- fields
tuple[str, …],optional Restricted set of contract field names to request.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- async iter_search_users(rsql_filter='', *, batch_size=50, skip_entity=False)
Yield successive pages of GLPI users until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible user.- batch_size
int,optional Number of records requested per page (default 50).
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- async link_computer_contract(computer_id, link)
Link one GLPI contract to one computer.
The
itemtypeanditems_idfields are set fromcomputer_idrather than taken fromlink. The GLPI contract typesitemtypeas a free string, so a caller-supplied value is a silent mis-link waiting to happen; this helper already knows which asset it is working on.- Parameters:
- computer_id
GlpiId Numeric identifier of the computer the contract covers.
- link
PostContractItem Request body naming the contract to link. Any
itemtypeoritems_idset on it is replaced.
- computer_id
- Returns:
intIdentifier assigned to the new link by the GLPI server.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
computer_id (int)
link (PostContractItem)
- Return type:
- async link_ticket_timeline_document(ticket_id, document_link)
Link an existing GLPI document to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link
PostTimelineDocument Request body describing the link (typically the timeline position; document and ticket identifiers are inferred from the URL).
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new link.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
GlpiProtocolErrorIf the create response is missing the
idfield.
- Parameters:
ticket_id (int)
document_link (PostTimelineDocument)
- Return type:
- async list_computer_contracts(computer_id, *, limit=50, start=0)
List the contracts linked to one GLPI computer.
- Parameters:
- Returns:
list[GetContractItem]Contract links belonging to the computer.
- Parameters:
- Return type:
- async list_contract_costs(contract_id, *, limit=50, start=0)
List the cost lines recorded against one GLPI contract.
- Parameters:
- Returns:
list[GetContractCost]Cost lines belonging to the contract.
- Parameters:
- Return type:
- async list_item_plugin_field_rows(itemtype, items_id, container_name)
List the value rows of one container for one parent item.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item.
- container_name
str Internal name of the container as exposed by
GetPluginFieldsContainer.name.
- itemtype
- Returns:
list[GetPluginFieldsValueRow]Zero or one row depending on whether the plugin has already persisted any value for this item.
- Parameters:
- Return type:
- async list_kb_article_comments(article_id)
List every comment attached to one knowledge base article.
- Parameters:
article_id (int)
- Return type:
- async list_kb_article_revisions(article_id, *, language=None)
List revisions of one knowledge base article.
- async list_plugin_fields_containers(itemtype=None)
List
PluginFieldsContainerrows registered on the server.- Parameters:
- Returns:
list[GetPluginFieldsContainer]Containers visible to the authenticated user.
- Parameters:
itemtype (str | None)
- Return type:
- async list_plugin_fields_fields(container_id=None)
List
PluginFieldsFielddeclarations.- Parameters:
- Returns:
list[GetPluginFieldsField]Field declarations visible to the authenticated user.
- Parameters:
container_id (int | None)
- Return type:
- async list_ticket_followups(ticket_id)
List all followups linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetFollowup]Followups returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_solutions(ticket_id)
List all solutions linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetSolution]Solutions returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_tasks(ticket_id)
List all tasks linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetTicketTask]Tasks returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_team_members(ticket_id)
List the team members currently linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket whose team members are listed.
- ticket_id
- Returns:
list[GetTeamMember]Team members validated against the contract
TeamMemberschema.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_timeline_documents(ticket_id)
List all documents linked to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetDocument]Document records returned by the GLPI server. The live API wraps each entry in a
{"type": "Document_Item", "item": {...}}envelope whoseitemvalue is a fullDocumentrecord; the envelope is unwrapped automatically.
- Parameters:
ticket_id (int)
- Return type:
- async remove_ticket_team_member(ticket_id, member)
Remove one team member from a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket the member belongs to.
- member
PostTeamMember Request body identifying the member to remove (same shape as
add_ticket_team_member()).
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- async search_computers(rsql_filter='', *, limit=50, start=0, sort=None)
Search GLPI computers with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_mod:desc". Omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Returns:
list[GetComputer]Computers matching the filter.
- Parameters:
- Return type:
- async search_contract_types(rsql_filter='', *, limit=50, start=0)
Search GLPI contract types with an optional RSQL filter.
- Parameters:
- Returns:
list[GetContractType]Contract types matching the filter.
- Parameters:
- Return type:
- async search_contracts(rsql_filter='', *, limit=50, start=0, sort=None)
Search GLPI contracts with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional Server-side ordering expressed as
"<field>:<direction>", for example"date_begin:desc". Omitted whenNone, leaving the server default ordering in place.
- rsql_filter
- Returns:
list[GetContract]Contracts matching the filter.
- Parameters:
- Return type:
- async search_documents(rsql_filter='', *, limit=50, start=0)
Search GLPI documents with an optional raw RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL expression forwarded to the
filterquery parameter (for example"name=='*manual*'"). When empty the parameter is omitted and the server returns its default paginated listing.- limit
int,optional Maximum number of records to return (defaults to 50).
- start
int,optional Zero-based offset for pagination (defaults to 0).
- rsql_filter
- Returns:
list[GetDocument]Documents matching the filter window.
- Parameters:
- Return type:
- async search_entities(rsql_filter='', *, limit=50, start=0)
Search GLPI entities with an optional RSQL filter.
- Parameters:
- Returns:
- Parameters:
- Return type:
- async search_kb_articles(rsql_filter='', *, limit=50, start=0, sort=None, language=None)
Search GLPI knowledge base articles with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter, spelledfieldorfield:direction(e.g."date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a barefieldsorts ascending, and a separateorderparameter is ignored.- language
str|None,optional GLPI language code forwarded as the
languagequery parameter to select a translated view.
- rsql_filter
- Returns:
list[GetKBArticle]Articles matching the filter.
- Parameters:
- Return type:
- async search_kb_categories(rsql_filter='', *, limit=50, start=0, sort=None, language=None)
Search GLPI knowledge base categories with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter, spelledfieldorfield:direction(e.g."name:asc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a barefieldsorts ascending, and a separateorderparameter is ignored.- language
str|None,optional GLPI language code forwarded as the
languagequery parameter to select a translated view.
- rsql_filter
- Returns:
list[GetKBCategory]Categories matching the filter.
- Parameters:
- Return type:
- async search_locations(rsql_filter='', *, limit=50, start=0)
Search GLPI locations with an optional RSQL filter.
- Parameters:
- Returns:
list[GetLocation]Locations matching the filter.
- Parameters:
- Return type:
- async search_tickets(rsql_filter='', *, limit=50, start=0, sort=None, fields=())
Search GLPI tickets with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter (for example"name==hello"or"status==2"). Empty by default, which lists every visible ticket.- limit
int,optional Maximum number of records returned by the GLPI server in one request.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter, spelledfieldorfield:direction(e.g."date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a barefieldsorts ascending, and a separateorderparameter is ignored.- fields
tuple[str, …],optional Restricted set of contract field names to request. Empty tuple lets the GLPI server pick its default field set.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- async search_users(rsql_filter='', *, limit=50, start=0, skip_entity=False)
Search GLPI users with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter, for example"username==alice". Empty by default.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- server_timezone: tzinfo
- async set_kb_article_categories(article_id, category_ids)
Set the categories of one knowledge base article.
GLPI 11 stores KB categories as a many-to-many relationship that the v2 API exposes as read-only (
KBArticle.categories[].idisreadOnly), so it silently drops category writes. This helper sets the underlying_categoriesfield through the legacy v1 API, which requiresv1_base_url/v1_user_tokento be configured (pointing at the legacyapirest.php).The supplied ids REPLACE the article’s full category set; passing an empty sequence clears every category. Category ids are not validated against the server — an unknown id simply is not linked.
- Raises:
RuntimeErrorWhen no legacy v1 session is configured on the client.
GlpiStatusErrorWhen the legacy API returns a non-success status.
- Parameters:
- Return type:
None
- async set_ticket_custom_fields(ticket_id, values)
Persist custom-field values on one ticket.
Existing value rows are updated in place; missing rows are created with the supplied payload. Containers/fields that the server does not know about raise
GlpiValidationErrorbefore any write to keep the call atomic from the caller’s perspective.- Parameters:
- ticket_id
int Identifier of the ticket whose custom values must be set.
- values
dict[str,dict[str,Any]] Nested mapping
{container_name: {field_name: value}}describing the columns to write. Container and field names must match whatlist_plugin_fields_containers()andlist_plugin_fields_fields()return.
- ticket_id
- Parameters:
- Return type:
None
- async stream_document_content(document_id, *, chunk_size=65536)
Stream the binary payload of one GLPI document in chunks.
Use this instead of
download_document_content()when the file may be large: that method holds the whole body in memory before returning, so a 500 MB attachment costs 500 MB of process memory even if the caller only writes it straight to disk.- Parameters:
- document_id
GlpiId Numeric identifier of the document whose binary content is requested.
- chunk_size
int,optional Bytes requested per chunk (defaults to 64 KiB).
- document_id
- Yields:
bytesSuccessive chunks of the document body. The final chunk may be shorter than
chunk_size.
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
Examples
Writing a document to disk without buffering it:
with open("attachment.pdf", "wb") as handle: async for chunk in client.stream_document_content(42): handle.write(chunk)
- async unlink_computer_contract(computer_id, link_id, *, force=None)
Remove one contract link from a GLPI computer.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async unlink_ticket_timeline_document(ticket_id, document_link_id, *, force=None)
Unlink one timeline document from a ticket.
- Parameters:
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async update_computer(computer_id, computer)
Update one GLPI computer with a partial body.
- Parameters:
- computer_id
GlpiId Numeric identifier of the computer to update.
- computer
PatchComputer Partial request body.
- computer_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
computer_id (int)
computer (PatchComputer)
- Return type:
None
- async update_computer_contract(computer_id, link_id, link)
Update one computer-contract link with a partial body.
The
itemtypeanditems_idfields are set fromcomputer_idrather than taken fromlink, for the same reason aslink_computer_contract().- Parameters:
- computer_id
GlpiId Numeric identifier of the owning computer.
- link_id
GlpiId Numeric identifier of the contract link to update.
- link
PatchContractItem Partial request body. Any
itemtypeoritems_idset on it is replaced.
- computer_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
computer_id (int)
link_id (int)
link (PatchContractItem)
- Return type:
None
- async update_contract(contract_id, contract)
Update one GLPI contract with a partial body.
- Parameters:
- contract_id
GlpiId Numeric identifier of the contract to update.
- contract
PatchContract Partial request body.
- contract_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_id (int)
contract (PatchContract)
- Return type:
None
- async update_contract_cost(contract_id, cost_id, cost)
Update one contract cost line with a partial body.
- Parameters:
- contract_id
GlpiId Numeric identifier of the owning contract.
- cost_id
GlpiId Numeric identifier of the cost line to update.
- cost
PatchContractCost Partial request body.
- contract_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_id (int)
cost_id (int)
cost (PatchContractCost)
- Return type:
None
- async update_contract_type(contract_type_id, contract_type)
Update one GLPI contract type with a partial body.
- Parameters:
- contract_type_id
GlpiId Numeric identifier of the contract type to update.
- contract_type
PatchContractType Partial request body.
- contract_type_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
contract_type_id (int)
contract_type (PatchContractType)
- Return type:
None
- async update_document(document_id, document)
Update one GLPI document with a partial body.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to update.
- document
PatchDocument Partial request body.
- document_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
document (PatchDocument)
- Return type:
None
- async update_entity(entity_id, entity)
Update one GLPI entity with a partial body.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to update.
- entity
PatchEntity Partial request body.
- entity_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
entity (PatchEntity)
- Return type:
None
- async update_item_plugin_field_row(*, itemtype, container_name, row_id, values)
Update one existing plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype the container is attached to.
- container_name
str Internal name of the container.
- row_id
int Identifier of the existing value row (as returned by
list_item_plugin_field_rows()).- values
dict[str,object] Field-name → value mapping for the columns to update. Only the fields supplied here are touched; the others keep their previous value.
- itemtype
- Parameters:
- Return type:
None
- async update_kb_article(article_id, article)
Update one knowledge base article with a partial body.
When
article.categoriesis provided — including an empty list to clear every category — the categories are applied through the legacy fallback (set_kb_article_categories()) after the v2 patch, because the v2 API cannot write them; this requires a configured v1 session.None(the default) leaves categories untouched. Unlike create, update is not rolled back on a category failure — the v2 field changes are already applied.- Parameters:
article_id (int)
article (PatchKBArticle)
- Return type:
None
- async update_kb_article_comment(article_id, comment_id, comment)
Update one knowledge base article comment with a partial body.
- Parameters:
article_id (int)
comment_id (int)
comment (PatchKBArticleComment)
- Return type:
None
- async update_kb_category(category_id, category)
Update one knowledge base category with a partial body.
- Parameters:
category_id (int)
category (PatchKBCategory)
- Return type:
None
- async update_location(location_id, location)
Update one GLPI location with a partial body.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to update.
- location
PatchLocation Partial request body.
- location_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
location (PatchLocation)
- Return type:
None
- async update_ticket(ticket_id, ticket)
Update one GLPI ticket with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to update.
- ticket
PatchTicket Partial request body. Only fields explicitly set are sent.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
ticket (PatchTicket)
- Return type:
None
- async update_ticket_followup(ticket_id, followup_id, followup)
Update one ticket followup with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to update.
- followup
PatchFollowup Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
followup_id (int)
followup (PatchFollowup)
- Return type:
None
- async update_ticket_solution(ticket_id, solution_id, solution)
Update one ticket solution with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to update.
- solution
PatchSolution Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
solution_id (int)
solution (PatchSolution)
- Return type:
None
- async update_ticket_task(ticket_id, task_id, task)
Update one ticket task with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to update.
- task
PatchTicketTask Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
task_id (int)
task (PatchTicketTask)
- Return type:
None
- async update_ticket_timeline_document(ticket_id, document_link_id, document_link)
Update one timeline document link with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the timeline document link to update.
- document_link
PatchTimelineDocument Partial request body.
- ticket_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
document_link_id (int)
document_link (PatchTimelineDocument)
- Return type:
None
- async update_user(user_id, user)
Update one GLPI user with a partial body.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to update.
- user
PatchUser Partial request body. Only fields explicitly set are sent.
- user_id
- Returns:
- Raises:
GlpiStatusErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async upload_document(*, filename, content, mime_type='application/octet-stream', document_name=None, ticket_id=None, entity_id=None)
Upload one binary document via the legacy v1 multipart endpoint.
Document uploads use the legacy v1 multipart endpoint because the GLPI v2 API does not advertise a binary upload route. The upload is dispatched through the same v1 session as every other v1 call, so it needs
v1_base_urlandv1_user_tokento be configured on the client.- Parameters:
- filename
str Name to advertise in the multipart form. Required and must be non-empty.
- content
bytes Raw binary payload to upload.
- mime_type
str,optional MIME type advertised in the multipart part (defaults to
application/octet-stream).- document_name
str|None,optional Human-readable display name. Defaults to
filenamewhen omitted.- ticket_id
int|None,optional Identifier of one ticket to attach the uploaded document to.
- entity_id
int|None,optional Identifier of one GLPI entity to scope the upload to.
- filename
- Returns:
- Raises:
GlpiValidationErrorIf
filenameis empty.RuntimeErrorIf the v1 session is not configured on the client.
- Parameters:
- Return type:
Exceptions
Exceptions raised for a bad argument, an unexpected HTTP status, an
unusable response body, or content that cannot be converted derive from
GlpiError. GlpiStatusError, GlpiValidationError
and GlpiProtocolError also inherit ValueError for
backwards compatibility with releases that raised bare ValueError;
GlpiContentError and GlpiTransportError do not, because
nothing was passed in wrongly in either case.
Network-level faults (connection failures, DNS errors, timeouts) are
raised as GlpiTransportError, or its GlpiTimeoutError
subclass for a timeout, with the underlying transport exception attached
as __cause__. Catching GlpiError is therefore sufficient for
the library’s failure surface – you never need to import the HTTP
library. A handful of sites do still deliberately raise bare
RuntimeError or TypeError instead
of a library type, so existing except RuntimeError / except
TypeError code keeps working. See 7. Error handling in the user
guide for the full picture, including which methods raise which type.
- exception GlpiError[source]
Bases:
ExceptionBase class for every exception raised by
glpi_python_client.
- exception GlpiTransportError[source]
Bases:
GlpiErrorThe HTTP request never produced a response.
Raised for connection failures, DNS errors, and other network-level faults where GLPI returned no status code at all. The underlying transport exception is always attached as
__cause__, so the original fault stays available for debugging without callers having to catch it.Unlike most of the hierarchy this does not inherit
ValueError: nothing was passed in wrongly and no value came back, so the back-compatibility argument that applies to the status and validation errors does not apply here.Network faults are retried before they surface – three attempts – so receiving this means the fault persisted.
- exception GlpiTimeoutError[source]
Bases:
GlpiTransportErrorThe HTTP request exceeded its timeout before GLPI responded.
A narrowing of
GlpiTransportErrorthat separates “GLPI was too slow” from “GLPI was unreachable”. Catch the parent class to handle both together.
- exception GlpiStatusError(message, *, status_code, url, response_text='')[source]
Bases:
GlpiError,ValueErrorGLPI answered with an unexpected HTTP status code.
- Parameters:
- Attributes:
- Parameters:
- Return type:
None
- exception GlpiAuthError(message, *, status_code, url, response_text='')[source]
Bases:
GlpiStatusErrorGLPI rejected the credentials or the caller lacks rights (401/403).
- exception GlpiNotFoundError(message, *, status_code, url, response_text='')[source]
Bases:
GlpiStatusErrorGLPI has no resource at the requested URL (404).
- exception GlpiServerError(message, *, status_code, url, response_text='')[source]
Bases:
GlpiStatusErrorGLPI failed to serve the request (5xx). Retried by the transport.
- exception GlpiValidationError[source]
Bases:
GlpiError,ValueErrorThe caller supplied an argument or configuration the client rejects.
- exception GlpiProtocolError[source]
Bases:
GlpiError,ValueErrorGLPI answered successfully with a body the client cannot use.
Raised when the server returns a success status but the payload is missing a documented field or has an unusable shape. The caller did nothing wrong, so this is deliberately distinct from
GlpiValidationError.
- exception GlpiContentError[source]
Bases:
GlpiErrorA rich-text content value could not be converted.
Raised when
GlpiContentConvertercannot translate a value between GLPI’s HTML transport format and the package’s canonical Markdown — in either direction. The underlying fault is always attached as__cause__.This exists so that no failure of the content layer escapes the package’s taxonomy. The conversion runs third-party parsers (
markdownifyinbound,markdownoutbound), and a parser fault used to reach the caller as a bare builtin — most visibly aRecursionError, whichexcept GlpiErrordoes not catch and which a caller reading a ticket has no reason to expect fromget_ticket. Deeply nested HTML is caught and answered with the body’s text instead of raising at all (seeglpi_python_client.content.conversion.GlpiContentConverter.from_transport()); this is the backstop for everything else.Unlike
GlpiStatusError,GlpiValidationErrorandGlpiProtocolErrorthis does not inheritValueError. Those three do so for back-compatibility with releases that raised bareValueErrorat the same sites; there was never aValueErrorhere to be compatible with, and a parser exhausting the interpreter’s stack is not a value the caller got wrong. The reasoning matchesGlpiTransportError.
Rich-text content
GLPI exchanges ticket, followup, task, solution and knowledge-base bodies as HTML. The package’s surface is Markdown in both directions, but the two directions work differently, and the difference is visible.
A write model (Post*, Patch*) takes Markdown in content and
renders it to HTML when the request is built. Nothing to think about.
A read model (Get*) keeps two views of the same body:
content_htmlwhat GLPI sent, verbatim. Also accepts the wire spelling
contenton construction.contentthe same body as Markdown, converted on the first read and cached.
GetKBArticlehasdescription/description_htmlas well.
Reading .content is what a caller wants and what earlier releases
returned, so no read-side code needs changing. What changed is when the
conversion happens, which buys two things: listing records costs nothing
per body, and a body that cannot be converted no longer stops the rest of
its page being read.
Very deeply nested HTML is the case worth knowing about.
markdownify walks the document recursively and runs out of stack at
around 494 levels of nesting. The converter does not try to predict
that: it attempts the conversion and, if the walk does not fit, strips
tags instead. It degrades, it never truncates, and it does not raise:
every character the normal rendering would have produced still appears.
What is lost is structure rather than words — link targets and image alt
text, code fencing and <pre> indentation, alignment.
Because the budget is the stack left when the conversion starts, the
same body can convert from one call site and degrade from a deeper one.
Anything else that goes wrong in either direction raises
GlpiContentError.
Because the conversion is cached on first read, a read model should be
treated as immutable afterwards: assigning to content_html, or
model_copy(update={"content_html": ...}), leaves the cached Markdown
in place. Rebuild through model_validate if you need to change it.
Aggregated Models
- class GlpiTicketContext(*, extra_payload=<factory>, ticket, tasks=<factory>, followups=<factory>, solutions=<factory>, documents=<factory>, **extra_data)[source]
Bases:
GlpiModelGrouped public ticket context returned by ticket-context workflows.
- Parameters:
- ticket
GetTicket Primary ticket record returned by the GLPI API.
- tasks
list[GetTicketTask],optional Linked task records.
- followups
list[GetFollowup],optional Linked followup records.
- solutions
list[GetSolution],optional Linked solution records.
- documents
list[GetDocument],optional Linked document records.
- ticket
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
ticket (GetTicket)
tasks (list[GetTicketTask])
followups (list[GetFollowup])
solutions (list[GetSolution])
documents (list[GetDocument])
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
to_markdown([options])Render the ticket and its timeline as one Markdown transcript.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
ticket (GetTicket)
tasks (list[GetTicketTask])
followups (list[GetFollowup])
solutions (list[GetSolution])
documents (list[GetDocument])
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
to_markdown([options])Render the ticket and its timeline as one Markdown transcript.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- documents: list[GetDocument]
- followups: list[GetFollowup]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- solutions: list[GetSolution]
- tasks: list[GetTicketTask]
- to_markdown(options=None)[source]
Render the ticket and its timeline as one Markdown transcript.
The rendering starts with the ticket title, then a compact subtitle line containing the requester, last editor, and the key timestamps exposed by the public ticket model. The ticket body is separated from the timeline itself, and each followup, task, and solution receives its own heading plus a metadata subtitle. Timeline entries are always sorted by
date_creationso the transcript follows the actual chronology rather than the GLPI UI anchoring hints. Linked documents are still appended in a dedicated section because the document-link payload does not expose the same authoring metadata.- Parameters:
- options
TicketMarkdownOptions,optional Controls which sections and metadata fields are included in the output. When None (the default) a fresh
TicketMarkdownOptionsis used, which enables all sections and fields.
- options
- Returns:
strMarkdown transcript suitable for direct display or for forwarding into a downstream Markdown renderer. The string never ends with trailing whitespace.
- Raises:
GlpiContentErrorOne of the bodies could not be converted from GLPI’s HTML. This is where the read models’ HTML-to-Markdown conversion actually happens – they hold the wire value and convert on first read, and this method is normally the first reader. Content too deeply nested for the converter to walk is degraded to plain text rather than raising, so this is a backstop rather than an expected outcome.
- Parameters:
options (TicketMarkdownOptions | None)
- Return type:
- class TicketMarkdownOptions(include_description=True, include_followups=True, include_tasks=True, include_solutions=True, include_documents=True, show_status=True, show_requester=True, show_editor=True, show_dates=True, show_event_author=True, show_event_editor=True, show_event_dates=True, show_event_state=True, show_event_status=True, show_duration=True, show_technician=True, show_approver=True)[source]
Bases:
objectOptions controlling which sections and fields appear in the Markdown export.
All flags default to
Trueso that a bareto_markdown()call reproduces the original full output.- Parameters:
- include_descriptionbool
Emit the
## Descriptionsection with the ticket body.- include_followupsbool
Include followup entries in the
## Timelinesection.- include_tasksbool
Include task entries in the
## Timelinesection.- include_solutionsbool
Include solution entries in the
## Timelinesection.- include_documentsbool
Append the
## Documentssection with linked file references.- show_statusbool
Emit the
Statusfield in the ticket subtitle line.- show_requesterbool
Emit the
Requesterfield in the ticket subtitle line.- show_editorbool
Emit the
Last edited byfield in the ticket subtitle line.- show_datesbool
Emit all ticket-level date fields (created, updated, resolved, closed) in the ticket subtitle line.
- show_event_authorbool
Emit the
Created byfield in timeline-entry subtitle lines.- show_event_editorbool
Emit the
Last edited byfield in timeline-entry subtitle lines.- show_event_datesbool
Emit date fields (created, updated, scheduled, planned start/end, approved) in timeline-entry subtitle lines.
- show_event_statebool
Emit the
Statefield in timeline-entry subtitle lines.- show_event_statusbool
Emit the
Statusfield in timeline-entry subtitle lines.- show_durationbool
Emit the
Durationfield in task subtitle lines.- show_technicianbool
Emit the
TechnicianandTechnician groupfields in task subtitle lines.- show_approverbool
Emit the
Approverfield in solution subtitle lines.
- Parameters:
include_description (bool)
include_followups (bool)
include_tasks (bool)
include_solutions (bool)
include_documents (bool)
show_status (bool)
show_requester (bool)
show_editor (bool)
show_dates (bool)
show_event_author (bool)
show_event_editor (bool)
show_event_dates (bool)
show_event_state (bool)
show_event_status (bool)
show_duration (bool)
show_technician (bool)
show_approver (bool)
Common Reference Models
- class IdRef(*, extra_payload=<factory>, id=None, **extra_data)[source]
Bases:
GlpiModelForeign-key reference carrying only the GLPI identifier.
The GLPI write endpoints accept foreign-key values as
{"id": int}objects. Use this helper to build outgoing request bodies that target a related GLPI item.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class IdNameRef(*, extra_payload=<factory>, id=None, name=None, **extra_data)[source]
Bases:
GlpiModelForeign-key reference carrying both id and read-only name.
GLPI returns relationships as
{"id": int, "name": str}payloads on most endpoints. Thenamevalue is server-managed and is preserved here purely for read-side convenience.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class IdNameCompletenameRef(*, extra_payload=<factory>, id=None, name=None, completename=None, **extra_data)[source]
Bases:
GlpiModelForeign-key reference carrying id, name, and completename.
A few GLPI relationships, such as
Ticket.entity, surface a thirdcompletenameslot that holds the dotted hierarchical name.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Tickets
- class GetTicket(*, extra_payload=<factory>, id=None, name=None, content_html=None, user_recipient=None, user_editor=None, is_deleted=None, category=None, location=None, urgency=None, impact=None, priority=None, actiontime=None, begin_waiting_date=None, waiting_duration=None, resolution_duration=None, close_duration=None, resolution_date=None, date_creation=None, date_mod=None, date=None, date_solve=None, date_close=None, type=None, external_id=None, request_type=None, take_into_account_date=None, take_into_account_duration=None, sla_ttr=None, sla_tto=None, ola_ttr=None, ola_tto=None, sla_level_ttr=None, ola_level_ttr=None, sla_waiting_duration=None, ola_waiting_duration=None, ola_ttr_begin_date=None, ola_tto_begin_date=None, internal_resolution_date=None, internal_take_into_account_date=None, global_validation=None, status=None, entity=None, team=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Assistance/Ticketendpoints.Mirrors
components.schemas.Ticket. Fields markedreadOnlyin the contract are excluded from the write models.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Title of the ticket.
- content_html
GlpiRawContent Body of the ticket exactly as GLPI sent it, which is HTML (
format: html). Accepts the wire spellingcontenttoo. Readcontentfor Markdown. Defaults toNone.- user_recipient
IdNameRef|None,optional Reference to the user designated as the ticket recipient (no contract description).
- user_editor
IdNameRef|None,optional Reference to the user who last edited the ticket.
- is_deletedbool |
None,optional Whether the ticket has been moved to the trash.
- category
IdNameRef|None,optional Reference to the ITIL category of the ticket.
- location
IdNameRef|None,optional Reference to the location associated with the ticket.
- urgency
GlpiPriority|None,optional Urgency level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- impact
GlpiPriority|None,optional Impact level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- priority
GlpiPriority|None,optional Computed or manually overridden priority (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- actiontime
int|None,optional Total action time in seconds (
readOnly).- begin_waiting_date
datetime|None,optional Timestamp at which the ticket entered the pending state (
readOnly).- waiting_duration
int|None,optional Total waiting duration in seconds (contract field
waiting_duration—Total waiting duration in seconds,readOnly).- resolution_duration
int|None,optional Total resolution duration in seconds (contract field
resolution_duration—Total resolution duration in seconds,readOnly).- close_duration
int|None,optional Total close duration in seconds (contract field
close_duration—Total close duration in seconds,readOnly).- resolution_date
datetime|None,optional Timestamp at which the ticket was resolved (
readOnly).- date_creation
datetime|None,optional Creation timestamp of the ticket record.
- date_mod
datetime|None,optional Last modification timestamp of the ticket record.
- date
datetime|None,optional Opening date of the ticket.
- date_solve
datetime|None,optional Date the ticket was marked as solved.
- date_close
datetime|None,optional Date the ticket was closed.
- type
GlpiTicketType|None,optional Ticket category (contract field
type—The type of the ticket; enumeration:1Incident,2Request).- external_id
str|None,optional Identifier assigned by an external system.
- request_type
IdNameRef|None,optional Reference to the request type or channel.
- take_into_account_date
datetime|None,optional Timestamp at which a technician first acknowledged the ticket (
readOnly).- take_into_account_duration
int|None,optional Total take-into-account duration in seconds (contract field
take_into_account_duration—Total take into account duration in seconds,readOnly).- sla_ttr
IdNameRef|None,optional SLA applied for time-to-resolve.
- sla_tto
IdNameRef|None,optional SLA applied for time-to-own.
- ola_ttr
IdNameRef|None,optional OLA applied for time-to-resolve.
- ola_tto
IdNameRef|None,optional OLA applied for time-to-own.
- sla_level_ttr
IdNameRef|None,optional SLA level escalation step for time-to-resolve.
- ola_level_ttr
IdNameRef|None,optional OLA level escalation step for time-to-resolve.
- sla_waiting_duration
int|None,optional Total SLA waiting duration in seconds (contract field
sla_waiting_duration—Total SLA waiting duration in seconds,readOnly).- ola_waiting_duration
int|None,optional Total OLA waiting duration in seconds (contract field
ola_waiting_duration—Total OLA waiting duration in seconds,readOnly).- ola_ttr_begin_date
datetime|None,optional Timestamp at which the OLA TTR clock started (
readOnly).- ola_tto_begin_date
datetime|None,optional Timestamp at which the OLA TTO clock started (
readOnly).- internal_resolution_date
datetime|None,optional Internal resolution date used for OLA computations (
readOnly; no contract description).- internal_take_into_account_date
datetime|None,optional Internal take-into-account date used for OLA computations (
readOnly).- global_validation
GlpiGlobalValidation|None,optional Aggregated validation status of the ticket (contract field
global_validation—The global status of the validation; enumeration:1None,2Waiting,3Accepted,4Refused).- status
IdNameRef|None,optional Current ticket status as an id/name reference.
- entity
IdNameCompletenameRef|None,optional Reference to the GLPI entity that owns the ticket.
- team
list[_TicketTeamMember] |None,optional Inline list of actors assigned to the ticket.
- id
- Attributes:
- content
The ticket body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so listing tickets costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
user_recipient (IdNameRef | None)
user_editor (IdNameRef | None)
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
actiontime (int | None)
begin_waiting_date (datetime | None)
waiting_duration (int | None)
resolution_duration (int | None)
close_duration (int | None)
resolution_date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
take_into_account_date (datetime | None)
take_into_account_duration (int | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
sla_waiting_duration (int | None)
ola_waiting_duration (int | None)
ola_ttr_begin_date (datetime | None)
ola_tto_begin_date (datetime | None)
internal_resolution_date (datetime | None)
internal_take_into_account_date (datetime | None)
global_validation (GlpiGlobalValidation | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
team (list[_TicketTeamMember] | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
- content
The ticket body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so listing tickets costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
user_recipient (IdNameRef | None)
user_editor (IdNameRef | None)
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
actiontime (int | None)
begin_waiting_date (datetime | None)
waiting_duration (int | None)
resolution_duration (int | None)
close_duration (int | None)
resolution_date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
take_into_account_date (datetime | None)
take_into_account_duration (int | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
sla_waiting_duration (int | None)
ola_waiting_duration (int | None)
ola_ttr_begin_date (datetime | None)
ola_tto_begin_date (datetime | None)
internal_resolution_date (datetime | None)
internal_take_into_account_date (datetime | None)
global_validation (GlpiGlobalValidation | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
team (list[_TicketTeamMember] | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- property content: str | None
The ticket body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so listing tickets costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.
- content_html: GlpiRawContent
- entity: IdNameCompletenameRef | None
- global_validation: GlpiGlobalValidation | None
- impact: GlpiPriority | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- priority: GlpiPriority | None
- type: GlpiTicketType | None
- urgency: GlpiPriority | None
- class PostTicket(*, extra_payload=<factory>, name=None, content=None, is_deleted=None, category=None, location=None, urgency=None, impact=None, priority=None, date_creation=None, date_mod=None, date=None, date_solve=None, date_close=None, type=None, external_id=None, request_type=None, sla_ttr=None, sla_tto=None, ola_ttr=None, ola_tto=None, sla_level_ttr=None, ola_level_ttr=None, global_validation=None, entity=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Assistance/Ticket.Read-only contract fields are excluded, and so is
status– not because the contract marks itreadOnly(it does, and it is wrong about that: seePatchTicket) but because GLPI 11 ignores the field on create. Measured on a live instance: posting{"status": 4}answers201and the new ticket reads back asNew. Declaring it here would publish a create argument that does nothing.- Parameters:
- name
str|None,optional Title of the ticket.
- content
GlpiMarkdownContent Body of the ticket; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- is_deletedbool |
None,optional Whether to create the ticket in the trashed state.
- category
IdNameRef|None,optional Reference to the ITIL category of the ticket.
- location
IdNameRef|None,optional Reference to the location associated with the ticket.
- urgency
GlpiPriority|None,optional Urgency level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- impact
GlpiPriority|None,optional Impact level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- priority
GlpiPriority|None,optional Priority override (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- date_creation
datetime|None,optional Creation timestamp to set on the ticket record.
- date_mod
datetime|None,optional Modification timestamp to set on the ticket record.
- date
datetime|None,optional Opening date to assign to the ticket.
- date_solve
datetime|None,optional Date to set as the solved timestamp.
- date_close
datetime|None,optional Date to set as the closed timestamp.
- type
GlpiTicketType|None,optional Ticket category (contract field
type—The type of the ticket; enumeration:1Incident,2Request).- external_id
str|None,optional Identifier assigned by an external system.
- request_type
IdNameRef|None,optional Reference to the request type or channel.
- sla_ttr
IdNameRef|None,optional SLA to apply for time-to-resolve.
- sla_tto
IdNameRef|None,optional SLA to apply for time-to-own.
- ola_ttr
IdNameRef|None,optional OLA to apply for time-to-resolve.
- ola_tto
IdNameRef|None,optional OLA to apply for time-to-own.
- sla_level_ttr
IdNameRef|None,optional SLA level escalation step for time-to-resolve.
- ola_level_ttr
IdNameRef|None,optional OLA level escalation step for time-to-resolve.
- global_validation
GlpiGlobalValidation|None,optional Aggregated validation status to set on the ticket (contract field
global_validation—The global status of the validation; enumeration:1None,2Waiting,3Accepted,4Refused).- entity
IdNameCompletenameRef|None,optional Reference to the GLPI entity that owns the ticket.
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- entity: IdNameCompletenameRef | None
- global_validation: GlpiGlobalValidation | None
- impact: GlpiPriority | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- priority: GlpiPriority | None
- type: GlpiTicketType | None
- urgency: GlpiPriority | None
- class PatchTicket(*, extra_payload=<factory>, name=None, content=None, is_deleted=None, category=None, location=None, urgency=None, impact=None, priority=None, date_creation=None, date_mod=None, date=None, date_solve=None, date_close=None, type=None, external_id=None, request_type=None, sla_ttr=None, sla_tto=None, ola_ttr=None, ola_tto=None, sla_level_ttr=None, ola_level_ttr=None, global_validation=None, entity=None, status=None, **extra_data)[source]
Bases:
PostTicketRequest body for
PATCH /Assistance/Ticket/{id}.Every
PostTicketfield applies here too.statusis the one field this model adds, and the reason the two are no longer interchangeable: GLPI honours a status write onPATCHand drops it onPOST.The contract disagrees, and it is worth knowing why the package used to as well. GLPI publishes
Ticket.status.idasreadOnly: true, so the field was excluded on the stated grounds that the lifecycle could only be moved through the timeline routes. Measured against a live GLPI 11 instance,PATCHwith{"status": 5}returns 200 and the ticket really does move – the published contract is simply wrong here, the same way it omits theMajorlevel frompriority(seeGlpiPriority).statusis typed as the enum rather than a bareintbecause GLPI validates nothing on this field and its interface hides the damage. Writing99answers 200 and stores it: the API then reports{"id": 99, "name": "99"}, the web form displays the ticket as New, and the ticket disappears from the ticket list while staying open in the database. Only the history records what happened. A typo such as55for5therefore loses a ticket silently, and this enum is the only thing on the path that can catch it.- Parameters:
- status
GlpiTicketStatus|None,optional Lifecycle status to move the ticket to (
1New,2Assigned,3Planned,4Pending,5Solved,6Closed,10Validation). Serialises to the bare integer form, which is the spelling measured as honoured; the nested{"id": ...}form works too, butstatus_iddoes not.
- status
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
status (GlpiTicketStatus | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
status (GlpiTicketStatus | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: GlpiTicketStatus | None
- class DeleteTicket(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Assistance/Ticket/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Followups
- class GetFollowup(*, extra_payload=<factory>, id=None, itemtype=None, items_id=None, content_html=None, is_private=None, user=None, user_editor=None, request_type=None, date=None, date_creation=None, date_mod=None, timeline_position=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline followup endpoints.Mirrors
components.schemas.Followup. Most fields carry nodescriptionin the contract;content(format: html) andtimeline_positionare notable exceptions.- Parameters:
- id
int|None,optional Native GLPI identifier of the followup (
readOnly).- itemtype
str|None,optional GLPI item type the followup belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- content_html
GlpiRawContent Body of the followup exactly as GLPI sent it, which is HTML (
format: html). Accepts the wire spellingcontenttoo. Readcontentfor Markdown. Defaults toNone.- is_privatebool |
None,optional Whether the followup is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the followup.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the followup.
- request_type
IdNameRef|None,optional Reference to the request type or channel of the followup (no contract description).
- date
datetime|None,optional Date the followup was written.
- date_creation
datetime|None,optional Creation timestamp of the followup record.
- date_mod
datetime|None,optional Last modification timestamp of the followup record.
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the followup in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- source_item_id
int|None,optional Identifier of the source item that generated this followup, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this followup is a source (no contract description).
- id
- Attributes:
- content
The followup body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
itemtype (str | None)
items_id (int | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
- content
The followup body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
itemtype (str | None)
items_id (int | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- property content: str | None
The followup body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.
- content_html: GlpiRawContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PostFollowup(*, extra_payload=<factory>, itemtype=None, items_id=None, content=None, is_private=None, user=None, user_editor=None, request_type=None, date=None, date_creation=None, date_mod=None, timeline_position=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline followup endpoints.Read-only contract field (
id) is excluded. All other fields fromcomponents.schemas.Followupare writable.- Parameters:
- itemtype
str|None,optional GLPI item type the followup belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- content
GlpiMarkdownContent Body of the followup; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- is_privatebool |
None,optional Whether the followup is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the followup.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the followup.
- request_type
IdNameRef|None,optional Reference to the request type or channel of the followup (no contract description).
- date
datetime|None,optional Date to assign to the followup.
- date_creation
datetime|None,optional Creation timestamp to set on the followup record.
- date_mod
datetime|None,optional Last modification timestamp to set on the followup record (no contract description).
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the followup in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- source_item_id
int|None,optional Identifier of the source item that generated this followup, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this followup is a source (no contract description).
- itemtype
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PatchFollowup(*, extra_payload=<factory>, itemtype=None, items_id=None, content=None, is_private=None, user=None, user_editor=None, request_type=None, date=None, date_creation=None, date_mod=None, timeline_position=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
PostFollowupRequest body for
PATCHon ticket timeline followup endpoints.Inherits all fields from
PostFollowup.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteFollowup(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline followup endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Tasks
- class GetTicketTask(*, extra_payload=<factory>, id=None, uuid=None, content_html=None, is_private=None, user=None, user_editor=None, user_tech=None, group_tech=None, date=None, date_creation=None, date_mod=None, duration=None, planned_begin=None, planned_end=None, state=None, category=None, timeline_position=None, tickets_id=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline task endpoints.Mirrors
components.schemas.TicketTask. Several fields carrydescriptionvalues in the contract; others are documented by field name and type.- Parameters:
- id
int|None,optional Native GLPI identifier of the task (
readOnly).- uuid
str|None,optional Server-generated universally unique identifier matching the pattern
/^[0-9a-f]{8}-...-4...-[89ab]...-...$/i(readOnly).- content_html
GlpiRawContent Body of the task exactly as GLPI sent it, which is HTML (
format: html). Accepts the wire spellingcontenttoo. Readcontentfor Markdown. Defaults toNone.- is_privatebool |
None,optional Whether the task is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the task.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the task.
- user_tech
IdNameRef|None,optional Reference to the technician assigned to perform the task (no contract description).
- group_tech
IdNameRef|None,optional Reference to the group assigned to perform the task.
- date
datetime|None,optional Date the task was created.
- date_creation
datetime|None,optional Creation timestamp of the task record.
- date_mod
datetime|None,optional Last modification timestamp of the task record.
- duration
int|None,optional Time spent on the task in seconds.
- planned_begin
datetime|None,optional Planned start date and time for the task.
- planned_end
datetime|None,optional Planned end date and time for the task.
- state
GlpiTaskState|None,optional Completion state of the task (contract field
state—The state of the task; enumeration:0Information,1To do,2Done).- category
IdNameRef|None,optional Reference to the task category.
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the task in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- tickets_id
int|None,optional Identifier of the parent ticket.
- source_item_id
int|None,optional Identifier of the source item that generated this task, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this task is a source (no contract description).
- id
- Attributes:
- content
The task body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
uuid (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
- content
The task body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
uuid (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- property content: str | None
The task body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.
- content_html: GlpiRawContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: GlpiTaskState | None
- timeline_position: GlpiTimelinePosition | None
- class PostTicketTask(*, extra_payload=<factory>, content=None, is_private=None, user=None, user_editor=None, user_tech=None, group_tech=None, date=None, date_creation=None, date_mod=None, duration=None, planned_begin=None, planned_end=None, state=None, category=None, timeline_position=None, tickets_id=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline task endpoints.Read-only contract fields (
id,uuid) are excluded.- Parameters:
- content
GlpiMarkdownContent Body of the task; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- is_privatebool |
None,optional Whether the task is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the task.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the task.
- user_tech
IdNameRef|None,optional Reference to the technician assigned to perform the task (no contract description).
- group_tech
IdNameRef|None,optional Reference to the group assigned to perform the task.
- date
datetime|None,optional Date to assign to the task.
- date_creation
datetime|None,optional Creation timestamp to set on the task record.
- date_mod
datetime|None,optional Last modification timestamp to set on the task record (no contract description).
- duration
int|None,optional Time spent on the task in seconds.
- planned_begin
datetime|None,optional Planned start date and time for the task.
- planned_end
datetime|None,optional Planned end date and time for the task.
- state
GlpiTaskState|None,optional Completion state of the task (contract field
state—The state of the task; enumeration:0Information,1To do,2Done).- category
IdNameRef|None,optional Reference to the task category.
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the task in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- tickets_id
int|None,optional Identifier of the parent ticket.
- source_item_id
int|None,optional Identifier of the source item that generated this task, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this task is a source (no contract description).
- content
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: GlpiTaskState | None
- timeline_position: GlpiTimelinePosition | None
- class PatchTicketTask(*, extra_payload=<factory>, content=None, is_private=None, user=None, user_editor=None, user_tech=None, group_tech=None, date=None, date_creation=None, date_mod=None, duration=None, planned_begin=None, planned_end=None, state=None, category=None, timeline_position=None, tickets_id=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
PostTicketTaskRequest body for
PATCHon ticket timeline task endpoints.Inherits all fields from
PostTicketTask.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteTicketTask(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline task endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Solutions
- class GetSolution(*, extra_payload=<factory>, id=None, itemtype=None, items_id=None, type=None, content_html=None, user=None, user_editor=None, approver=None, status=None, approval_followup=None, date_creation=None, date_mod=None, date_approval=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline solution endpoints.Mirrors
components.schemas.Solution. Most fields carry nodescriptionin the contract;statusis a notable exception.- Parameters:
- id
int|None,optional Native GLPI identifier of the solution (
readOnly).- itemtype
str|None,optional GLPI item type the solution belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- type
IdNameRef|None,optional Reference to the solution type.
- content_html
GlpiRawContent Body of the solution exactly as GLPI sent it, which is HTML (
format: html). Accepts the wire spellingcontenttoo. Readcontentfor Markdown. Defaults toNone.- user
IdNameRef|None,optional Reference to the author of the solution.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the solution.
- approver
IdNameRef|None,optional Reference to the user who approved or rejected the solution (no contract description).
- status
GlpiSolutionStatus|None,optional Approval state of the solution (contract field
status—The status of the solution; enumeration:1None,2Waiting,3Accepted,4Refused).- approval_followup
IdNameRef|None,optional Reference to the followup generated when the solution was approved or rejected.
- date_creation
datetime|None,optional Creation timestamp of the solution record.
- date_mod
datetime|None,optional Last modification timestamp of the solution record.
- date_approval
datetime|None,optional Timestamp at which the solution was approved or rejected (no contract description).
- id
- Attributes:
- content
The solution body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
- content
The solution body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- property content: str | None
The solution body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so reading a ticket’s timeline costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.
- content_html: GlpiRawContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: GlpiSolutionStatus | None
- class PostSolution(*, extra_payload=<factory>, itemtype=None, items_id=None, type=None, content=None, user=None, user_editor=None, approver=None, status=None, approval_followup=None, date_creation=None, date_mod=None, date_approval=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline solution endpoints.Read-only contract field (
id) is excluded.- Parameters:
- itemtype
str|None,optional GLPI item type the solution belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- type
IdNameRef|None,optional Reference to the solution type.
- content
GlpiMarkdownContent Body of the solution; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- user
IdNameRef|None,optional Reference to the author of the solution.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the solution.
- approver
IdNameRef|None,optional Reference to the user who approved or rejected the solution (no contract description).
- status
GlpiSolutionStatus|None,optional Approval state of the solution (contract field
status—The status of the solution; enumeration:1None,2Waiting,3Accepted,4Refused).- approval_followup
IdNameRef|None,optional Reference to the followup generated when the solution was approved or rejected.
- date_creation
datetime|None,optional Creation timestamp to set on the solution record.
- date_mod
datetime|None,optional Last modification timestamp to set on the solution record (no contract description).
- date_approval
datetime|None,optional Timestamp at which the solution was approved or rejected (no contract description).
- itemtype
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: GlpiSolutionStatus | None
- class PatchSolution(*, extra_payload=<factory>, itemtype=None, items_id=None, type=None, content=None, user=None, user_editor=None, approver=None, status=None, approval_followup=None, date_creation=None, date_mod=None, date_approval=None, **extra_data)[source]
Bases:
PostSolutionRequest body for
PATCHon ticket timeline solution endpoints.Inherits all fields from
PostSolution.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteSolution(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline solution endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Documents
- class GetTimelineDocument(*, extra_payload=<factory>, id=None, itemtype=None, items_id=None, documents_id=None, filepath=None, timeline_position=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline document endpoints.Mirrors
components.schemas.Document_Item. Most fields are markedreadOnlyin the contract and are never accepted on write requests. Onlytimeline_positionis writable.- Parameters:
- id
int|None,optional Native GLPI identifier of the document-item link (
readOnly).- itemtype
str|None,optional GLPI item type the document is attached to (
readOnly).- items_id
int|None,optional Identifier of the parent GLPI item (
readOnly).- documents_id
int|None,optional Identifier of the referenced
Documentrecord (readOnly; no contract description).- filepath
str|None,optional Server-managed storage path of the linked file (
readOnly; no contract description).- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the document in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PostTimelineDocument(*, extra_payload=<factory>, timeline_position=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline document endpoints.All read-only contract fields (
id,itemtype,items_id,documents_id,filepath) are excluded; only the writabletimeline_positionfield is exposed.- Parameters:
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the document in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).
- timeline_position
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PatchTimelineDocument(*, extra_payload=<factory>, timeline_position=None, **extra_data)[source]
Bases:
PostTimelineDocumentRequest body for
PATCHon ticket timeline document endpoints.Inherits the single writable field (
timeline_position) fromPostTimelineDocument.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteTimelineDocument(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline document endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Team Members
- class GetTeamMember(*, extra_payload=<factory>, id=None, name=None, type=None, role=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket team-member endpoints.Mirrors
components.schemas.TeamMember. No field carries adescriptionin the OpenAPI contract; the parameters below are documented by field name and context.- Parameters:
- id
int|None,optional Native GLPI identifier of the team-member link (
readOnly).- name
str|None,optional Display name of the actor (typically the user or group name).
- type
str|None,optional GLPI actor type, such as
"User"or"Group".- role
str|None,optional Ticket role assigned to the actor, such as
"Requester","Observer"or"Assigned to".
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostTeamMember(*, extra_payload=<factory>, id=None, type=None, role=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket team-member endpoints.The contract marks
idasreadOnlyon the schema definition, but the live GLPI server still requires the target actor’sidto identify the team member, so the field is exposed here. No field carries adescriptionin the OpenAPI contract.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchTeamMember(*, extra_payload=<factory>, id=None, type=None, role=None, **extra_data)[source]
Bases:
PostTeamMemberRequest body for
PATCHon ticket team-member endpoints.Inherits all fields from
PostTeamMember.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteTeamMember(*, extra_payload=<factory>, **extra_data)[source]
Bases:
GlpiModelPlaceholder body for
DELETEon ticket team-member endpoints.The contract advertises the role, itemtype and user identifiers as path parameters and exposes no body or query parameters; this empty model is kept for parity with the rest of the
api_schemapackage.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Documents
- class GetDocument(*, extra_payload=<factory>, id=None, name=None, comment=None, entity=None, date_creation=None, date_mod=None, is_deleted=None, filename=None, filepath=None, mime=None, sha1sum=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Management/Documentendpoints.Mirrors
components.schemas.Document. No field carries adescriptionin the OpenAPI contract. Thefilepathfield is server-managed (readOnly).- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Display name of the document.
- comment
str|None,optional Free-form comment associated with the document.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- date_creation
datetime|None,optional Creation timestamp of the document record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the document record (
format: date-time).- is_deletedbool |
None,optional Whether the document has been moved to the trash.
- filename
str|None,optional Original file name of the uploaded file.
- filepath
str|None,optional Server-managed storage path of the file (
readOnly).- mime
str|None,optional MIME type of the uploaded file.
- sha1sum
str|None,optional SHA-1 checksum of the stored file, used for deduplication.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostDocument(*, extra_payload=<factory>, name=None, comment=None, entity=None, date_creation=None, date_mod=None, is_deleted=None, filename=None, mime=None, sha1sum=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Management/Document.Read-only contract fields (
id,filepath) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Display name of the document.
- comment
str|None,optional Free-form comment associated with the document.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- date_creation
datetime|None,optional Creation timestamp to set on the document record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the document record (
format: date-time).- is_deletedbool |
None,optional Whether to create the document in the trashed state.
- filename
str|None,optional Original file name of the uploaded file.
- mime
str|None,optional MIME type of the uploaded file.
- sha1sum
str|None,optional SHA-1 checksum of the stored file, used for deduplication.
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchDocument(*, extra_payload=<factory>, name=None, comment=None, entity=None, date_creation=None, date_mod=None, is_deleted=None, filename=None, mime=None, sha1sum=None, **extra_data)[source]
Bases:
PostDocumentRequest body for
PATCH /Management/Document/{id}.The contract uses the same
Documentschema for create and partial-update bodies;PatchDocumentis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteDocument(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Management/Document/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Users
- class GetUser(*, extra_payload=<factory>, id=None, username=None, realname=None, firstname=None, phone=None, phone2=None, mobile=None, emails=None, comment=None, is_active=None, is_deleted=None, picture=None, date_password_change=None, location=None, authtype=None, last_login=None, default_profile=None, default_entity=None, date_creation=None, date_mod=None, date_sync=None, title=None, category=None, registration_number=None, begin_date=None, end_date=None, nickname=None, substitution_start_date=None, substitution_end_date=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Administration/Userendpoints.Mirrors
components.schemas.User(GLPI description:Utilisateur). All fields are optional because the contract does not advertise arequiredarray; absent ornullvalues from the server are surfaced asNone. Credential fields are markedwriteOnlyin the contract and are therefore never returned by GET endpoints, so they are absent from this model.- Parameters:
- id
int|None,optional Native GLPI identifier (contract field
id—ID,readOnly).- username
str|None,optional Login name of the user (contract field
username—Username).- realname
str|None,optional Family name (contract field
realname—Real name).- firstname
str|None,optional Given name (contract field
firstname—First name).- phone
str|None,optional Primary phone number (contract field
phone—Phone number).- phone2
str|None,optional Secondary phone number (contract field
phone2—Phone number 2).- mobile
str|None,optional Mobile phone number (contract field
mobile—Mobile phone number).- emails
list[_EmailAddress] |None,optional Collection of e-mail addresses attached to the user (contract field
emails—Email addresses).- comment
str|None,optional Free-form comment associated with the user (contract field
comment—Comment).- is_activebool |
None,optional Whether the account is currently active (contract field
is_active—Is active).- is_deletedbool |
None,optional Whether the account has been moved to the trash (contract field
is_deleted—Is deleted).- picture
str|None,optional Path or identifier of the avatar picture (contract field
picture,readOnly).- date_password_change
datetime|None,optional Timestamp of the last password change (contract field
date_password_change—Date of last password change,readOnly).- location
IdNameRef|None,optional Reference to the user’s default location (contract field
location— embeddedLocationobject).- authtype
GlpiUserAuthType|None,optional Authentication backend used for this account (contract field
authtype). Numeric enumeration:1GLPI database,2Email,3LDAP,4External,5CAS,6X.509 Certificate.- last_login
datetime|None,optional Timestamp of the user’s last successful login (contract field
last_login).- default_profile
IdNameRef|None,optional Default profile assumed by the user at login (contract field
default_profile—Default profile).- default_entity
IdNameRef|None,optional Default entity scope assumed by the user at login (contract field
default_entity—Default entity).- date_creation
datetime|None,optional Creation timestamp of the user record (contract field
date_creation).- date_mod
datetime|None,optional Last modification timestamp of the user record (contract field
date_mod).- date_sync
datetime|None,optional Last synchronisation timestamp with the external directory (contract field
date_sync,readOnly).- title
IdNameRef|None,optional Reference to the user’s
UserTitle(contract fieldtitle; no contract description).- category
IdNameRef|None,optional Reference to the user’s
UserCategory(contract fieldcategory).- registration_number
str|None,optional Free-form registration/employee number (contract field
registration_number).- begin_date
datetime|None,optional Beginning of the validity window for the account (contract field
begin_date—Valid since).- end_date
datetime|None,optional End of the validity window for the account (contract field
end_date—Valid until).- nickname
str|None,optional Display nickname for the user (contract field
nickname,maxLength=50).- substitution_start_date
datetime|None,optional Start of the period during which this user is acting as a substitute (contract field
substitution_start_date).- substitution_end_date
datetime|None,optional End of the period during which this user is acting as a substitute (contract field
substitution_end_date).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
picture (str | None)
date_password_change (datetime | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_sync (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
picture (str | None)
date_password_change (datetime | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_sync (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- authtype: GlpiUserAuthType | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostUser(*, extra_payload=<factory>, username=None, realname=None, firstname=None, phone=None, phone2=None, mobile=None, emails=None, comment=None, is_active=None, is_deleted=None, password=None, password2=None, location=None, authtype=None, last_login=None, default_profile=None, default_entity=None, date_creation=None, date_mod=None, title=None, category=None, registration_number=None, begin_date=None, end_date=None, nickname=None, substitution_start_date=None, substitution_end_date=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Administration/User.Mirrors
components.schemas.Userfor create operations. Read-only contract fields (id,picture,date_password_change,date_sync) are intentionally excluded because the server rejects them on input. The contract markspasswordandpassword2aswriteOnly: they are accepted on create/update but never returned by GET endpoints.The two credential fields are typed as
pydantic.SecretStrso that the cleartext values do not leak throughrepr, log records, structured tracebacks or interactive debuggers. Their serializer unmasks the value viaSecretStr.get_secret_value()when the model is dumped into the outgoing JSON request body, so the API still receives the plain credential as it expects.- Parameters:
- username
str|None,optional Login name of the user (contract field
username—Username).- realname
str|None,optional Family name (contract field
realname—Real name).- firstname
str|None,optional Given name (contract field
firstname—First name).- phone
str|None,optional Primary phone number (contract field
phone—Phone number).- phone2
str|None,optional Secondary phone number (contract field
phone2—Phone number 2).- mobile
str|None,optional Mobile phone number (contract field
mobile—Mobile phone number).- emails
list[_EmailAddress] |None,optional Collection of e-mail addresses attached to the user (contract field
emails—Email addresses).- comment
str|None,optional Free-form comment associated with the user (contract field
comment—Comment).- is_activebool |
None,optional Whether the account should be created in the active state (contract field
is_active—Is active).- is_deletedbool |
None,optional Whether the account should be created in the trashed state (contract field
is_deleted—Is deleted).- password
SecretStr|None,optional Cleartext password to assign to the account (contract field
password—Password,format=password,writeOnly). Wrapped inSecretStr; the value is unmasked only when the request body is serialised.- password2
SecretStr|None,optional Confirmation of
password; the GLPI server validates that both fields match before persisting the account (contract fieldpassword2—Password confirmation,format=password,writeOnly). Wrapped inSecretStr; unmasked only on serialisation.- location
IdNameRef|None,optional Reference to the user’s default location (contract field
location— embeddedLocationobject).- authtype
GlpiUserAuthType|None,optional Authentication backend used for this account (contract field
authtype). Numeric enumeration:1GLPI database,2Email,3LDAP,4External,5CAS,6X.509 Certificate.- last_login
datetime|None,optional Timestamp of the user’s last successful login (contract field
last_login).- default_profile
IdNameRef|None,optional Default profile assumed by the user at login (contract field
default_profile—Default profile).- default_entity
IdNameRef|None,optional Default entity scope assumed by the user at login (contract field
default_entity—Default entity).- date_creation
datetime|None,optional Creation timestamp to override on the user record (contract field
date_creation).- date_mod
datetime|None,optional Last modification timestamp to override on the user record (contract field
date_mod).- title
IdNameRef|None,optional Reference to the user’s
UserTitle(contract fieldtitle; no contract description).- category
IdNameRef|None,optional Reference to the user’s
UserCategory(contract fieldcategory).- registration_number
str|None,optional Free-form registration/employee number (contract field
registration_number).- begin_date
datetime|None,optional Beginning of the validity window for the account (contract field
begin_date—Valid since).- end_date
datetime|None,optional End of the validity window for the account (contract field
end_date—Valid until).- nickname
str|None,optional Display nickname for the user (contract field
nickname,maxLength=50).- substitution_start_date
datetime|None,optional Start of the period during which this user is acting as a substitute (contract field
substitution_start_date).- substitution_end_date
datetime|None,optional End of the period during which this user is acting as a substitute (contract field
substitution_end_date).
- username
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- authtype: GlpiUserAuthType | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchUser(*, extra_payload=<factory>, username=None, realname=None, firstname=None, phone=None, phone2=None, mobile=None, emails=None, comment=None, is_active=None, is_deleted=None, password=None, password2=None, location=None, authtype=None, last_login=None, default_profile=None, default_entity=None, date_creation=None, date_mod=None, title=None, category=None, registration_number=None, begin_date=None, end_date=None, nickname=None, substitution_start_date=None, substitution_end_date=None, **extra_data)[source]
Bases:
PostUserRequest body for
PATCH /Administration/User/{id}.The contract uses the same
Userschema for create and partial-update bodies;PatchUseris kept distinct so client mixins can express the intent of the operation explicitly. All fields, including theSecretStr-wrappedpassword/password2pair inherited fromPostUser, behave exactly as on create.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteUser(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Administration/User/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Locations
- class GetLocation(*, extra_payload=<factory>, id=None, name=None, completename=None, code=None, alias=None, comment=None, entity=None, is_recursive=None, parent=None, level=None, room=None, building=None, address=None, town=None, postcode=None, state=None, country=None, latitude=None, longitude=None, altitude=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Dropdowns/Locationendpoints.Mirrors
components.schemas.Location. No field carries adescriptionin the OpenAPI contract; the parameter notes below reflect the field names, types andreadOnlyflags as advertised.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Short display name of the location.
- completename
str|None,optional Full hierarchical path of the location in dotted notation (
readOnly).- code
str|None,optional Short alphanumeric code assigned to the location.
- alias
str|None,optional Alternate name or alias for the location.
- comment
str|None,optional Free-form comment associated with the location.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- is_recursivebool |
None,optional Whether the location is visible to child entities.
- parent
IdNameRef|None,optional Reference to the parent location in the hierarchy.
- level
int|None,optional Depth of the location in the hierarchy tree (
readOnly).- room
str|None,optional Room identifier within the building.
- building
str|None,optional Building identifier.
- address
str|None,optional Street address of the location.
- town
str|None,optional Town or city name.
- postcode
str|None,optional Postal code.
- state
str|None,optional State, region or province.
- country
str|None,optional Country name.
- latitude
str|None,optional Geographic latitude coordinate.
- longitude
str|None,optional Geographic longitude coordinate.
- altitude
str|None,optional Altitude above sea level.
- date_creation
datetime|None,optional Creation timestamp of the location record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the location record (
format: date-time).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
completename (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
level (int | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
completename (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
level (int | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostLocation(*, extra_payload=<factory>, name=None, code=None, alias=None, comment=None, entity=None, is_recursive=None, parent=None, room=None, building=None, address=None, town=None, postcode=None, state=None, country=None, latitude=None, longitude=None, altitude=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Dropdowns/Location.Read-only contract fields (
id,completename,level) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Short display name of the location.
- code
str|None,optional Short alphanumeric code assigned to the location.
- alias
str|None,optional Alternate name or alias for the location.
- comment
str|None,optional Free-form comment associated with the location.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- is_recursivebool |
None,optional Whether the location is visible to child entities.
- parent
IdNameRef|None,optional Reference to the parent location in the hierarchy.
- room
str|None,optional Room identifier within the building.
- building
str|None,optional Building identifier.
- address
str|None,optional Street address of the location.
- town
str|None,optional Town or city name.
- postcode
str|None,optional Postal code.
- state
str|None,optional State, region or province.
- country
str|None,optional Country name.
- latitude
str|None,optional Geographic latitude coordinate.
- longitude
str|None,optional Geographic longitude coordinate.
- altitude
str|None,optional Altitude above sea level.
- date_creation
datetime|None,optional Creation timestamp to set on the location record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the location record (
format: date-time).
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchLocation(*, extra_payload=<factory>, name=None, code=None, alias=None, comment=None, entity=None, is_recursive=None, parent=None, room=None, building=None, address=None, town=None, postcode=None, state=None, country=None, latitude=None, longitude=None, altitude=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
PostLocationRequest body for
PATCH /Dropdowns/Location/{id}.The contract uses the same
Locationschema for create and partial-update bodies;PatchLocationis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteLocation(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Dropdowns/Location/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Knowledge Base — Articles
- class GetKBArticle(*, extra_payload=<factory>, id=None, name=None, content_html=None, categories=None, is_faq=None, entity=None, is_recursive=None, user=None, views=None, show_in_service_catalog=None, description_html=None, illustration=None, is_pinned=None, date_creation=None, date_mod=None, date_begin=None, date_end=None, revisions=None, translations=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Knowledgebase/Articleendpoints.Mirrors
components.schemas.KBArticle.content_htmlanddescription_htmlhold the HTML exactly as GLPI sent it, and both accept their wire spellings (content,description) as well; thecontentanddescriptionproperties convert to Markdown on first read.An article body is the largest content GLPI serves, and searching the knowledge base returns whole articles, so this is the model where converting only what is read matters most.
- Attributes:
- content
The article body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so searching the knowledge base costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.- description
The article summary as Markdown, or
Noneif GLPI sent none.The short counterpart to
content, converted fromdescription_htmlon the first read and cached the same way.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
is_faq (bool | None)
entity (IdNameRef | None)
is_recursive (bool | None)
user (IdNameRef | None)
views (int | None)
show_in_service_catalog (bool | None)
description_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['description_html', 'description']), serialization_alias='description')])
illustration (str | None)
is_pinned (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_begin (datetime | None)
date_end (datetime | None)
revisions (list[_KBArticleRevisionRef] | None)
translations (list[_KBArticleTranslationRef] | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
- content
The article body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so searching the knowledge base costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.- description
The article summary as Markdown, or
Noneif GLPI sent none.The short counterpart to
content, converted fromdescription_htmlon the first read and cached the same way.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
is_faq (bool | None)
entity (IdNameRef | None)
is_recursive (bool | None)
user (IdNameRef | None)
views (int | None)
show_in_service_catalog (bool | None)
description_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['description_html', 'description']), serialization_alias='description')])
illustration (str | None)
is_pinned (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_begin (datetime | None)
date_end (datetime | None)
revisions (list[_KBArticleRevisionRef] | None)
translations (list[_KBArticleTranslationRef] | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- property content: str | None
The article body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached, so searching the knowledge base costs nothing per body and a body that cannot be converted affects only this record.content_htmlholds the HTML exactly as it arrived.
- content_html: GlpiRawContent
- property description: str | None
The article summary as Markdown, or
Noneif GLPI sent none.The short counterpart to
content, converted fromdescription_htmlon the first read and cached the same way.
- description_html: GlpiRawDescription
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostKBArticle(*, extra_payload=<factory>, name=None, content=None, categories=None, is_faq=None, entity=None, is_recursive=None, user=None, show_in_service_catalog=None, description=None, illustration=None, is_pinned=None, date_creation=None, date_mod=None, date_begin=None, date_end=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Knowledgebase/Article.Server-managed fields are excluded:
id(readOnly),views(a server-side counter), and therevisions/translationshistory arrays. The contract marksuser.idas writable (the article author), souseris exposed here even though the server defaults it to the current user when omitted.categorieslooks writable but the GLPI 2.3.0 v2 API drops it (the nestedidisreadOnly).GlpiClient.create_kb_article/update_kb_articleapply it through a legacy fallback (set_kb_article_categories), which needs a configured v1 session pointing at the legacyapirest.php.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_faq (bool | None)
entity (IdNameRef | None)
is_recursive (bool | None)
user (IdNameRef | None)
show_in_service_catalog (bool | None)
description (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
illustration (str | None)
is_pinned (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_begin (datetime | None)
date_end (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_faq (bool | None)
entity (IdNameRef | None)
is_recursive (bool | None)
user (IdNameRef | None)
show_in_service_catalog (bool | None)
description (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
illustration (str | None)
is_pinned (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_begin (datetime | None)
date_end (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- description: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchKBArticle(*, extra_payload=<factory>, name=None, content=None, categories=None, is_faq=None, entity=None, is_recursive=None, user=None, show_in_service_catalog=None, description=None, illustration=None, is_pinned=None, date_creation=None, date_mod=None, date_begin=None, date_end=None, **extra_data)[source]
Bases:
PostKBArticleRequest body for
PATCH /Knowledgebase/Article/{article_id}.Inherits every writable field from
PostKBArticle.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_faq (bool | None)
entity (IdNameRef | None)
is_recursive (bool | None)
user (IdNameRef | None)
show_in_service_catalog (bool | None)
description (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
illustration (str | None)
is_pinned (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_begin (datetime | None)
date_end (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_faq (bool | None)
entity (IdNameRef | None)
is_recursive (bool | None)
user (IdNameRef | None)
show_in_service_catalog (bool | None)
description (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
illustration (str | None)
is_pinned (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_begin (datetime | None)
date_end (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteKBArticle(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelBody for
DELETE /Knowledgebase/Article/{article_id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Knowledge Base — Article Comments
- class GetKBArticleComment(*, extra_payload=<factory>, id=None, kbarticle=None, user=None, language=None, comment=None, parent=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon KB comment endpoints.Mirrors
components.schemas.KBArticleComment.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostKBArticleComment(*, extra_payload=<factory>, user=None, language=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon KB comment endpoints.The parent article (
kbarticle) is taken from the URL path, and the contract marks the commentparentreference as read-only, so both are excluded.user.idis writable and may be set explicitly; the server defaults it to the current user when omitted.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchKBArticleComment(*, extra_payload=<factory>, user=None, language=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
PostKBArticleCommentRequest body for
PATCHon KB comment endpoints.Inherits every writable field from
PostKBArticleComment.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteKBArticleComment(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelBody for
DELETEon KB comment endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Knowledge Base — Article Revisions
- class GetKBArticleRevision(*, extra_payload=<factory>, id=None, kbarticle=None, revision=None, name=None, content_html=None, language=None, user=None, date=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon KB revision endpoints.Mirrors
components.schemas.KBArticleRevision.content_htmlholds the HTML exactly as GLPI sent it and also accepts the wire spellingcontent; thecontentproperty converts it to Markdown on first read.Revision history is the clearest case for that: listing an article’s revisions returns every past body, and a caller comparing dates or revision numbers reads none of them.
- Attributes:
- content
The revision’s body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
kbarticle (IdNameRef | None)
revision (int | None)
name (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
language (str | None)
user (IdNameRef | None)
date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
- content
The revision’s body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached.content_htmlholds the HTML exactly as it arrived.model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
kbarticle (IdNameRef | None)
revision (int | None)
name (str | None)
content_html (Annotated[str | None, FieldInfo(annotation=NoneType, required=True, alias_priority=2, validation_alias=AliasChoices(choices=['content_html', 'content']), serialization_alias='content')])
language (str | None)
user (IdNameRef | None)
date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- property content: str | None
The revision’s body as Markdown, or
Noneif GLPI sent none.Converted from
content_htmlon the first read and cached.content_htmlholds the HTML exactly as it arrived.
- content_html: GlpiRawContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Knowledge Base — Categories
- class GetKBCategory(*, extra_payload=<factory>, id=None, name=None, completename=None, comment=None, entity=None, is_recursive=None, parent=None, level=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Knowledgebase/Categoryendpoints.Mirrors
components.schemas.KBCategory.completenameandlevelare server-managed (readOnly).- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostKBCategory(*, extra_payload=<factory>, name=None, comment=None, entity=None, is_recursive=None, parent=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Knowledgebase/Category.Read-only contract fields (
id,completename,level) are excluded because the server rejects them on input.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchKBCategory(*, extra_payload=<factory>, name=None, comment=None, entity=None, is_recursive=None, parent=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
PostKBCategoryRequest body for
PATCH /Knowledgebase/Category/{id}.The contract uses the same
KBCategoryschema for create and partial-update bodies;PatchKBCategoryis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteKBCategory(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelBody for
DELETE /Knowledgebase/Category/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Entities
- class GetEntity(*, extra_payload=<factory>, id=None, name=None, comment=None, completename=None, parent=None, level=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Administration/Entityendpoints.Mirrors
components.schemas.Entity. All fields are optional because the contract does not advertise arequiredarray.- Parameters:
- id
int|None,optional Native GLPI identifier (contract field
id—ID,readOnly).- name
str|None,optional Display name of the entity (contract field
name—Name).- comment
str|None,optional Free-form comment associated with the entity (contract field
comment—Comment).- completename
str|None,optional Full hierarchical path of the entity in dotted notation (contract field
completename—Complete name,readOnly).- parent
IdNameRef|None,optional Reference to the parent entity in the hierarchy (contract field
parent—Parent entity).- level
int|None,optional Depth of the entity in the hierarchy tree (contract field
level—Level,readOnly).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostEntity(*, extra_payload=<factory>, name=None, comment=None, parent=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Administration/Entity.Read-only contract fields (
id,completename,level) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Display name of the entity (contract field
name—Name).- comment
str|None,optional Free-form comment associated with the entity (contract field
comment—Comment).- parent
IdNameRef|None,optional Reference to the parent entity in the hierarchy (contract field
parent—Parent entity).
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchEntity(*, extra_payload=<factory>, name=None, comment=None, parent=None, **extra_data)[source]
Bases:
PostEntityRequest body for
PATCH /Administration/Entity/{id}.The contract uses the same
Entityschema for create and partial-update bodies;PatchEntityis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteEntity(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Administration/Entity/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Plugin: Fields (custom fields)
Schemas returned by the GLPI Fields plugin (legacy v1 REST endpoints).
The companion mixin methods are exposed on GlpiClient /
AsyncGlpiClient as list_plugin_fields_containers,
list_plugin_fields_fields, list_item_plugin_field_rows,
create_item_plugin_field_row, update_item_plugin_field_row,
get_ticket_custom_fields and set_ticket_custom_fields.
- class GetPluginFieldsContainer(*, extra_payload=<factory>, id=None, name=None, label=None, itemtypes=None, type=None, subtype=None, entities_id=None, is_recursive=None, is_active=None, **extra_data)[source]
Bases:
GlpiModelOne
PluginFieldsContainerrow returned by the v1 REST API.- Parameters:
- id
int|None,optional Native identifier of the container.
- name
str|None,optional Internal name used to derive the value itemtype (
PluginFields<Itemtype><name>).- label
str|None,optional Human-readable label shown in the GLPI UI.
- itemtypes
str|None,optional JSON-encoded list of itemtypes the container is attached to (the v1 API returns it as a string, e.g.
'["Ticket"]').- type
str|None,optional Container kind (
"tab","dom","domtab", …).- subtype
str|None,optional Optional sub-discriminator returned by the plugin.
- entities_id
int|None,optional Identifier of the entity the container belongs to.
- is_recursivebool |
None,optional Whether the container is visible in child entities.
- is_activebool |
None,optional Whether the container is enabled.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class GetPluginFieldsField(*, extra_payload=<factory>, id=None, name=None, label=None, type=None, plugin_fields_containers_id=None, ranking=None, default_value=None, is_active=None, is_readonly=None, mandatory=None, multiple=None, allowed_values=None, **extra_data)[source]
Bases:
GlpiModelOne
PluginFieldsFieldrow returned by the v1 REST API.- Parameters:
- id
int|None,optional Native identifier of the field declaration.
- name
str|None,optional Column name used inside the per-item value row (this is the key appearing in
GetPluginFieldsValueRow.extra_payload).- label
str|None,optional Human-readable label shown in the GLPI UI.
- type
str|None,optional Field type (
"string","text","richtext","dropdown","yesno","date","datetime","number","url","header", …).- plugin_fields_containers_id
int|None,optional Identifier of the parent
GetPluginFieldsContainer.- ranking
int|None,optional Display ordering of the field inside its container.
- default_value
str|None,optional Default value applied when a fresh row is created.
- is_activebool |
None,optional Whether the field declaration is enabled.
- is_readonlybool |
None,optional Whether the field is read-only in the GLPI UI.
- mandatorybool |
None,optional Whether the field is required when the parent item is saved.
- multiplebool |
None,optional Whether the field accepts multiple values (dropdown only).
- allowed_values
str|None,optional Newline-separated list of accepted values for some field types (the v1 API returns the raw text payload).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
label (str | None)
type (str | None)
plugin_fields_containers_id (int | None)
ranking (int | None)
default_value (str | None)
is_active (bool | None)
is_readonly (bool | None)
mandatory (bool | None)
multiple (bool | None)
allowed_values (str | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
label (str | None)
type (str | None)
plugin_fields_containers_id (int | None)
ranking (int | None)
default_value (str | None)
is_active (bool | None)
is_readonly (bool | None)
mandatory (bool | None)
multiple (bool | None)
allowed_values (str | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class GetPluginFieldsValueRow(*, extra_payload=<factory>, id=None, items_id=None, itemtype=None, plugin_fields_containers_id=None, entities_id=None, **extra_data)[source]
Bases:
GlpiModelOne
PluginFields<Itemtype><Container>row keyed by parent item.The actual field columns (
<name>from eachGetPluginFieldsField) are dynamic per container and so are collected intoGlpiModel.extra_payloadrather than declared here.- Parameters:
- id
int|None,optional Native identifier of the value row.
- items_id
int|None,optional Identifier of the parent GLPI item the row is attached to.
- itemtype
str|None,optional Itemtype of the parent GLPI item (e.g.
"Ticket").- plugin_fields_containers_id
int|None,optional Identifier of the originating
GetPluginFieldsContainer.- entities_id
int|None,optional Identifier of the entity the row belongs to.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostPluginFieldsValueRow(*, extra_payload=<factory>, items_id, itemtype, plugin_fields_containers_id, entities_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body used to create a fresh plugin-fields value row.
The dynamic field columns are passed through
GlpiModel.extra_payloadso each container can supply its own column names without a tailored Pydantic model.- Parameters:
- items_id
int Identifier of the parent GLPI item the row is attached to.
- itemtype
str Itemtype of the parent GLPI item (e.g.
"Ticket").- plugin_fields_containers_id
int Identifier of the originating
GetPluginFieldsContainer.- entities_id
int|None,optional Identifier of the entity the row should be linked to. When omitted GLPI applies its default scope.
- items_id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Computers
- class GetComputer(*, extra_payload=<factory>, id=None, name=None, comment=None, status=None, entity=None, is_recursive=None, manufacturer=None, user=None, user_tech=None, contact=None, contact_num=None, serial=None, otherserial=None, is_deleted=None, date_creation=None, date_mod=None, location=None, type=None, model=None, group=None, group_tech=None, uuid=None, network=None, autoupdatesystem=None, is_template=None, template_name=None, is_dynamic=None, ticket_tco=None, last_inventory_update=None, last_boot=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Assets/Computerendpoints.Mirrors
components.schemas.Computer. No field carries adescriptionin the OpenAPI contract; the parameter notes below reflect the field names, types andreadOnlyflags as advertised.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Short display name of the computer.
- comment
str|None,optional Free-form comment associated with the computer.
- status
IdNameRef|None,optional Related status reference, see
Dropdowns/State.- entity
IdNameCompletenameRef|None,optional Owning GLPI entity reference, including its completename.
- is_recursivebool |
None,optional Whether the computer is visible to child entities.
- manufacturer
IdNameRef|None,optional Related manufacturer reference.
- user
IdNameRef|None,optional Related user reference for the person the computer is assigned to.
- user_tech
IdNameRef|None,optional Related user reference for the technician in charge of the computer.
- contact
str|None,optional Free-form contact name associated with the computer.
- contact_num
str|None,optional Free-form contact phone number associated with the computer.
- serial
str|None,optional Manufacturer serial number.
- otherserial
str|None,optional Secondary inventory or asset-tag number.
- is_deletedbool |
None,optional Whether the computer has been moved to the GLPI trash.
- date_creation
datetime|None,optional Creation timestamp of the computer record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the computer record (
format: date-time).- location
IdNameRef|None,optional Related location reference.
- type
IdNameRef|None,optional Related computer type reference.
- model
IdNameRef|None,optional Related computer model reference.
- group
list[IdNameRef] |None,optional Related groups the computer belongs to. Unlike most foreign-key fields on this model, the contract declares this as an array rather than a single reference.
- group_tech
list[IdNameRef] |None,optional Related groups in charge of the computer. Also an array, for the same reason as
group.- uuid
str|None,optional Hardware UUID reported by automatic inventory (
readOnly).- network
IdNameRef|None,optional Related network reference.
- autoupdatesystem
IdNameRef|None,optional Related reference to the inventory or synchronisation source that manages automatic updates for this computer.
- is_templatebool |
None,optional Whether this record is a computer template rather than a live computer.
- template_name
str|None,optional Name of the computer template used to create new computers from this record.
- is_dynamicbool |
None,optional Whether this record is kept in sync by automatic inventory.
- ticket_tco
float|None,optional Total cost of ownership tracked against the computer.
- last_inventory_update
datetime|None,optional Timestamp of the last automatic inventory update (
readOnly,format: date-time).- last_boot
datetime|None,optional Timestamp of the last reported boot (
readOnly,format: date-time).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
is_recursive (bool | None)
manufacturer (IdNameRef | None)
user (IdNameRef | None)
user_tech (IdNameRef | None)
contact (str | None)
contact_num (str | None)
serial (str | None)
otherserial (str | None)
is_deleted (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
location (IdNameRef | None)
type (IdNameRef | None)
model (IdNameRef | None)
uuid (str | None)
network (IdNameRef | None)
autoupdatesystem (IdNameRef | None)
is_template (bool | None)
template_name (str | None)
is_dynamic (bool | None)
ticket_tco (float | None)
last_inventory_update (datetime | None)
last_boot (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
is_recursive (bool | None)
manufacturer (IdNameRef | None)
user (IdNameRef | None)
user_tech (IdNameRef | None)
contact (str | None)
contact_num (str | None)
serial (str | None)
otherserial (str | None)
is_deleted (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
location (IdNameRef | None)
type (IdNameRef | None)
model (IdNameRef | None)
uuid (str | None)
network (IdNameRef | None)
autoupdatesystem (IdNameRef | None)
is_template (bool | None)
template_name (str | None)
is_dynamic (bool | None)
ticket_tco (float | None)
last_inventory_update (datetime | None)
last_boot (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- entity: IdNameCompletenameRef | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostComputer(*, extra_payload=<factory>, name=None, comment=None, status=None, entity=None, is_recursive=None, manufacturer=None, user=None, user_tech=None, contact=None, contact_num=None, serial=None, otherserial=None, is_deleted=None, date_creation=None, date_mod=None, location=None, type=None, model=None, group=None, group_tech=None, network=None, autoupdatesystem=None, is_template=None, template_name=None, is_dynamic=None, ticket_tco=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Assets/Computer.Four read-only contract fields (
id,uuid,last_inventory_update,last_boot) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Short display name of the computer.
- comment
str|None,optional Free-form comment associated with the computer.
- status
IdNameRef|None,optional Related status reference, see
Dropdowns/State.- entity
IdNameCompletenameRef|None,optional Owning GLPI entity reference, including its completename.
- is_recursivebool |
None,optional Whether the computer is visible to child entities.
- manufacturer
IdNameRef|None,optional Related manufacturer reference.
- user
IdNameRef|None,optional Related user reference for the person the computer is assigned to.
- user_tech
IdNameRef|None,optional Related user reference for the technician in charge of the computer.
- contact
str|None,optional Free-form contact name associated with the computer.
- contact_num
str|None,optional Free-form contact phone number associated with the computer.
- serial
str|None,optional Manufacturer serial number.
- otherserial
str|None,optional Secondary inventory or asset-tag number.
- is_deletedbool |
None,optional Whether the computer should be moved to the GLPI trash.
- date_creation
datetime|None,optional Creation timestamp to set on the computer record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the computer record (
format: date-time).- location
IdNameRef|None,optional Related location reference.
- type
IdNameRef|None,optional Related computer type reference.
- model
IdNameRef|None,optional Related computer model reference.
- group
list[IdNameRef] |None,optional Related groups the computer belongs to. Unlike most foreign-key fields on this model, the contract declares this as an array rather than a single reference.
- group_tech
list[IdNameRef] |None,optional Related groups in charge of the computer. Also an array, for the same reason as
group.- network
IdNameRef|None,optional Related network reference.
- autoupdatesystem
IdNameRef|None,optional Related reference to the inventory or synchronisation source that manages automatic updates for this computer.
- is_templatebool |
None,optional Whether this record is a computer template rather than a live computer.
- template_name
str|None,optional Name of the computer template used to create new computers from this record.
- is_dynamicbool |
None,optional Whether this record is kept in sync by automatic inventory.
- ticket_tco
float|None,optional Total cost of ownership tracked against the computer.
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
is_recursive (bool | None)
manufacturer (IdNameRef | None)
user (IdNameRef | None)
user_tech (IdNameRef | None)
contact (str | None)
contact_num (str | None)
serial (str | None)
otherserial (str | None)
is_deleted (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
location (IdNameRef | None)
type (IdNameRef | None)
model (IdNameRef | None)
network (IdNameRef | None)
autoupdatesystem (IdNameRef | None)
is_template (bool | None)
template_name (str | None)
is_dynamic (bool | None)
ticket_tco (float | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
is_recursive (bool | None)
manufacturer (IdNameRef | None)
user (IdNameRef | None)
user_tech (IdNameRef | None)
contact (str | None)
contact_num (str | None)
serial (str | None)
otherserial (str | None)
is_deleted (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
location (IdNameRef | None)
type (IdNameRef | None)
model (IdNameRef | None)
network (IdNameRef | None)
autoupdatesystem (IdNameRef | None)
is_template (bool | None)
template_name (str | None)
is_dynamic (bool | None)
ticket_tco (float | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- entity: IdNameCompletenameRef | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchComputer(*, extra_payload=<factory>, name=None, comment=None, status=None, entity=None, is_recursive=None, manufacturer=None, user=None, user_tech=None, contact=None, contact_num=None, serial=None, otherserial=None, is_deleted=None, date_creation=None, date_mod=None, location=None, type=None, model=None, group=None, group_tech=None, network=None, autoupdatesystem=None, is_template=None, template_name=None, is_dynamic=None, ticket_tco=None, **extra_data)[source]
Bases:
PostComputerRequest body for
PATCH /Assets/Computer/{id}.The contract uses the same
Computerschema for create and partial-update bodies;PatchComputeris kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
is_recursive (bool | None)
manufacturer (IdNameRef | None)
user (IdNameRef | None)
user_tech (IdNameRef | None)
contact (str | None)
contact_num (str | None)
serial (str | None)
otherserial (str | None)
is_deleted (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
location (IdNameRef | None)
type (IdNameRef | None)
model (IdNameRef | None)
network (IdNameRef | None)
autoupdatesystem (IdNameRef | None)
is_template (bool | None)
template_name (str | None)
is_dynamic (bool | None)
ticket_tco (float | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
is_recursive (bool | None)
manufacturer (IdNameRef | None)
user (IdNameRef | None)
user_tech (IdNameRef | None)
contact (str | None)
contact_num (str | None)
serial (str | None)
otherserial (str | None)
is_deleted (bool | None)
date_creation (datetime | None)
date_mod (datetime | None)
location (IdNameRef | None)
type (IdNameRef | None)
model (IdNameRef | None)
network (IdNameRef | None)
autoupdatesystem (IdNameRef | None)
is_template (bool | None)
template_name (str | None)
is_dynamic (bool | None)
ticket_tco (float | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteComputer(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Assets/Computer/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Computer Contract Links
- class GetContractItem(*, extra_payload=<factory>, id=None, contract=None, itemtype=None, items_id=None, **extra_data)[source]
Bases:
GlpiModelResponse shape for
GET /Assets/Computer/{id}/Contractendpoints.Mirrors
components.schemas.Contract_Item.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- contract
IdNameRef|None,optional Related contract reference.
- itemtype
str|None,optional GLPI itemtype of the linked asset (free string,
maxLength: 100, not an enum in the contract).- items_id
int|None,optional Native GLPI identifier of the linked asset.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostContractItem(*, extra_payload=<factory>, contract=None, itemtype=None, items_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Assets/Computer/{id}/Contract.The read-only contract field (
id) is intentionally excluded because the server rejects it on input. Client mixins that link a contract to a specific asset overwriteitemtypeanditems_idon the body they send, regardless of what is set here; see the module docstring.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchContractItem(*, extra_payload=<factory>, contract=None, itemtype=None, items_id=None, **extra_data)[source]
Bases:
PostContractItemRequest body for
PATCH /Assets/Computer/{id}/Contract/{link_id}.The contract uses the same
Contract_Itemschema for create and partial-update bodies;PatchContractItemis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteContractItem(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE .../Contract/{link_id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Contracts
- class GetContract(*, extra_payload=<factory>, id=None, name=None, comment=None, status=None, entity=None, date_creation=None, date_mod=None, type=None, is_deleted=None, costs=None, number=None, location=None, date_begin=None, duration=None, notice_period=None, renewal_period=None, invoice_period=None, accounting_number=None, week_begin_hour=None, week_end_hour=None, saturday_begin_hour=None, saturday_end_hour=None, sunday_begin_hour=None, sunday_end_hour=None, use_saturday=None, use_sunday=None, max_links_allowed=None, alert=None, renewal_type=None, template_name=None, is_template=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Management/Contractendpoints.Mirrors
components.schemas.Contract.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Short display name of the contract.
- comment
str|None,optional Free-form comment associated with the contract.
- status
IdNameRef|None,optional Related contract status reference.
- entity
IdNameRef|None,optional Owning GLPI entity reference.
- date_creation
datetime|None,optional Creation timestamp of the contract record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the contract record (
format: date-time).- type
IdNameRef|None,optional Related contract type reference, see
Dropdowns/ContractType.- is_deletedbool |
None,optional Whether the contract has been moved to the GLPI trash.
- costs
list[IdRef] |None,optional Related contract cost line references. Read-only on this client: cost lines are created and updated through their own
ContractCostendpoints, never through this model.- number
str|None,optional Contract reference number.
- location
IdNameRef|None,optional Related location reference.
- date_begin
date|None,optional Contract start date (
format: date). A plain calendar date, not a timestamp: GLPI stores no time-of-day here, and keeping it adatealso keeps it out of the server-clock conversion applied to aware timestamps.- duration
int|None,optional Contract duration, in months.
- notice_period
int|None,optional Notice period, in months.
- renewal_period
int|None,optional Renewal period, in months.
- invoice_period
int|None,optional Invoice period, in months.
- accounting_number
str|None,optional Accounting reference number.
- week_begin_hour
str|None,optional Weekday coverage start time, in
HH:MM:SSformat (RFC 3339 partial-time).- week_end_hour
str|None,optional Weekday coverage end time, in
HH:MM:SSformat (RFC 3339 partial-time).- saturday_begin_hour
str|None,optional Saturday coverage start time, in
HH:MM:SSformat (RFC 3339 partial-time).- saturday_end_hour
str|None,optional Saturday coverage end time, in
HH:MM:SSformat (RFC 3339 partial-time).- sunday_begin_hour
str|None,optional Sunday coverage start time, in
HH:MM:SSformat (RFC 3339 partial-time).- sunday_end_hour
str|None,optional Sunday coverage end time, in
HH:MM:SSformat (RFC 3339 partial-time).- use_saturdaybool |
None,optional Whether the Saturday coverage hours apply to this contract.
- use_sundaybool |
None,optional Whether the Sunday coverage hours apply to this contract.
- max_links_allowed
int|None,optional Maximum number of items that can be linked to this contract (
0means unlimited).- alert
int|None,optional Selects which expiration alerts are active. The contract is self-inconsistent about the last two values: the field’s
enumlists[0, 4, 8, 12, 64, 72], but its accompanying description numbers the same six meanings as0no alert,4alert on end date,8alert on notice date,12both,16periodic alert,24periodic alert and alert on notice date. The first four values agree between the two listings; the last two do not.The server settles neither reading: writing each of
0,4,8,12,16,24,64and72to a live GLPI 11 contract stores the value unchanged and rejects none of them, so the endpoint validates this field not at all and theenumin the contract document does not describe an enforced set. Typed as a plainintfor that reason: an enum would reject values the server itself accepts, and would have to pick one of the two numberings to name them by.- renewal_type
GlpiContractRenewalType|None,optional Renewal behaviour of the contract: no renewal, tacit (automatic) renewal, or explicit (manual) renewal.
- template_name
str|None,optional Name of the contract template used to create new contracts from this record.
- is_templatebool |
None,optional Whether this record is a contract template rather than a live contract.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
type (IdNameRef | None)
is_deleted (bool | None)
number (str | None)
location (IdNameRef | None)
date_begin (date | None)
duration (int | None)
notice_period (int | None)
renewal_period (int | None)
invoice_period (int | None)
accounting_number (str | None)
week_begin_hour (str | None)
week_end_hour (str | None)
saturday_begin_hour (str | None)
saturday_end_hour (str | None)
sunday_begin_hour (str | None)
sunday_end_hour (str | None)
use_saturday (bool | None)
use_sunday (bool | None)
max_links_allowed (int | None)
alert (int | None)
renewal_type (GlpiContractRenewalType | None)
template_name (str | None)
is_template (bool | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
type (IdNameRef | None)
is_deleted (bool | None)
number (str | None)
location (IdNameRef | None)
date_begin (date | None)
duration (int | None)
notice_period (int | None)
renewal_period (int | None)
invoice_period (int | None)
accounting_number (str | None)
week_begin_hour (str | None)
week_end_hour (str | None)
saturday_begin_hour (str | None)
saturday_end_hour (str | None)
sunday_begin_hour (str | None)
sunday_end_hour (str | None)
use_saturday (bool | None)
use_sunday (bool | None)
max_links_allowed (int | None)
alert (int | None)
renewal_type (GlpiContractRenewalType | None)
template_name (str | None)
is_template (bool | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- renewal_type: GlpiContractRenewalType | None
- class PostContract(*, extra_payload=<factory>, name=None, comment=None, status=None, entity=None, date_creation=None, date_mod=None, type=None, is_deleted=None, number=None, location=None, date_begin=None, duration=None, notice_period=None, renewal_period=None, invoice_period=None, accounting_number=None, week_begin_hour=None, week_end_hour=None, saturday_begin_hour=None, saturday_end_hour=None, sunday_begin_hour=None, sunday_end_hour=None, use_saturday=None, use_sunday=None, max_links_allowed=None, alert=None, renewal_type=None, template_name=None, is_template=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Management/Contract.The read-only contract field (
id) is intentionally excluded because the server rejects it on input.costsis also excluded: cost lines are written through their ownContractCostendpoints, never through this model.- Parameters:
- name
str|None,optional Short display name of the contract.
- comment
str|None,optional Free-form comment associated with the contract.
- status
IdNameRef|None,optional Related contract status reference.
- entity
IdNameRef|None,optional Owning GLPI entity reference.
- date_creation
datetime|None,optional Creation timestamp to set on the contract record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the contract record (
format: date-time).- type
IdNameRef|None,optional Related contract type reference, see
Dropdowns/ContractType.- is_deletedbool |
None,optional Whether the contract should be moved to the GLPI trash.
- number
str|None,optional Contract reference number.
- location
IdNameRef|None,optional Related location reference.
- date_begin
date|None,optional Contract start date (
format: date). A plain calendar date, not a timestamp: GLPI stores no time-of-day here, and keeping it adatealso keeps it out of the server-clock conversion applied to aware timestamps.- duration
int|None,optional Contract duration, in months.
- notice_period
int|None,optional Notice period, in months.
- renewal_period
int|None,optional Renewal period, in months.
- invoice_period
int|None,optional Invoice period, in months.
- accounting_number
str|None,optional Accounting reference number.
- week_begin_hour
str|None,optional Weekday coverage start time, in
HH:MM:SSformat (RFC 3339 partial-time).- week_end_hour
str|None,optional Weekday coverage end time, in
HH:MM:SSformat (RFC 3339 partial-time).- saturday_begin_hour
str|None,optional Saturday coverage start time, in
HH:MM:SSformat (RFC 3339 partial-time).- saturday_end_hour
str|None,optional Saturday coverage end time, in
HH:MM:SSformat (RFC 3339 partial-time).- sunday_begin_hour
str|None,optional Sunday coverage start time, in
HH:MM:SSformat (RFC 3339 partial-time).- sunday_end_hour
str|None,optional Sunday coverage end time, in
HH:MM:SSformat (RFC 3339 partial-time).- use_saturdaybool |
None,optional Whether the Saturday coverage hours apply to this contract.
- use_sundaybool |
None,optional Whether the Sunday coverage hours apply to this contract.
- max_links_allowed
int|None,optional Maximum number of items that can be linked to this contract (
0means unlimited).- alert
int|None,optional Selects which expiration alerts are active. The contract is self-inconsistent about the last two values: the field’s
enumlists[0, 4, 8, 12, 64, 72], but its accompanying description numbers the same six meanings as0no alert,4alert on end date,8alert on notice date,12both,16periodic alert,24periodic alert and alert on notice date. The first four values agree between the two listings; the last two do not.The server settles neither reading: writing each of
0,4,8,12,16,24,64and72to a live GLPI 11 contract stores the value unchanged and rejects none of them, so the endpoint validates this field not at all and theenumin the contract document does not describe an enforced set. Typed as a plainintfor that reason: an enum would reject values the server itself accepts, and would have to pick one of the two numberings to name them by.- renewal_type
GlpiContractRenewalType|None,optional Renewal behaviour of the contract: no renewal, tacit (automatic) renewal, or explicit (manual) renewal.
- template_name
str|None,optional Name of the contract template used to create new contracts from this record.
- is_templatebool |
None,optional Whether this record is a contract template rather than a live contract.
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
type (IdNameRef | None)
is_deleted (bool | None)
number (str | None)
location (IdNameRef | None)
date_begin (date | None)
duration (int | None)
notice_period (int | None)
renewal_period (int | None)
invoice_period (int | None)
accounting_number (str | None)
week_begin_hour (str | None)
week_end_hour (str | None)
saturday_begin_hour (str | None)
saturday_end_hour (str | None)
sunday_begin_hour (str | None)
sunday_end_hour (str | None)
use_saturday (bool | None)
use_sunday (bool | None)
max_links_allowed (int | None)
alert (int | None)
renewal_type (GlpiContractRenewalType | None)
template_name (str | None)
is_template (bool | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
type (IdNameRef | None)
is_deleted (bool | None)
number (str | None)
location (IdNameRef | None)
date_begin (date | None)
duration (int | None)
notice_period (int | None)
renewal_period (int | None)
invoice_period (int | None)
accounting_number (str | None)
week_begin_hour (str | None)
week_end_hour (str | None)
saturday_begin_hour (str | None)
saturday_end_hour (str | None)
sunday_begin_hour (str | None)
sunday_end_hour (str | None)
use_saturday (bool | None)
use_sunday (bool | None)
max_links_allowed (int | None)
alert (int | None)
renewal_type (GlpiContractRenewalType | None)
template_name (str | None)
is_template (bool | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- renewal_type: GlpiContractRenewalType | None
- class PatchContract(*, extra_payload=<factory>, name=None, comment=None, status=None, entity=None, date_creation=None, date_mod=None, type=None, is_deleted=None, number=None, location=None, date_begin=None, duration=None, notice_period=None, renewal_period=None, invoice_period=None, accounting_number=None, week_begin_hour=None, week_end_hour=None, saturday_begin_hour=None, saturday_end_hour=None, sunday_begin_hour=None, sunday_end_hour=None, use_saturday=None, use_sunday=None, max_links_allowed=None, alert=None, renewal_type=None, template_name=None, is_template=None, **extra_data)[source]
Bases:
PostContractRequest body for
PATCH /Management/Contract/{id}.The contract uses the same
Contractschema for create and partial-update bodies;PatchContractis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
type (IdNameRef | None)
is_deleted (bool | None)
number (str | None)
location (IdNameRef | None)
date_begin (date | None)
duration (int | None)
notice_period (int | None)
renewal_period (int | None)
invoice_period (int | None)
accounting_number (str | None)
week_begin_hour (str | None)
week_end_hour (str | None)
saturday_begin_hour (str | None)
saturday_end_hour (str | None)
sunday_begin_hour (str | None)
sunday_end_hour (str | None)
use_saturday (bool | None)
use_sunday (bool | None)
max_links_allowed (int | None)
alert (int | None)
renewal_type (GlpiContractRenewalType | None)
template_name (str | None)
is_template (bool | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
comment (str | None)
status (IdNameRef | None)
entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
type (IdNameRef | None)
is_deleted (bool | None)
number (str | None)
location (IdNameRef | None)
date_begin (date | None)
duration (int | None)
notice_period (int | None)
renewal_period (int | None)
invoice_period (int | None)
accounting_number (str | None)
week_begin_hour (str | None)
week_end_hour (str | None)
saturday_begin_hour (str | None)
saturday_end_hour (str | None)
sunday_begin_hour (str | None)
sunday_end_hour (str | None)
use_saturday (bool | None)
use_sunday (bool | None)
max_links_allowed (int | None)
alert (int | None)
renewal_type (GlpiContractRenewalType | None)
template_name (str | None)
is_template (bool | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteContract(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Management/Contract/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Contract Costs
- class GetContractCost(*, extra_payload=<factory>, id=None, contract=None, name=None, comment=None, date_begin=None, date_end=None, cost=None, budget=None, entity=None, is_recursive=None, **extra_data)[source]
Bases:
GlpiModelResponse shape for
GET /Management/Contract/{id}/Costendpoints.Mirrors
components.schemas.ContractCost.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- contract
IdNameRef|None,optional Related contract reference, the parent of this cost line.
- name
str|None,optional Short display name of the cost line.
- comment
str|None,optional Free-form comment associated with the cost line.
- date_begin
datetime|None,optional Cost line start timestamp (
format: date-time). UnlikeContract.date_begin, which the contract declares withformat: date, this field carries a time-of-day component.- date_end
datetime|None,optional Cost line end timestamp (
format: date-time).- cost
float|None,optional Monetary amount of the cost line.
- budget
IdNameRef|None,optional Related budget reference.
- entity
IdNameRef|None,optional Owning GLPI entity reference.
- is_recursivebool |
None,optional Whether the cost line is visible in sub-entities of
entity.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostContractCost(*, extra_payload=<factory>, contract=None, name=None, comment=None, date_begin=None, date_end=None, cost=None, budget=None, entity=None, is_recursive=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Management/Contract/{id}/Cost.The read-only contract field (
id) is intentionally excluded because the server rejects it on input.- Parameters:
- contract
IdNameRef|None,optional Related contract reference, the parent of this cost line.
- name
str|None,optional Short display name of the cost line.
- comment
str|None,optional Free-form comment associated with the cost line.
- date_begin
datetime|None,optional Cost line start timestamp to set (
format: date-time). UnlikeContract.date_begin, which the contract declares withformat: date, this field carries a time-of-day component.- date_end
datetime|None,optional Cost line end timestamp to set (
format: date-time).- cost
float|None,optional Monetary amount of the cost line.
- budget
IdNameRef|None,optional Related budget reference.
- entity
IdNameRef|None,optional Owning GLPI entity reference.
- is_recursivebool |
None,optional Whether the cost line should be visible in sub-entities of
entity.
- contract
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchContractCost(*, extra_payload=<factory>, contract=None, name=None, comment=None, date_begin=None, date_end=None, cost=None, budget=None, entity=None, is_recursive=None, **extra_data)[source]
Bases:
PostContractCostRequest body for
PATCH /Management/Contract/{id}/Cost/{cost_id}.The contract uses the same
ContractCostschema for create and partial-update bodies;PatchContractCostis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteContractCost(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Management/Contract/{id}/Cost/{cost_id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Contract Types
- class GetContractType(*, extra_payload=<factory>, id=None, name=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Dropdowns/ContractTypeendpoints.Mirrors
components.schemas.ContractType. No field carries adescriptionin the OpenAPI contract; the parameter notes below reflect the field names, types andreadOnlyflags as advertised.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Short display name of the contract type.
- comment
str|None,optional Free-form comment associated with the contract type.
- date_creation
datetime|None,optional Creation timestamp of the contract type record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the contract type record (
format: date-time).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostContractType(*, extra_payload=<factory>, name=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Dropdowns/ContractType.The read-only contract field (
id) is intentionally excluded because the server rejects it on input.- Parameters:
- name
str|None,optional Short display name of the contract type.
- comment
str|None,optional Free-form comment associated with the contract type.
- date_creation
datetime|None,optional Creation timestamp to set on the contract type record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the contract type record (
format: date-time).
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchContractType(*, extra_payload=<factory>, name=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
PostContractTypeRequest body for
PATCH /Dropdowns/ContractType/{id}.The contract uses the same
ContractTypeschema for create and partial-update bodies;PatchContractTypeis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteContractType(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Dropdowns/ContractType/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Enums
- class GlpiEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
IntEnumBase enum exposing small GLPI convenience helpers.
The enums remain numeric so they can be passed directly to filters and request parameters, while the helper methods keep RSQL string generation on the public surface.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- class GlpiTicketStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI ticket status identifiers as advertised by the contract.
The contract enum on
Ticket.status.idis[1, 10, 2, 3, 4, 5, 6]where10represents the validation step that sits betweenNEWandASSIGNED.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- ASSIGNED = 2
- CLOSED = 6
- NEW = 1
- PENDING = 4
- PLANNED = 3
- SOLVED = 5
- VALIDATION = 10
- class GlpiTicketType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI ticket
typeidentifiers as advertised by the contract.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- INCIDENT = 1
- REQUEST = 2
- class GlpiPriority(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumCommon GLPI urgency, impact, and priority identifiers.
The contract advertises the same
[1, 2, 3, 4, 5]enum on theurgency,impact, andpriorityticket fields, but the live server does not honour that forpriority: GLPI’s priority scale has a sixth level,Major, which it derives from urgency and impact.urgencyandimpactreally do stop at 5.MAJORis therefore included even though the contract omits it, following the same rule the timeline helpers use – observed server behaviour wins over the published contract. Leaving it out was not a cosmetic gap:priorityis typed with this enum onGetTicket, so a singleMajorticket anywhere in a result set failed validation and took the whole search down with it, which is exactly the kind of ticket a reporting query is most likely to touch.The cost of sharing one enum across the three fields is that
urgencyandimpactnow also accept 6, which GLPI will never send. Accepting a value that cannot occur is harmless; rejecting one that does occur was not.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- HIGH = 4
- LOW = 2
- MAJOR = 6
- MEDIUM = 3
- VERY_HIGH = 5
- VERY_LOW = 1
- class GlpiTaskState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
TicketTask.stateenum values.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- DONE = 2
- INFORMATION = 0
- TODO = 1
- class GlpiSolutionStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
Solution.statusenum values.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- ACCEPTED = 3
- NONE = 1
- REFUSED = 4
- WAITING = 2
- class GlpiTimelinePosition(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumTimeline position values shared by Followup, Solution and TicketTask.
The contract advertises
[-1, 0, 1, 2, 3, 4]ontimeline_position.LEFTandRIGHTfollow the GLPI UI conventions.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- INVALID = -1
- LEFT = 1
- LEFT_BIG = 3
- NONE = 0
- RIGHT = 2
- RIGHT_BIG = 4
- class GlpiUserAuthType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
User.authtypeenum values.The contract advertises
[1, 2, 3, 4, 5, 6]without textual labels. Names map to the GLPI source enum order.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- CAS = 4
- EXTERNAL = 6
- LDAP = 2
- LOCAL = 1
- MAIL = 3
- X509 = 5
- class GlpiGlobalValidation(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
Ticket.global_validationenum values.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- ACCEPTED = 3
- NONE = 1
- REFUSED = 4
- WAITING = 2
- class GlpiContractRenewalType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI contract renewal types as advertised by the contract.
The contract enum on
Contract.renewal_typeis[0, 1, 2], with the meanings documented inline on that field: no renewal, tacit (automatic) renewal, and explicit (manual) renewal.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- EXPLICIT = 2
- NONE = 0
- TACIT = 1
Package Metadata
- __version__ = '0.5.0'
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.