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, TransportMixin

GLPI 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, or None.

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 PluginFieldsContainer rows registered on the server.

list_plugin_fields_fields([container_id])

List PluginFieldsField declarations.

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_urlstr

Base URL of the GLPI v2 REST API, e.g. https://glpi.example.com/api.php/v2.

server_timezonestr | tzinfo

IANA name of the timezone the GLPI server runs in (e.g. "Europe/Paris"), or a tzinfo. 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 datetime arrive 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:00 to +14:00 written 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:00 and +02:00.

client_idstr | None, optional

OAuth client identifier used to obtain access tokens.

client_secretstr | None, optional

OAuth client secret paired with client_id.

usernamestr | None, optional

GLPI account username used for the OAuth password grant.

passwordstr | None, optional

GLPI account password used for the OAuth password grant.

glpi_entityint | None, optional

Default GLPI-Entity header sent with each request.

glpi_profileint | None, optional

Default GLPI-Profile header sent with each request.

entity_recursivebool, optional

When True the GLPI-Entity-Recursive header is sent so entity scope includes child entities.

languagestr, optional

Default Accept-Language header value (e.g. "en_GB").

verify_sslbool, optional

Whether the HTTP session verifies the server certificate.

auth_token_refreshint | None, optional

Number of seconds before token expiry at which the auth manager proactively refreshes the access token.

v1_base_urlstr | 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_tokenstr | None, optional

user_token for the v1 fallback session.

v1_app_tokenstr | None, optional

app_token for the v1 fallback session.

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, or None.

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 PluginFieldsContainer rows registered on the server.

list_plugin_fields_fields([container_id])

List PluginFieldsField declarations.

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:
GlpiValidationError

If 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 with block.

Returns:
Self

The client itself, suitable for chaining method calls.

Return type:

Self

__exit__(exc_type, exc, tb)[source]

Close the client on with block exit.

Parameters:
exc_typetype[BaseException] | None

Exception class raised inside the with block, if any.

excBaseException | None

Exception instance raised inside the block, if any.

tbTracebackType | None

Traceback associated with exc.

Parameters:
Return type:

None

add_ticket_team_member(ticket_id, member)

Add one team member to a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to receive the new member.

memberPostTeamMember

Request body describing the member. The id field is the target user/group/supplier identifier, type is one of "User", "Group" or "Supplier", and role is one of "requester", "assigned" or "observer".

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
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:
computerPostComputer

Request body describing the computer to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

computer (PostComputer)

Return type:

int

create_contract(contract)

Create one GLPI contract.

Parameters:
contractPostContract

Request body describing the contract to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

contract (PostContract)

Return type:

int

create_contract_cost(contract_id, cost)

Create one cost line against a GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

costPostContractCost

Request body describing the cost line to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

create_contract_type(contract_type)

Create one GLPI contract type.

Parameters:
contract_typePostContractType

Request body describing the contract type to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

contract_type (PostContractType)

Return type:

int

create_document(document)

Create one GLPI document metadata record.

Binary uploads use upload_document() instead of the JSON metadata endpoint exposed here.

Parameters:
documentPostDocument

Request body describing the document metadata.

Returns:
int

Identifier assigned by the GLPI server to the new document.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

document (PostDocument)

Return type:

int

create_entity(entity)

Create one GLPI entity.

Parameters:
entityPostEntity

Request body describing the entity to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

entity (PostEntity)

Return type:

int

create_item_plugin_field_row(*, itemtype, items_id, container_id, container_name, values, entities_id=None)

Create one fresh plugin-fields value row.

Parameters:
itemtypestr

Parent itemtype (e.g. "Ticket").

items_idint

Identifier of the parent item the row is attached to.

container_idint

Identifier of the originating GetPluginFieldsContainer.

container_namestr

Internal name of the container, used to derive the value itemtype.

valuesdict[str, object]

Field-name → value mapping for the dynamic columns declared on the container.

entities_idint | None, optional

Entity to associate the row with. When omitted the GLPI server applies its default scope.

Returns:
int

Identifier of the newly created row.

Parameters:
Return type:

int

create_kb_article(article)

Create one knowledge base article and return its new identifier.

When article.categories is 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. None or 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 a RuntimeError naming 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:

int

create_kb_article_comment(article_id, comment)

Create one comment on a knowledge base article.

Parameters:
Return type:

int

create_kb_category(category)

Create one knowledge base category and return its new identifier.

Parameters:

category (PostKBCategory)

Return type:

int

create_location(location)

Create one GLPI location.

Parameters:
locationPostLocation

Request body describing the location to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

location (PostLocation)

Return type:

int

create_ticket(ticket)

Create one GLPI ticket.

Parameters:
ticketPostTicket

Request body describing the ticket to create. Any extra fields are forwarded verbatim through extra_payload.

Returns:
int

Identifier assigned by the GLPI server to the new ticket.

Raises:
GlpiStatusError

If the HTTP status is not success.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

ticket (PostTicket)

Return type:

int

create_ticket_followup(ticket_id, followup)

Create one followup on a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followupPostFollowup

Request body describing the followup to create.

Returns:
int

Identifier assigned by the GLPI server to the new followup.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

create_ticket_solution(ticket_id, solution)

Create one solution on a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solutionPostSolution

Request body describing the solution to create.

Returns:
int

Identifier assigned by the GLPI server to the new solution.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

create_ticket_task(ticket_id, task)

Create one task on a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

taskPostTicketTask

Request body describing the task to create.

Returns:
int

Identifier assigned by the GLPI server to the new task.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

create_user(user)

Create one GLPI user.

Parameters:
userPostUser

Request body describing the user to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

user (PostUser)

Return type:

int

delete_computer(computer_id, *, force=None)

Delete one GLPI computer by identifier.

Parameters:
computer_idGlpiId

Numeric identifier of the computer to delete.

forcebool | None, optional

When True the computer is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • computer_id (int)

  • force (bool | None)

Return type:

None

delete_contract(contract_id, *, force=None)

Delete one GLPI contract by identifier.

Parameters:
contract_idGlpiId

Numeric identifier of the contract to delete.

forcebool | None, optional

When True the contract is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_id (int)

  • force (bool | None)

Return type:

None

delete_contract_cost(contract_id, cost_id, *, force=None)

Delete one cost line from a GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

cost_idGlpiId

Numeric identifier of the cost line to delete.

forcebool | None, optional

When True the cost line is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_id (int)

  • cost_id (int)

  • force (bool | None)

Return type:

None

delete_contract_type(contract_type_id, *, force=None)

Delete one GLPI contract type by identifier.

Parameters:
contract_type_idGlpiId

Numeric identifier of the contract type to delete.

forcebool | None, optional

When True the contract type is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_type_id (int)

  • force (bool | None)

Return type:

None

delete_document(document_id, *, force=None)

Delete one GLPI document by identifier.

Parameters:
document_idGlpiId

Numeric identifier of the document to delete.

forcebool | None, optional

When True the document is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • document_id (int)

  • force (bool | None)

Return type:

None

delete_entity(entity_id, *, force=None)

Delete one GLPI entity by identifier.

Parameters:
entity_idGlpiId

Numeric identifier of the entity to delete.

forcebool | None, optional

When True the entity is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • entity_id (int)

  • force (bool | None)

Return type:

None

delete_kb_article(article_id, *, force=None)

Delete one knowledge base article by identifier.

Parameters:
  • article_id (int)

  • force (bool | None)

Return type:

None

delete_kb_article_comment(article_id, comment_id, *, force=None)

Delete one knowledge base article comment by identifier.

Parameters:
  • article_id (int)

  • comment_id (int)

  • force (bool | None)

Return type:

None

delete_kb_category(category_id, *, force=None)

Delete one knowledge base category by identifier.

Parameters:
  • category_id (int)

  • force (bool | None)

Return type:

None

delete_location(location_id, *, force=None)

Delete one GLPI location by identifier.

Parameters:
location_idGlpiId

Numeric identifier of the location to delete.

forcebool | None, optional

When True the location is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • location_id (int)

  • force (bool | None)

Return type:

None

delete_ticket(ticket_id, *, force=None)

Delete one GLPI ticket by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to delete.

forcebool | None, optional

When True the GLPI server permanently removes the ticket instead of moving it to the trash. None omits the query parameter and uses the GLPI default behaviour.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • force (bool | None)

Return type:

None

delete_ticket_followup(ticket_id, followup_id, *, force=None)

Delete one ticket followup by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followup_idGlpiId

Numeric identifier of the followup to delete.

forcebool | None, optional

When True the followup is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • followup_id (int)

  • force (bool | None)

Return type:

None

delete_ticket_solution(ticket_id, solution_id, *, force=None)

Delete one ticket solution by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solution_idGlpiId

Numeric identifier of the solution to delete.

forcebool | None, optional

When True the solution is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • solution_id (int)

  • force (bool | None)

Return type:

None

delete_ticket_task(ticket_id, task_id, *, force=None)

Delete one ticket task by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

task_idGlpiId

Numeric identifier of the task to delete.

forcebool | None, optional

When True the task is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • task_id (int)

  • force (bool | None)

Return type:

None

delete_user(user_id, *, force=None)

Delete one GLPI user by identifier.

Parameters:
user_idGlpiId

Numeric identifier of the user to delete.

forcebool | None, optional

When True the user is permanently deleted instead of being moved to the trash. None omits the query parameter.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • user_id (int)

  • force (bool | None)

Return type:

None

download_document_content(document_id)

Download the raw binary payload for one GLPI document.

Parameters:
document_idGlpiId

Numeric identifier of the document whose binary content is requested.

Returns:
bytes

Raw bytes returned by the GLPI download endpoint.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

document_id (int)

Return type:

bytes

entity_recursive: bool
find_user_by_email(email, *, rsql_filter='', batch_size=100, skip_entity=True)

Return the first user holding email, or None.

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 identical Ticket.team answers 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_size users until it matches, so it is meant for occasional resolution, not for a per-request lookup. Narrow it with rsql_filter when 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:
emailstr

Address to look for. Compared case-insensitively after trimming surrounding whitespace, the way mail systems treat it.

rsql_filterstr, optional

Raw RSQL filter narrowing the population scanned. Empty by default, which scans every visible user.

batch_sizeint, optional

Users fetched per request while scanning (defaults to 100).

skip_entitybool, optional

When True (the default) the GLPI-Entity header 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 answer None for somebody who exists.

Returns:
GetUser | None

The first user with a matching address, or None when the scanned population holds none.

Raises:
GlpiValidationError

If email is blank – which would otherwise scan the whole directory and match nothing.

Parameters:
  • email (str)

  • rsql_filter (str)

  • batch_size (int)

  • skip_entity (bool)

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:
envMapping[str, str] | None, optional

Mapping the helper reads values from. Defaults to os.environ.

prefixstr, optional

Common prefix shared by every environment variable name.

**overridesobject

Keyword overrides forwarded to __init__(); the keyword overrides are forwarded verbatim.

Returns:
Self

A fully configured client ready to perform requests.

Raises:
GlpiValidationError

If the resolved configuration is missing a required field.

Parameters:
Return type:

Self

get_computer(computer_id)

Fetch one GLPI computer by identifier.

Parameters:
computer_idGlpiId

Numeric identifier of the computer to retrieve.

Returns:
GetComputer

Validated computer payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

computer_id (int)

Return type:

GetComputer

get_computer_contract(computer_id, link_id)

Fetch one contract link recorded against a GLPI computer.

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

link_idGlpiId

Numeric identifier of the contract link to retrieve.

Returns:
GetContractItem

Validated contract link payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • computer_id (int)

  • link_id (int)

Return type:

GetContractItem

get_contract(contract_id)

Fetch one GLPI contract by identifier.

Parameters:
contract_idGlpiId

Numeric identifier of the contract to retrieve.

Returns:
GetContract

Validated contract payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

contract_id (int)

Return type:

GetContract

get_contract_cost(contract_id, cost_id)

Fetch one cost line recorded against a GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

cost_idGlpiId

Numeric identifier of the cost line to retrieve.

Returns:
GetContractCost

Validated cost line payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_id (int)

  • cost_id (int)

Return type:

GetContractCost

get_contract_type(contract_type_id)

Fetch one GLPI contract type by identifier.

Parameters:
contract_type_idGlpiId

Numeric identifier of the contract type to retrieve.

Returns:
GetContractType

Validated contract type payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

contract_type_id (int)

Return type:

GetContractType

get_document(document_id)

Fetch one GLPI document by identifier.

Parameters:
document_idGlpiId

Numeric identifier of the document to retrieve.

Returns:
GetDocument

Validated document metadata payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

document_id (int)

Return type:

GetDocument

get_entity(entity_id)

Fetch one GLPI entity by identifier.

Parameters:
entity_idGlpiId

Numeric identifier of the entity to retrieve.

Returns:
GetEntity

Validated entity payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

entity_id (int)

Return type:

GetEntity

get_kb_article(article_id)

Fetch one knowledge base article by identifier.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

article_id (int)

Return type:

GetKBArticle

get_kb_article_comment(article_id, comment_id)

Fetch one knowledge base article comment by identifier.

Parameters:
  • article_id (int)

  • comment_id (int)

Return type:

GetKBArticleComment

get_kb_article_revision(article_id, revision, *, language=None)

Fetch one revision of a knowledge base article by revision number.

Parameters:
  • article_id (int)

  • revision (int)

  • language (str | None)

Return type:

GetKBArticleRevision

get_kb_category(category_id)

Fetch one knowledge base category by identifier.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

category_id (int)

Return type:

GetKBCategory

get_location(location_id)

Fetch one GLPI location by identifier.

Parameters:
location_idGlpiId

Numeric identifier of the location to retrieve.

Returns:
GetLocation

Validated location payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

location_id (int)

Return type:

GetLocation

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(), computes duration_by_entity by grouping get_task_statistics() results against the per-ticket entity map, and optionally returns a flat list of individual task records.

Parameters:
start_datestr | None, optional

ISO YYYY-MM-DD start of the window (inclusive from 00:00:00). Defaults to end_date - default_days + 1 when omitted.

end_datestr | None, optional

ISO YYYY-MM-DD end of the window (inclusive through 23:59:59). Defaults to today.

default_daysint, optional

Span in days used when start_date is omitted (defaults to 30 and must be a positive integer).

entity_idint | None, optional

Restrict to tickets in this entity.

entity_namestr | None, optional

Resolve entity by name and restrict to matched entities (ignored when entity_id is given).

user_idint | None, optional

Restrict to tickets where the user is an assignee or requester (OR semantics across both roles).

user_editor_idint | None, optional

Restrict to tickets last updated by this user.

user_recipient_idint | None, optional

Restrict to tickets where this user is the requester.

extra_filterstr | None, optional

Optional raw RSQL fragment appended as an AND clause.

return_task_detailsbool, optional

When True, include a tasks list of individual task records in the returned mapping (default False).

Returns:
TaskDurationsResult

Mapping with start_date, end_date, total_duration, task_count, duration_by_user, duration_by_entity, and tasks (None when return_task_details=False).

Raises:
GlpiValidationError

If default_days < 1, start_date / end_date is not a valid ISO date, or start_date is after end_date.

Parameters:
  • start_date (str | None)

  • end_date (str | None)

  • default_days (int)

  • entity_id (int | None)

  • entity_name (str | None)

  • user_id (int | None)

  • user_editor_id (int | None)

  • user_recipient_id (int | None)

  • extra_filter (str | None)

  • return_task_details (bool)

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_tickets first.

Parameters:
ticket_idslist[int]

Identifiers of the tickets whose tasks should be aggregated. An empty list returns zeroed totals without any HTTP call.

Returns:
TaskStatisticsResult

Mapping with ticket_count, task_count, total_duration, duration_by_user, and duration_by_ticket entries (durations are integer seconds, matching the GLPI duration field).

Parameters:

ticket_ids (list[int])

Return type:

TaskStatisticsResult

get_ticket(ticket_id)

Fetch one GLPI ticket by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to retrieve.

Returns:
GetTicket

Validated ticket payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

ticket_id (int)

Return type:

GetTicket

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_idGlpiId

Numeric identifier of the ticket to assemble.

Returns:
GlpiTicketContext

Aggregated view bundling the primary ticket together with its tasks, followups, solutions, and timeline document links.

Raises:
GlpiStatusError

If any of the underlying GLPI calls returns a non-success HTTP status.

Parameters:

ticket_id (int)

Return type:

GlpiTicketContext

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.

Parameters:
ticket_idint

Identifier of the ticket whose custom values are requested.

Returns:
dict[str, dict[str, Any]]

Per-container value mappings. Empty when the ticket has no stored custom values across any container.

Parameters:

ticket_id (int)

Return type:

dict[str, dict[str, Any]]

get_ticket_followup(ticket_id, followup_id)

Fetch one ticket followup by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followup_idGlpiId

Numeric identifier of the followup to retrieve.

Returns:
GetFollowup

Validated followup payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • followup_id (int)

Return type:

GetFollowup

get_ticket_solution(ticket_id, solution_id)

Fetch one ticket solution by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solution_idGlpiId

Numeric identifier of the solution to retrieve.

Returns:
GetSolution

Validated solution payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • solution_id (int)

Return type:

GetSolution

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_creation field and results are aggregated locally in Python. Returned identifiers are the raw GLPI numeric values that callers can resolve with the dedicated search_* helpers when human labels are needed.

Parameters:
start_datestr | None, optional

ISO YYYY-MM-DD start of the window (inclusive from 00:00:00). Defaults to end_date - default_days + 1 when omitted.

end_datestr | None, optional

ISO YYYY-MM-DD end of the window (inclusive through 23:59:59). Defaults to today.

default_daysint, optional

Span in days used when start_date is omitted (defaults to 30 and must be a positive integer).

entity_idint | None, optional

When provided, restricts results to tickets belonging to the entity with this GLPI identifier.

entity_namestr | None, optional

When provided (and entity_id is None), the name is resolved via search_entities and the matched entity IDs are used to filter tickets. If no entity matches, {"entities": {}} is returned immediately.

extra_filterstr | None, optional

Optional raw RSQL fragment to AND with the date window on the server side.

Returns:
dict[str, object]

Mapping with one entities key listing per-entity aggregates. Each entity bucket exposes total, by_status, by_priority, and by_type counters.

Raises:
GlpiValidationError

If default_days < 1, start_date / end_date is not a valid ISO date, or start_date is after end_date.

Parameters:
  • start_date (str | None)

  • end_date (str | None)

  • default_days (int)

  • entity_id (int | None)

  • entity_name (str | None)

  • extra_filter (str | None)

Return type:

dict[str, object]

get_ticket_task(ticket_id, task_id)

Fetch one ticket task by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

task_idGlpiId

Numeric identifier of the task to retrieve.

Returns:
GetTicketTask

Validated task payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • task_id (int)

Return type:

GetTicketTask

get_ticket_timeline_document(ticket_id, document_link_id)

Fetch one document linked to the ticket timeline by its document ID.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

document_link_idGlpiId

Numeric identifier of the linked document to retrieve.

Returns:
GetDocument

Validated document payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • document_link_id (int)

Return type:

GetDocument

get_user(user_id)

Fetch one GLPI user by identifier.

Parameters:
user_idGlpiId

Numeric identifier of the user to retrieve.

Returns:
GetUser

Validated user payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

user_id (int)

Return type:

GetUser

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_idint | None, optional

Identify the user by GLPI numeric identifier.

usernamestr | None, optional

Filter by username (substring match).

realnamestr | None, optional

Filter by family name (substring match).

firstnamestr | None, optional

Filter by given name (substring match).

start_datestr | None, optional

ISO YYYY-MM-DD start of the activity window (inclusive from 00:00:00).

end_datestr | None, optional

ISO YYYY-MM-DD end of the activity window (inclusive through 23:59:59). Defaults to today.

default_daysint, optional

Span in days used when start_date is omitted (default 30).

Returns:
UserActivityResult

Mapping with one users key. Each user key maps to a UserActivityEntry with user_ids, tickets_as_technician, tickets_as_recipient, and task_durations.

Raises:
GlpiValidationError

If none of user_id, username, realname, or firstname are supplied, or if the supplied criteria match no GLPI users.

Parameters:
  • user_id (int | None)

  • username (str | None)

  • realname (str | None)

  • firstname (str | None)

  • start_date (str | None)

  • end_date (str | None)

  • default_days (int)

Return type:

UserActivityResult

glpi_api_url: str
glpi_entity: int | None
glpi_profile: int | None
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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_computers() call.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_mod:desc". Forwarded to each page request; omitted when None, leaving the server default ordering in place.

Yields:
list[GetComputer]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

Return type:

Iterator[list[GetComputer]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_contract_types() call.

Yields:
list[GetContractType]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

Iterator[list[GetContractType]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_contracts() call.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_begin:desc". Forwarded to each page request; omitted when None, leaving the server default ordering in place.

Yields:
list[GetContract]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

Return type:

Iterator[list[GetContract]]

iter_search_documents(rsql_filter='', *, batch_size=50)

Yield successive pages of GLPI documents until exhausted.

The generator drives pagination automatically by advancing the start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_documents() call.

Yields:
list[GetDocument]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

Iterator[list[GetDocument]]

iter_search_entities(rsql_filter='', *, batch_size=50)

Yield successive pages of GLPI entities until exhausted.

The generator drives pagination automatically by advancing the start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page. Entity calls bypass the GLPI-Entity header so cross-entity lookups remain possible.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every accessible entity.

batch_sizeint, optional

Number of records requested per page (default 50).

Yields:
list[GetEntity]

One page of entities per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

Iterator[list[GetEntity]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_kb_articles() call.

sortstr | None, optional

sort query parameter forwarded to each page request, spelled field or field:direction (e.g. "date_mod:desc"). A space before the direction answers HTTP 400.

languagestr | None, optional

GLPI language code forwarded to each page request to select a translated view.

Yields:
list[GetKBArticle]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

  • language (str | None)

Return type:

Iterator[list[GetKBArticle]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_kb_categories() call.

sortstr | None, optional

sort query parameter forwarded to each page request, spelled field or field:direction (e.g. "date_mod:desc"). A space before the direction answers HTTP 400.

languagestr | None, optional

GLPI language code forwarded to each page request to select a translated view.

Yields:
list[GetKBCategory]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

  • language (str | None)

Return type:

Iterator[list[GetKBCategory]]

iter_search_locations(rsql_filter='', *, batch_size=50)

Yield successive pages of GLPI locations until exhausted.

The generator drives pagination automatically by advancing the start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_locations() call.

Yields:
list[GetLocation]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

Iterator[list[GetLocation]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible ticket.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_tickets() call.

sortstr | None, optional

sort query parameter forwarded to each page request, spelled field or field:direction (e.g. "date_mod:desc"). A space before the direction answers HTTP 400.

fieldstuple[str, …], optional

Restricted set of contract field names to request.

Yields:
list[GetTicket]

One page of tickets per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
Return type:

Iterator[list[GetTicket]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible user.

batch_sizeint, optional

Number of records requested per page (default 50).

skip_entitybool, optional

When True the GLPI-Entity header is omitted so the search spans every entity the caller has access to.

Yields:
list[GetUser]

One page of users per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • skip_entity (bool)

Return type:

Iterator[list[GetUser]]

language: str

Link one GLPI contract to one computer.

The itemtype and items_id fields are set from computer_id rather than taken from link. The GLPI contract types itemtype as 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_idGlpiId

Numeric identifier of the computer the contract covers.

linkPostContractItem

Request body naming the contract to link. Any itemtype or items_id set on it is replaced.

Returns:
int

Identifier assigned to the new link by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

Link an existing GLPI document to one ticket timeline.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

document_linkPostTimelineDocument

Request body describing the link (typically the timeline position; document and ticket identifiers are inferred from the URL).

Returns:
int

Identifier assigned by the GLPI server to the new link.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

list_computer_contracts(computer_id, *, limit=50, start=0)

List the contracts linked to one GLPI computer.

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetContractItem]

Contract links belonging to the computer.

Parameters:
Return type:

list[GetContractItem]

list_contract_costs(contract_id, *, limit=50, start=0)

List the cost lines recorded against one GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetContractCost]

Cost lines belonging to the contract.

Parameters:
Return type:

list[GetContractCost]

list_item_plugin_field_rows(itemtype, items_id, container_name)

List the value rows of one container for one parent item.

Parameters:
itemtypestr

Parent itemtype (e.g. "Ticket").

items_idint

Identifier of the parent item.

container_namestr

Internal name of the container as exposed by GetPluginFieldsContainer.name.

Returns:
list[GetPluginFieldsValueRow]

Zero or one row depending on whether the plugin has already persisted any value for this item.

Parameters:
  • itemtype (str)

  • items_id (int)

  • container_name (str)

Return type:

list[GetPluginFieldsValueRow]

list_kb_article_comments(article_id)

List every comment attached to one knowledge base article.

Parameters:

article_id (int)

Return type:

list[GetKBArticleComment]

list_kb_article_revisions(article_id, *, language=None)

List revisions of one knowledge base article.

Parameters:
article_idGlpiId

Numeric identifier of the parent article.

languagestr | None, optional

When provided, list revisions for that GLPI language code using the language-scoped contract path.

Parameters:
  • article_id (int)

  • language (str | None)

Return type:

list[GetKBArticleRevision]

list_plugin_fields_containers(itemtype=None)

List PluginFieldsContainer rows registered on the server.

Parameters:
itemtypestr | None, optional

When provided, only the containers attached to itemtype are returned. The filtering happens client-side because the v1 API stores itemtypes as a JSON-encoded string.

Returns:
list[GetPluginFieldsContainer]

Containers visible to the authenticated user.

Parameters:

itemtype (str | None)

Return type:

list[GetPluginFieldsContainer]

list_plugin_fields_fields(container_id=None)

List PluginFieldsField declarations.

Parameters:
container_idint | None, optional

When provided, restricts the result to the fields declared on this container (the filtering is performed client-side because the v1 API does not consistently honour the searchText filter on this itemtype).

Returns:
list[GetPluginFieldsField]

Field declarations visible to the authenticated user.

Parameters:

container_id (int | None)

Return type:

list[GetPluginFieldsField]

list_ticket_followups(ticket_id)

List all followups linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetFollowup]

Followups returned by the GLPI server, with the timeline envelope unwrapped where present.

Parameters:

ticket_id (int)

Return type:

list[GetFollowup]

list_ticket_solutions(ticket_id)

List all solutions linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetSolution]

Solutions returned by the GLPI server, with the timeline envelope unwrapped where present.

Parameters:

ticket_id (int)

Return type:

list[GetSolution]

list_ticket_tasks(ticket_id)

List all tasks linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetTicketTask]

Tasks returned by the GLPI server, with the timeline envelope unwrapped where present.

Parameters:

ticket_id (int)

Return type:

list[GetTicketTask]

list_ticket_team_members(ticket_id)

List the team members currently linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket whose team members are listed.

Returns:
list[GetTeamMember]

Team members validated against the contract TeamMember schema.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

ticket_id (int)

Return type:

list[GetTeamMember]

list_ticket_timeline_documents(ticket_id)

List all documents linked to one ticket timeline.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetDocument]

Document records returned by the GLPI server. The live API wraps each entry in a {"type": "Document_Item", "item": {...}} envelope whose item value is a full Document record; the envelope is unwrapped automatically.

Parameters:

ticket_id (int)

Return type:

list[GetDocument]

remove_ticket_team_member(ticket_id, member)

Remove one team member from a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket the member belongs to.

memberPostTeamMember

Request body identifying the member to remove (same shape as add_ticket_team_member()).

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

search_computers(rsql_filter='', *, limit=50, start=0, sort=None)

Search GLPI computers with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_mod:desc". Omitted when None, leaving the server default ordering in place.

Returns:
list[GetComputer]

Computers matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

Return type:

list[GetComputer]

search_contract_types(rsql_filter='', *, limit=50, start=0)

Search GLPI contract types with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetContractType]

Contract types matching the filter.

Parameters:
Return type:

list[GetContractType]

search_contracts(rsql_filter='', *, limit=50, start=0, sort=None)

Search GLPI contracts with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_begin:desc". Omitted when None, leaving the server default ordering in place.

Returns:
list[GetContract]

Contracts matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

Return type:

list[GetContract]

search_documents(rsql_filter='', *, limit=50, start=0)

Search GLPI documents with an optional raw RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL expression forwarded to the filter query parameter (for example "name=='*manual*'"). When empty the parameter is omitted and the server returns its default paginated listing.

limitint, optional

Maximum number of records to return (defaults to 50).

startint, optional

Zero-based offset for pagination (defaults to 0).

Returns:
list[GetDocument]

Documents matching the filter window.

Parameters:
Return type:

list[GetDocument]

search_entities(rsql_filter='', *, limit=50, start=0)

Search GLPI entities with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint | None, optional

Maximum number of records returned. None lets the GLPI server use its default.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetEntity]

Entities matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int | None)

  • start (int)

Return type:

list[GetEntity]

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_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

sort query parameter, spelled field or field:direction (e.g. "date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a bare field sorts ascending, and a separate order parameter is ignored.

languagestr | None, optional

GLPI language code forwarded as the language query parameter to select a translated view.

Returns:
list[GetKBArticle]

Articles matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

  • language (str | None)

Return type:

list[GetKBArticle]

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_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

sort query parameter, spelled field or field:direction (e.g. "name:asc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a bare field sorts ascending, and a separate order parameter is ignored.

languagestr | None, optional

GLPI language code forwarded as the language query parameter to select a translated view.

Returns:
list[GetKBCategory]

Categories matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

  • language (str | None)

Return type:

list[GetKBCategory]

search_locations(rsql_filter='', *, limit=50, start=0)

Search GLPI locations with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetLocation]

Locations matching the filter.

Parameters:
Return type:

list[GetLocation]

search_tickets(rsql_filter='', *, limit=50, start=0, sort=None, fields=())

Search GLPI tickets with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter (for example "name==hello" or "status==2"). Empty by default, which lists every visible ticket.

limitint, optional

Maximum number of records returned by the GLPI server in one request.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

sort query parameter, spelled field or field:direction (e.g. "date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a bare field sorts ascending, and a separate order parameter is ignored.

fieldstuple[str, …], optional

Restricted set of contract field names to request. Empty tuple lets the GLPI server pick its default field set.

Returns:
list[GetTicket]

Tickets matching the filter, validated against the contract Ticket schema.

Parameters:
Return type:

list[GetTicket]

search_users(rsql_filter='', *, limit=50, start=0, skip_entity=False)

Search GLPI users with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter, for example "username==alice". Empty by default.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

skip_entitybool, optional

When True the GLPI-Entity header is omitted so the search spans every entity the caller has access to.

Returns:
list[GetUser]

Users matching the filter, validated against the contract User schema.

Parameters:
Return type:

list[GetUser]

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[].id is readOnly), so it silently drops category writes. This helper sets the underlying _categories field through the legacy v1 API, which requires v1_base_url/v1_user_token to be configured (pointing at the legacy apirest.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:
RuntimeError

When no legacy v1 session is configured on the client.

GlpiStatusError

When 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 GlpiValidationError before any write to keep the call atomic from the caller’s perspective.

Parameters:
ticket_idint

Identifier of the ticket whose custom values must be set.

valuesdict[str, dict[str, Any]]

Nested mapping {container_name: {field_name: value}} describing the columns to write. Container and field names must match what list_plugin_fields_containers() and list_plugin_fields_fields() return.

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_idGlpiId

Numeric identifier of the document whose binary content is requested.

chunk_sizeint, optional

Bytes requested per chunk (defaults to 64 KiB).

Yields:
bytes

Successive chunks of the document body. The final chunk may be shorter than chunk_size.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • document_id (int)

  • chunk_size (int)

Return type:

Iterator[bytes]

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)

Remove one contract link from a GLPI computer.

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

link_idGlpiId

Numeric identifier of the contract link to remove.

forcebool | None, optional

When True the link is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • computer_id (int)

  • link_id (int)

  • force (bool | None)

Return type:

None

Unlink one timeline document from a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

document_link_idGlpiId

Numeric identifier of the timeline document link to remove.

forcebool | None, optional

When True the link is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • document_link_id (int)

  • force (bool | None)

Return type:

None

update_computer(computer_id, computer)

Update one GLPI computer with a partial body.

Parameters:
computer_idGlpiId

Numeric identifier of the computer to update.

computerPatchComputer

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_computer_contract(computer_id, link_id, link)

Update one computer-contract link with a partial body.

The itemtype and items_id fields are set from computer_id rather than taken from link, for the same reason as link_computer_contract().

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

link_idGlpiId

Numeric identifier of the contract link to update.

linkPatchContractItem

Partial request body. Any itemtype or items_id set on it is replaced.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_contract(contract_id, contract)

Update one GLPI contract with a partial body.

Parameters:
contract_idGlpiId

Numeric identifier of the contract to update.

contractPatchContract

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_contract_cost(contract_id, cost_id, cost)

Update one contract cost line with a partial body.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

cost_idGlpiId

Numeric identifier of the cost line to update.

costPatchContractCost

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_contract_type(contract_type_id, contract_type)

Update one GLPI contract type with a partial body.

Parameters:
contract_type_idGlpiId

Numeric identifier of the contract type to update.

contract_typePatchContractType

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_document(document_id, document)

Update one GLPI document with a partial body.

Parameters:
document_idGlpiId

Numeric identifier of the document to update.

documentPatchDocument

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_entity(entity_id, entity)

Update one GLPI entity with a partial body.

Parameters:
entity_idGlpiId

Numeric identifier of the entity to update.

entityPatchEntity

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_item_plugin_field_row(*, itemtype, container_name, row_id, values)

Update one existing plugin-fields value row.

Parameters:
itemtypestr

Parent itemtype the container is attached to.

container_namestr

Internal name of the container.

row_idint

Identifier of the existing value row (as returned by list_item_plugin_field_rows()).

valuesdict[str, object]

Field-name → value mapping for the columns to update. Only the fields supplied here are touched; the others keep their previous value.

Parameters:
Return type:

None

update_kb_article(article_id, article)

Update one knowledge base article with a partial body.

When article.categories is 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:
Return type:

None

update_kb_article_comment(article_id, comment_id, comment)

Update one knowledge base article comment with a partial body.

Parameters:
Return type:

None

update_kb_category(category_id, category)

Update one knowledge base category with a partial body.

Parameters:
Return type:

None

update_location(location_id, location)

Update one GLPI location with a partial body.

Parameters:
location_idGlpiId

Numeric identifier of the location to update.

locationPatchLocation

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_ticket(ticket_id, ticket)

Update one GLPI ticket with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to update.

ticketPatchTicket

Partial request body. Only fields explicitly set are sent.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_ticket_followup(ticket_id, followup_id, followup)

Update one ticket followup with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followup_idGlpiId

Numeric identifier of the followup to update.

followupPatchFollowup

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_ticket_solution(ticket_id, solution_id, solution)

Update one ticket solution with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solution_idGlpiId

Numeric identifier of the solution to update.

solutionPatchSolution

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_ticket_task(ticket_id, task_id, task)

Update one ticket task with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

task_idGlpiId

Numeric identifier of the task to update.

taskPatchTicketTask

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
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_idGlpiId

Numeric identifier of the parent ticket.

document_link_idGlpiId

Numeric identifier of the timeline document link to update.

document_linkPatchTimelineDocument

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

update_user(user_id, user)

Update one GLPI user with a partial body.

Parameters:
user_idGlpiId

Numeric identifier of the user to update.

userPatchUser

Partial request body. Only fields explicitly set are sent.

Returns:
None
Raises:
GlpiStatusError

If 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_url and v1_user_token to be configured on the client.

Parameters:
filenamestr

Name to advertise in the multipart form. Required and must be non-empty.

contentbytes

Raw binary payload to upload.

mime_typestr, optional

MIME type advertised in the multipart part (defaults to application/octet-stream).

document_namestr | None, optional

Human-readable display name. Defaults to filename when omitted.

ticket_idint | None, optional

Identifier of one ticket to attach the uploaded document to.

entity_idint | None, optional

Identifier of one GLPI entity to scope the upload to.

Returns:
dict[str, object]

Raw JSON dictionary returned by the legacy v1 upload endpoint.

Raises:
GlpiValidationError

If filename is empty.

RuntimeError

If the v1 session is not configured on the client.

Parameters:
  • filename (str)

  • content (bytes)

  • mime_type (str)

  • document_name (str | None)

  • ticket_id (int | None)

  • entity_id (int | None)

Return type:

dict[str, object]

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, TransportMixin

GLPI 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, or None.

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 PluginFieldsContainer rows registered on the server.

list_plugin_fields_fields([container_id])

List PluginFieldsField declarations.

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_urlstr

Base URL of the GLPI v2 REST API, e.g. https://glpi.example.com/api.php/v2.

server_timezonestr | tzinfo

IANA name of the timezone the GLPI server runs in (e.g. "Europe/Paris"), or a tzinfo. 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 datetime arrive 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:00 to +14:00 written 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:00 and +02:00.

client_idstr | None, optional

OAuth client identifier used to obtain access tokens.

client_secretstr | None, optional

OAuth client secret paired with client_id.

usernamestr | None, optional

GLPI account username used for the OAuth password grant.

passwordstr | None, optional

GLPI account password used for the OAuth password grant.

glpi_entityint | None, optional

Default GLPI-Entity header sent with each request.

glpi_profileint | None, optional

Default GLPI-Profile header sent with each request.

entity_recursivebool, optional

When True the GLPI-Entity-Recursive header is sent so entity scope includes child entities.

languagestr, optional

Default Accept-Language header value (e.g. "en_GB").

verify_sslbool, optional

Whether the HTTP session verifies the server certificate.

auth_token_refreshint | None, optional

Number of seconds before token expiry at which the auth manager proactively refreshes the access token.

v1_base_urlstr | 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_tokenstr | None, optional

user_token for the v1 fallback session.

v1_app_tokenstr | None, optional

app_token for the v1 fallback session.

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, or None.

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 PluginFieldsContainer rows registered on the server.

list_plugin_fields_fields([container_id])

List PluginFieldsField declarations.

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:
GlpiValidationError

If 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_idGlpiId

Numeric identifier of the ticket to receive the new member.

memberPostTeamMember

Request body describing the member. The id field is the target user/group/supplier identifier, type is one of "User", "Group" or "Supplier", and role is one of "requester", "assigned" or "observer".

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
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:
computerPostComputer

Request body describing the computer to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

computer (PostComputer)

Return type:

int

async create_contract(contract)

Create one GLPI contract.

Parameters:
contractPostContract

Request body describing the contract to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

contract (PostContract)

Return type:

int

async create_contract_cost(contract_id, cost)

Create one cost line against a GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

costPostContractCost

Request body describing the cost line to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

async create_contract_type(contract_type)

Create one GLPI contract type.

Parameters:
contract_typePostContractType

Request body describing the contract type to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

contract_type (PostContractType)

Return type:

int

async create_document(document)

Create one GLPI document metadata record.

Binary uploads use upload_document() instead of the JSON metadata endpoint exposed here.

Parameters:
documentPostDocument

Request body describing the document metadata.

Returns:
int

Identifier assigned by the GLPI server to the new document.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

document (PostDocument)

Return type:

int

async create_entity(entity)

Create one GLPI entity.

Parameters:
entityPostEntity

Request body describing the entity to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

entity (PostEntity)

Return type:

int

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:
itemtypestr

Parent itemtype (e.g. "Ticket").

items_idint

Identifier of the parent item the row is attached to.

container_idint

Identifier of the originating GetPluginFieldsContainer.

container_namestr

Internal name of the container, used to derive the value itemtype.

valuesdict[str, object]

Field-name → value mapping for the dynamic columns declared on the container.

entities_idint | None, optional

Entity to associate the row with. When omitted the GLPI server applies its default scope.

Returns:
int

Identifier of the newly created row.

Parameters:
Return type:

int

async create_kb_article(article)

Create one knowledge base article and return its new identifier.

When article.categories is 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. None or 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 a RuntimeError naming 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:

int

async create_kb_article_comment(article_id, comment)

Create one comment on a knowledge base article.

Parameters:
Return type:

int

async create_kb_category(category)

Create one knowledge base category and return its new identifier.

Parameters:

category (PostKBCategory)

Return type:

int

async create_location(location)

Create one GLPI location.

Parameters:
locationPostLocation

Request body describing the location to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

location (PostLocation)

Return type:

int

async create_ticket(ticket)

Create one GLPI ticket.

Parameters:
ticketPostTicket

Request body describing the ticket to create. Any extra fields are forwarded verbatim through extra_payload.

Returns:
int

Identifier assigned by the GLPI server to the new ticket.

Raises:
GlpiStatusError

If the HTTP status is not success.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

ticket (PostTicket)

Return type:

int

async create_ticket_followup(ticket_id, followup)

Create one followup on a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followupPostFollowup

Request body describing the followup to create.

Returns:
int

Identifier assigned by the GLPI server to the new followup.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

async create_ticket_solution(ticket_id, solution)

Create one solution on a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solutionPostSolution

Request body describing the solution to create.

Returns:
int

Identifier assigned by the GLPI server to the new solution.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

async create_ticket_task(ticket_id, task)

Create one task on a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

taskPostTicketTask

Request body describing the task to create.

Returns:
int

Identifier assigned by the GLPI server to the new task.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

async create_user(user)

Create one GLPI user.

Parameters:
userPostUser

Request body describing the user to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:

user (PostUser)

Return type:

int

async delete_computer(computer_id, *, force=None)

Delete one GLPI computer by identifier.

Parameters:
computer_idGlpiId

Numeric identifier of the computer to delete.

forcebool | None, optional

When True the computer is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • computer_id (int)

  • force (bool | None)

Return type:

None

async delete_contract(contract_id, *, force=None)

Delete one GLPI contract by identifier.

Parameters:
contract_idGlpiId

Numeric identifier of the contract to delete.

forcebool | None, optional

When True the contract is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_id (int)

  • force (bool | None)

Return type:

None

async delete_contract_cost(contract_id, cost_id, *, force=None)

Delete one cost line from a GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

cost_idGlpiId

Numeric identifier of the cost line to delete.

forcebool | None, optional

When True the cost line is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_id (int)

  • cost_id (int)

  • force (bool | None)

Return type:

None

async delete_contract_type(contract_type_id, *, force=None)

Delete one GLPI contract type by identifier.

Parameters:
contract_type_idGlpiId

Numeric identifier of the contract type to delete.

forcebool | None, optional

When True the contract type is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_type_id (int)

  • force (bool | None)

Return type:

None

async delete_document(document_id, *, force=None)

Delete one GLPI document by identifier.

Parameters:
document_idGlpiId

Numeric identifier of the document to delete.

forcebool | None, optional

When True the document is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • document_id (int)

  • force (bool | None)

Return type:

None

async delete_entity(entity_id, *, force=None)

Delete one GLPI entity by identifier.

Parameters:
entity_idGlpiId

Numeric identifier of the entity to delete.

forcebool | None, optional

When True the entity is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • entity_id (int)

  • force (bool | None)

Return type:

None

async delete_kb_article(article_id, *, force=None)

Delete one knowledge base article by identifier.

Parameters:
  • article_id (int)

  • force (bool | None)

Return type:

None

async delete_kb_article_comment(article_id, comment_id, *, force=None)

Delete one knowledge base article comment by identifier.

Parameters:
  • article_id (int)

  • comment_id (int)

  • force (bool | None)

Return type:

None

async delete_kb_category(category_id, *, force=None)

Delete one knowledge base category by identifier.

Parameters:
  • category_id (int)

  • force (bool | None)

Return type:

None

async delete_location(location_id, *, force=None)

Delete one GLPI location by identifier.

Parameters:
location_idGlpiId

Numeric identifier of the location to delete.

forcebool | None, optional

When True the location is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • location_id (int)

  • force (bool | None)

Return type:

None

async delete_ticket(ticket_id, *, force=None)

Delete one GLPI ticket by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to delete.

forcebool | None, optional

When True the GLPI server permanently removes the ticket instead of moving it to the trash. None omits the query parameter and uses the GLPI default behaviour.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • force (bool | None)

Return type:

None

async delete_ticket_followup(ticket_id, followup_id, *, force=None)

Delete one ticket followup by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followup_idGlpiId

Numeric identifier of the followup to delete.

forcebool | None, optional

When True the followup is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • followup_id (int)

  • force (bool | None)

Return type:

None

async delete_ticket_solution(ticket_id, solution_id, *, force=None)

Delete one ticket solution by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solution_idGlpiId

Numeric identifier of the solution to delete.

forcebool | None, optional

When True the solution is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • solution_id (int)

  • force (bool | None)

Return type:

None

async delete_ticket_task(ticket_id, task_id, *, force=None)

Delete one ticket task by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

task_idGlpiId

Numeric identifier of the task to delete.

forcebool | None, optional

When True the task is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • task_id (int)

  • force (bool | None)

Return type:

None

async delete_user(user_id, *, force=None)

Delete one GLPI user by identifier.

Parameters:
user_idGlpiId

Numeric identifier of the user to delete.

forcebool | None, optional

When True the user is permanently deleted instead of being moved to the trash. None omits the query parameter.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • user_id (int)

  • force (bool | None)

Return type:

None

async download_document_content(document_id)

Download the raw binary payload for one GLPI document.

Parameters:
document_idGlpiId

Numeric identifier of the document whose binary content is requested.

Returns:
bytes

Raw bytes returned by the GLPI download endpoint.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

document_id (int)

Return type:

bytes

entity_recursive: bool
async find_user_by_email(email, *, rsql_filter='', batch_size=100, skip_entity=True)

Return the first user holding email, or None.

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 identical Ticket.team answers 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_size users until it matches, so it is meant for occasional resolution, not for a per-request lookup. Narrow it with rsql_filter when 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:
emailstr

Address to look for. Compared case-insensitively after trimming surrounding whitespace, the way mail systems treat it.

rsql_filterstr, optional

Raw RSQL filter narrowing the population scanned. Empty by default, which scans every visible user.

batch_sizeint, optional

Users fetched per request while scanning (defaults to 100).

skip_entitybool, optional

When True (the default) the GLPI-Entity header 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 answer None for somebody who exists.

Returns:
GetUser | None

The first user with a matching address, or None when the scanned population holds none.

Raises:
GlpiValidationError

If email is blank – which would otherwise scan the whole directory and match nothing.

Parameters:
  • email (str)

  • rsql_filter (str)

  • batch_size (int)

  • skip_entity (bool)

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:
envMapping[str, str] | None, optional

Mapping the helper reads values from. Defaults to os.environ.

prefixstr, optional

Common prefix shared by every environment variable name.

**overridesobject

Keyword overrides forwarded to __init__(); the keyword overrides are forwarded verbatim.

Returns:
Self

A fully configured client ready to perform requests.

Raises:
GlpiValidationError

If 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_idGlpiId

Numeric identifier of the computer to retrieve.

Returns:
GetComputer

Validated computer payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

computer_id (int)

Return type:

GetComputer

async get_computer_contract(computer_id, link_id)

Fetch one contract link recorded against a GLPI computer.

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

link_idGlpiId

Numeric identifier of the contract link to retrieve.

Returns:
GetContractItem

Validated contract link payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • computer_id (int)

  • link_id (int)

Return type:

GetContractItem

async get_contract(contract_id)

Fetch one GLPI contract by identifier.

Parameters:
contract_idGlpiId

Numeric identifier of the contract to retrieve.

Returns:
GetContract

Validated contract payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

contract_id (int)

Return type:

GetContract

async get_contract_cost(contract_id, cost_id)

Fetch one cost line recorded against a GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

cost_idGlpiId

Numeric identifier of the cost line to retrieve.

Returns:
GetContractCost

Validated cost line payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • contract_id (int)

  • cost_id (int)

Return type:

GetContractCost

async get_contract_type(contract_type_id)

Fetch one GLPI contract type by identifier.

Parameters:
contract_type_idGlpiId

Numeric identifier of the contract type to retrieve.

Returns:
GetContractType

Validated contract type payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

contract_type_id (int)

Return type:

GetContractType

async get_document(document_id)

Fetch one GLPI document by identifier.

Parameters:
document_idGlpiId

Numeric identifier of the document to retrieve.

Returns:
GetDocument

Validated document metadata payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

document_id (int)

Return type:

GetDocument

async get_entity(entity_id)

Fetch one GLPI entity by identifier.

Parameters:
entity_idGlpiId

Numeric identifier of the entity to retrieve.

Returns:
GetEntity

Validated entity payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

entity_id (int)

Return type:

GetEntity

async get_kb_article(article_id)

Fetch one knowledge base article by identifier.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

article_id (int)

Return type:

GetKBArticle

async get_kb_article_comment(article_id, comment_id)

Fetch one knowledge base article comment by identifier.

Parameters:
  • article_id (int)

  • comment_id (int)

Return type:

GetKBArticleComment

async get_kb_article_revision(article_id, revision, *, language=None)

Fetch one revision of a knowledge base article by revision number.

Parameters:
  • article_id (int)

  • revision (int)

  • language (str | None)

Return type:

GetKBArticleRevision

async get_kb_category(category_id)

Fetch one knowledge base category by identifier.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

category_id (int)

Return type:

GetKBCategory

async get_location(location_id)

Fetch one GLPI location by identifier.

Parameters:
location_idGlpiId

Numeric identifier of the location to retrieve.

Returns:
GetLocation

Validated location payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

location_id (int)

Return type:

GetLocation

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(), computes duration_by_entity by grouping get_task_statistics() results against the per-ticket entity map, and optionally returns a flat list of individual task records.

Parameters:
start_datestr | None, optional

ISO YYYY-MM-DD start of the window (inclusive from 00:00:00). Defaults to end_date - default_days + 1 when omitted.

end_datestr | None, optional

ISO YYYY-MM-DD end of the window (inclusive through 23:59:59). Defaults to today.

default_daysint, optional

Span in days used when start_date is omitted (defaults to 30 and must be a positive integer).

entity_idint | None, optional

Restrict to tickets in this entity.

entity_namestr | None, optional

Resolve entity by name and restrict to matched entities (ignored when entity_id is given).

user_idint | None, optional

Restrict to tickets where the user is an assignee or requester (OR semantics across both roles).

user_editor_idint | None, optional

Restrict to tickets last updated by this user.

user_recipient_idint | None, optional

Restrict to tickets where this user is the requester.

extra_filterstr | None, optional

Optional raw RSQL fragment appended as an AND clause.

return_task_detailsbool, optional

When True, include a tasks list of individual task records in the returned mapping (default False).

Returns:
TaskDurationsResult

Mapping with start_date, end_date, total_duration, task_count, duration_by_user, duration_by_entity, and tasks (None when return_task_details=False).

Raises:
GlpiValidationError

If default_days < 1, start_date / end_date is not a valid ISO date, or start_date is after end_date.

Parameters:
  • start_date (str | None)

  • end_date (str | None)

  • default_days (int)

  • entity_id (int | None)

  • entity_name (str | None)

  • user_id (int | None)

  • user_editor_id (int | None)

  • user_recipient_id (int | None)

  • extra_filter (str | None)

  • return_task_details (bool)

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_tickets first.

Parameters:
ticket_idslist[int]

Identifiers of the tickets whose tasks should be aggregated. An empty list returns zeroed totals without any HTTP call.

Returns:
TaskStatisticsResult

Mapping with ticket_count, task_count, total_duration, duration_by_user, and duration_by_ticket entries (durations are integer seconds, matching the GLPI duration field).

Parameters:

ticket_ids (list[int])

Return type:

TaskStatisticsResult

async get_ticket(ticket_id)

Fetch one GLPI ticket by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to retrieve.

Returns:
GetTicket

Validated ticket payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

ticket_id (int)

Return type:

GetTicket

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_idGlpiId

Numeric identifier of the ticket to assemble.

Returns:
GlpiTicketContext

Aggregated view bundling the primary ticket together with its tasks, followups, solutions, and timeline document links.

Raises:
GlpiStatusError

If any of the underlying GLPI calls returns a non-success HTTP status.

Parameters:

ticket_id (int)

Return type:

GlpiTicketContext

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.

Parameters:
ticket_idint

Identifier of the ticket whose custom values are requested.

Returns:
dict[str, dict[str, Any]]

Per-container value mappings. Empty when the ticket has no stored custom values across any container.

Parameters:

ticket_id (int)

Return type:

dict[str, dict[str, Any]]

async get_ticket_followup(ticket_id, followup_id)

Fetch one ticket followup by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followup_idGlpiId

Numeric identifier of the followup to retrieve.

Returns:
GetFollowup

Validated followup payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • followup_id (int)

Return type:

GetFollowup

async get_ticket_solution(ticket_id, solution_id)

Fetch one ticket solution by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solution_idGlpiId

Numeric identifier of the solution to retrieve.

Returns:
GetSolution

Validated solution payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • solution_id (int)

Return type:

GetSolution

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_creation field and results are aggregated locally in Python. Returned identifiers are the raw GLPI numeric values that callers can resolve with the dedicated search_* helpers when human labels are needed.

Parameters:
start_datestr | None, optional

ISO YYYY-MM-DD start of the window (inclusive from 00:00:00). Defaults to end_date - default_days + 1 when omitted.

end_datestr | None, optional

ISO YYYY-MM-DD end of the window (inclusive through 23:59:59). Defaults to today.

default_daysint, optional

Span in days used when start_date is omitted (defaults to 30 and must be a positive integer).

entity_idint | None, optional

When provided, restricts results to tickets belonging to the entity with this GLPI identifier.

entity_namestr | None, optional

When provided (and entity_id is None), the name is resolved via search_entities and the matched entity IDs are used to filter tickets. If no entity matches, {"entities": {}} is returned immediately.

extra_filterstr | None, optional

Optional raw RSQL fragment to AND with the date window on the server side.

Returns:
dict[str, object]

Mapping with one entities key listing per-entity aggregates. Each entity bucket exposes total, by_status, by_priority, and by_type counters.

Raises:
GlpiValidationError

If default_days < 1, start_date / end_date is not a valid ISO date, or start_date is after end_date.

Parameters:
  • start_date (str | None)

  • end_date (str | None)

  • default_days (int)

  • entity_id (int | None)

  • entity_name (str | None)

  • extra_filter (str | None)

Return type:

dict[str, object]

async get_ticket_task(ticket_id, task_id)

Fetch one ticket task by identifier.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

task_idGlpiId

Numeric identifier of the task to retrieve.

Returns:
GetTicketTask

Validated task payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • task_id (int)

Return type:

GetTicketTask

async get_ticket_timeline_document(ticket_id, document_link_id)

Fetch one document linked to the ticket timeline by its document ID.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

document_link_idGlpiId

Numeric identifier of the linked document to retrieve.

Returns:
GetDocument

Validated document payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • document_link_id (int)

Return type:

GetDocument

async get_user(user_id)

Fetch one GLPI user by identifier.

Parameters:
user_idGlpiId

Numeric identifier of the user to retrieve.

Returns:
GetUser

Validated user payload.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

user_id (int)

Return type:

GetUser

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_idint | None, optional

Identify the user by GLPI numeric identifier.

usernamestr | None, optional

Filter by username (substring match).

realnamestr | None, optional

Filter by family name (substring match).

firstnamestr | None, optional

Filter by given name (substring match).

start_datestr | None, optional

ISO YYYY-MM-DD start of the activity window (inclusive from 00:00:00).

end_datestr | None, optional

ISO YYYY-MM-DD end of the activity window (inclusive through 23:59:59). Defaults to today.

default_daysint, optional

Span in days used when start_date is omitted (default 30).

Returns:
UserActivityResult

Mapping with one users key. Each user key maps to a UserActivityEntry with user_ids, tickets_as_technician, tickets_as_recipient, and task_durations.

Raises:
GlpiValidationError

If none of user_id, username, realname, or firstname are supplied, or if the supplied criteria match no GLPI users.

Parameters:
  • user_id (int | None)

  • username (str | None)

  • realname (str | None)

  • firstname (str | None)

  • start_date (str | None)

  • end_date (str | None)

  • default_days (int)

Return type:

UserActivityResult

glpi_api_url: str
glpi_entity: int | None
glpi_profile: int | None
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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_computers() call.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_mod:desc". Forwarded to each page request; omitted when None, leaving the server default ordering in place.

Yields:
list[GetComputer]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

Return type:

AsyncIterator[list[GetComputer]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_contract_types() call.

Yields:
list[GetContractType]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

AsyncIterator[list[GetContractType]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_contracts() call.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_begin:desc". Forwarded to each page request; omitted when None, leaving the server default ordering in place.

Yields:
list[GetContract]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

Return type:

AsyncIterator[list[GetContract]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_documents() call.

Yields:
list[GetDocument]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

AsyncIterator[list[GetDocument]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page. Entity calls bypass the GLPI-Entity header so cross-entity lookups remain possible.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every accessible entity.

batch_sizeint, optional

Number of records requested per page (default 50).

Yields:
list[GetEntity]

One page of entities per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

AsyncIterator[list[GetEntity]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_kb_articles() call.

sortstr | None, optional

sort query parameter forwarded to each page request, spelled field or field:direction (e.g. "date_mod:desc"). A space before the direction answers HTTP 400.

languagestr | None, optional

GLPI language code forwarded to each page request to select a translated view.

Yields:
list[GetKBArticle]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

  • language (str | None)

Return type:

AsyncIterator[list[GetKBArticle]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_kb_categories() call.

sortstr | None, optional

sort query parameter forwarded to each page request, spelled field or field:direction (e.g. "date_mod:desc"). A space before the direction answers HTTP 400.

languagestr | None, optional

GLPI language code forwarded to each page request to select a translated view.

Yields:
list[GetKBCategory]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • sort (str | None)

  • language (str | None)

Return type:

AsyncIterator[list[GetKBCategory]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible record.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_locations() call.

Yields:
list[GetLocation]

One page per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

Return type:

AsyncIterator[list[GetLocation]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible ticket.

batch_sizeint, optional

Number of records requested per page (default 50). Acts as the limit parameter on each underlying search_tickets() call.

sortstr | None, optional

sort query parameter forwarded to each page request, spelled field or field:direction (e.g. "date_mod:desc"). A space before the direction answers HTTP 400.

fieldstuple[str, …], optional

Restricted set of contract field names to request.

Yields:
list[GetTicket]

One page of tickets per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
Return type:

AsyncIterator[list[GetTicket]]

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 start offset after each batch. Iteration stops when the server returns fewer items than batch_size, which signals the last page.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter. Empty by default, which lists every visible user.

batch_sizeint, optional

Number of records requested per page (default 50).

skip_entitybool, optional

When True the GLPI-Entity header is omitted so the search spans every entity the caller has access to.

Yields:
list[GetUser]

One page of users per iteration. The last yielded batch may be shorter than batch_size.

Parameters:
  • rsql_filter (str)

  • batch_size (int)

  • skip_entity (bool)

Return type:

AsyncIterator[list[GetUser]]

language: str

Link one GLPI contract to one computer.

The itemtype and items_id fields are set from computer_id rather than taken from link. The GLPI contract types itemtype as 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_idGlpiId

Numeric identifier of the computer the contract covers.

linkPostContractItem

Request body naming the contract to link. Any itemtype or items_id set on it is replaced.

Returns:
int

Identifier assigned to the new link by the GLPI server.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

Link an existing GLPI document to one ticket timeline.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

document_linkPostTimelineDocument

Request body describing the link (typically the timeline position; document and ticket identifiers are inferred from the URL).

Returns:
int

Identifier assigned by the GLPI server to the new link.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

GlpiProtocolError

If the create response is missing the id field.

Parameters:
Return type:

int

async list_computer_contracts(computer_id, *, limit=50, start=0)

List the contracts linked to one GLPI computer.

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetContractItem]

Contract links belonging to the computer.

Parameters:
Return type:

list[GetContractItem]

async list_contract_costs(contract_id, *, limit=50, start=0)

List the cost lines recorded against one GLPI contract.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetContractCost]

Cost lines belonging to the contract.

Parameters:
Return type:

list[GetContractCost]

async list_item_plugin_field_rows(itemtype, items_id, container_name)

List the value rows of one container for one parent item.

Parameters:
itemtypestr

Parent itemtype (e.g. "Ticket").

items_idint

Identifier of the parent item.

container_namestr

Internal name of the container as exposed by GetPluginFieldsContainer.name.

Returns:
list[GetPluginFieldsValueRow]

Zero or one row depending on whether the plugin has already persisted any value for this item.

Parameters:
  • itemtype (str)

  • items_id (int)

  • container_name (str)

Return type:

list[GetPluginFieldsValueRow]

async list_kb_article_comments(article_id)

List every comment attached to one knowledge base article.

Parameters:

article_id (int)

Return type:

list[GetKBArticleComment]

async list_kb_article_revisions(article_id, *, language=None)

List revisions of one knowledge base article.

Parameters:
article_idGlpiId

Numeric identifier of the parent article.

languagestr | None, optional

When provided, list revisions for that GLPI language code using the language-scoped contract path.

Parameters:
  • article_id (int)

  • language (str | None)

Return type:

list[GetKBArticleRevision]

async list_plugin_fields_containers(itemtype=None)

List PluginFieldsContainer rows registered on the server.

Parameters:
itemtypestr | None, optional

When provided, only the containers attached to itemtype are returned. The filtering happens client-side because the v1 API stores itemtypes as a JSON-encoded string.

Returns:
list[GetPluginFieldsContainer]

Containers visible to the authenticated user.

Parameters:

itemtype (str | None)

Return type:

list[GetPluginFieldsContainer]

async list_plugin_fields_fields(container_id=None)

List PluginFieldsField declarations.

Parameters:
container_idint | None, optional

When provided, restricts the result to the fields declared on this container (the filtering is performed client-side because the v1 API does not consistently honour the searchText filter on this itemtype).

Returns:
list[GetPluginFieldsField]

Field declarations visible to the authenticated user.

Parameters:

container_id (int | None)

Return type:

list[GetPluginFieldsField]

async list_ticket_followups(ticket_id)

List all followups linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetFollowup]

Followups returned by the GLPI server, with the timeline envelope unwrapped where present.

Parameters:

ticket_id (int)

Return type:

list[GetFollowup]

async list_ticket_solutions(ticket_id)

List all solutions linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetSolution]

Solutions returned by the GLPI server, with the timeline envelope unwrapped where present.

Parameters:

ticket_id (int)

Return type:

list[GetSolution]

async list_ticket_tasks(ticket_id)

List all tasks linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetTicketTask]

Tasks returned by the GLPI server, with the timeline envelope unwrapped where present.

Parameters:

ticket_id (int)

Return type:

list[GetTicketTask]

async list_ticket_team_members(ticket_id)

List the team members currently linked to one ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket whose team members are listed.

Returns:
list[GetTeamMember]

Team members validated against the contract TeamMember schema.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:

ticket_id (int)

Return type:

list[GetTeamMember]

async list_ticket_timeline_documents(ticket_id)

List all documents linked to one ticket timeline.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

Returns:
list[GetDocument]

Document records returned by the GLPI server. The live API wraps each entry in a {"type": "Document_Item", "item": {...}} envelope whose item value is a full Document record; the envelope is unwrapped automatically.

Parameters:

ticket_id (int)

Return type:

list[GetDocument]

async remove_ticket_team_member(ticket_id, member)

Remove one team member from a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket the member belongs to.

memberPostTeamMember

Request body identifying the member to remove (same shape as add_ticket_team_member()).

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async search_computers(rsql_filter='', *, limit=50, start=0, sort=None)

Search GLPI computers with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_mod:desc". Omitted when None, leaving the server default ordering in place.

Returns:
list[GetComputer]

Computers matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

Return type:

list[GetComputer]

async search_contract_types(rsql_filter='', *, limit=50, start=0)

Search GLPI contract types with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetContractType]

Contract types matching the filter.

Parameters:
Return type:

list[GetContractType]

async search_contracts(rsql_filter='', *, limit=50, start=0, sort=None)

Search GLPI contracts with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

Server-side ordering expressed as "<field>:<direction>", for example "date_begin:desc". Omitted when None, leaving the server default ordering in place.

Returns:
list[GetContract]

Contracts matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

Return type:

list[GetContract]

async search_documents(rsql_filter='', *, limit=50, start=0)

Search GLPI documents with an optional raw RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL expression forwarded to the filter query parameter (for example "name=='*manual*'"). When empty the parameter is omitted and the server returns its default paginated listing.

limitint, optional

Maximum number of records to return (defaults to 50).

startint, optional

Zero-based offset for pagination (defaults to 0).

Returns:
list[GetDocument]

Documents matching the filter window.

Parameters:
Return type:

list[GetDocument]

async search_entities(rsql_filter='', *, limit=50, start=0)

Search GLPI entities with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint | None, optional

Maximum number of records returned. None lets the GLPI server use its default.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetEntity]

Entities matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int | None)

  • start (int)

Return type:

list[GetEntity]

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_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

sort query parameter, spelled field or field:direction (e.g. "date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a bare field sorts ascending, and a separate order parameter is ignored.

languagestr | None, optional

GLPI language code forwarded as the language query parameter to select a translated view.

Returns:
list[GetKBArticle]

Articles matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

  • language (str | None)

Return type:

list[GetKBArticle]

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_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

sort query parameter, spelled field or field:direction (e.g. "name:asc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a bare field sorts ascending, and a separate order parameter is ignored.

languagestr | None, optional

GLPI language code forwarded as the language query parameter to select a translated view.

Returns:
list[GetKBCategory]

Categories matching the filter.

Parameters:
  • rsql_filter (str)

  • limit (int)

  • start (int)

  • sort (str | None)

  • language (str | None)

Return type:

list[GetKBCategory]

async search_locations(rsql_filter='', *, limit=50, start=0)

Search GLPI locations with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

Returns:
list[GetLocation]

Locations matching the filter.

Parameters:
Return type:

list[GetLocation]

async search_tickets(rsql_filter='', *, limit=50, start=0, sort=None, fields=())

Search GLPI tickets with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter (for example "name==hello" or "status==2"). Empty by default, which lists every visible ticket.

limitint, optional

Maximum number of records returned by the GLPI server in one request.

startint, optional

Zero-based offset of the first record returned.

sortstr | None, optional

sort query parameter, spelled field or field:direction (e.g. "date_mod:desc"). Measured against GLPI 11: a space before the direction answers HTTP 400 (“Invalid property for sorting”), a bare field sorts ascending, and a separate order parameter is ignored.

fieldstuple[str, …], optional

Restricted set of contract field names to request. Empty tuple lets the GLPI server pick its default field set.

Returns:
list[GetTicket]

Tickets matching the filter, validated against the contract Ticket schema.

Parameters:
Return type:

list[GetTicket]

async search_users(rsql_filter='', *, limit=50, start=0, skip_entity=False)

Search GLPI users with an optional RSQL filter.

Parameters:
rsql_filterstr, optional

Raw RSQL filter forwarded as the filter query parameter, for example "username==alice". Empty by default.

limitint, optional

Maximum number of records returned by the GLPI server.

startint, optional

Zero-based offset of the first record returned.

skip_entitybool, optional

When True the GLPI-Entity header is omitted so the search spans every entity the caller has access to.

Returns:
list[GetUser]

Users matching the filter, validated against the contract User schema.

Parameters:
Return type:

list[GetUser]

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[].id is readOnly), so it silently drops category writes. This helper sets the underlying _categories field through the legacy v1 API, which requires v1_base_url/v1_user_token to be configured (pointing at the legacy apirest.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:
RuntimeError

When no legacy v1 session is configured on the client.

GlpiStatusError

When 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 GlpiValidationError before any write to keep the call atomic from the caller’s perspective.

Parameters:
ticket_idint

Identifier of the ticket whose custom values must be set.

valuesdict[str, dict[str, Any]]

Nested mapping {container_name: {field_name: value}} describing the columns to write. Container and field names must match what list_plugin_fields_containers() and list_plugin_fields_fields() return.

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_idGlpiId

Numeric identifier of the document whose binary content is requested.

chunk_sizeint, optional

Bytes requested per chunk (defaults to 64 KiB).

Yields:
bytes

Successive chunks of the document body. The final chunk may be shorter than chunk_size.

Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • document_id (int)

  • chunk_size (int)

Return type:

AsyncIterator[bytes]

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)

Remove one contract link from a GLPI computer.

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

link_idGlpiId

Numeric identifier of the contract link to remove.

forcebool | None, optional

When True the link is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • computer_id (int)

  • link_id (int)

  • force (bool | None)

Return type:

None

Unlink one timeline document from a ticket.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

document_link_idGlpiId

Numeric identifier of the timeline document link to remove.

forcebool | None, optional

When True the link is permanently deleted instead of being moved to the trash.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
  • ticket_id (int)

  • document_link_id (int)

  • force (bool | None)

Return type:

None

async update_computer(computer_id, computer)

Update one GLPI computer with a partial body.

Parameters:
computer_idGlpiId

Numeric identifier of the computer to update.

computerPatchComputer

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_computer_contract(computer_id, link_id, link)

Update one computer-contract link with a partial body.

The itemtype and items_id fields are set from computer_id rather than taken from link, for the same reason as link_computer_contract().

Parameters:
computer_idGlpiId

Numeric identifier of the owning computer.

link_idGlpiId

Numeric identifier of the contract link to update.

linkPatchContractItem

Partial request body. Any itemtype or items_id set on it is replaced.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_contract(contract_id, contract)

Update one GLPI contract with a partial body.

Parameters:
contract_idGlpiId

Numeric identifier of the contract to update.

contractPatchContract

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_contract_cost(contract_id, cost_id, cost)

Update one contract cost line with a partial body.

Parameters:
contract_idGlpiId

Numeric identifier of the owning contract.

cost_idGlpiId

Numeric identifier of the cost line to update.

costPatchContractCost

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_contract_type(contract_type_id, contract_type)

Update one GLPI contract type with a partial body.

Parameters:
contract_type_idGlpiId

Numeric identifier of the contract type to update.

contract_typePatchContractType

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_document(document_id, document)

Update one GLPI document with a partial body.

Parameters:
document_idGlpiId

Numeric identifier of the document to update.

documentPatchDocument

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_entity(entity_id, entity)

Update one GLPI entity with a partial body.

Parameters:
entity_idGlpiId

Numeric identifier of the entity to update.

entityPatchEntity

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_item_plugin_field_row(*, itemtype, container_name, row_id, values)

Update one existing plugin-fields value row.

Parameters:
itemtypestr

Parent itemtype the container is attached to.

container_namestr

Internal name of the container.

row_idint

Identifier of the existing value row (as returned by list_item_plugin_field_rows()).

valuesdict[str, object]

Field-name → value mapping for the columns to update. Only the fields supplied here are touched; the others keep their previous value.

Parameters:
Return type:

None

async update_kb_article(article_id, article)

Update one knowledge base article with a partial body.

When article.categories is 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:
Return type:

None

async update_kb_article_comment(article_id, comment_id, comment)

Update one knowledge base article comment with a partial body.

Parameters:
Return type:

None

async update_kb_category(category_id, category)

Update one knowledge base category with a partial body.

Parameters:
Return type:

None

async update_location(location_id, location)

Update one GLPI location with a partial body.

Parameters:
location_idGlpiId

Numeric identifier of the location to update.

locationPatchLocation

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_ticket(ticket_id, ticket)

Update one GLPI ticket with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the ticket to update.

ticketPatchTicket

Partial request body. Only fields explicitly set are sent.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_ticket_followup(ticket_id, followup_id, followup)

Update one ticket followup with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

followup_idGlpiId

Numeric identifier of the followup to update.

followupPatchFollowup

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_ticket_solution(ticket_id, solution_id, solution)

Update one ticket solution with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

solution_idGlpiId

Numeric identifier of the solution to update.

solutionPatchSolution

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_ticket_task(ticket_id, task_id, task)

Update one ticket task with a partial body.

Parameters:
ticket_idGlpiId

Numeric identifier of the parent ticket.

task_idGlpiId

Numeric identifier of the task to update.

taskPatchTicketTask

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
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_idGlpiId

Numeric identifier of the parent ticket.

document_link_idGlpiId

Numeric identifier of the timeline document link to update.

document_linkPatchTimelineDocument

Partial request body.

Returns:
None
Raises:
GlpiStatusError

If the GLPI server returns a non-success HTTP status.

Parameters:
Return type:

None

async update_user(user_id, user)

Update one GLPI user with a partial body.

Parameters:
user_idGlpiId

Numeric identifier of the user to update.

userPatchUser

Partial request body. Only fields explicitly set are sent.

Returns:
None
Raises:
GlpiStatusError

If 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_url and v1_user_token to be configured on the client.

Parameters:
filenamestr

Name to advertise in the multipart form. Required and must be non-empty.

contentbytes

Raw binary payload to upload.

mime_typestr, optional

MIME type advertised in the multipart part (defaults to application/octet-stream).

document_namestr | None, optional

Human-readable display name. Defaults to filename when omitted.

ticket_idint | None, optional

Identifier of one ticket to attach the uploaded document to.

entity_idint | None, optional

Identifier of one GLPI entity to scope the upload to.

Returns:
dict[str, object]

Raw JSON dictionary returned by the legacy v1 upload endpoint.

Raises:
GlpiValidationError

If filename is empty.

RuntimeError

If the v1 session is not configured on the client.

Parameters:
  • filename (str)

  • content (bytes)

  • mime_type (str)

  • document_name (str | None)

  • ticket_id (int | None)

  • entity_id (int | None)

Return type:

dict[str, object]

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: Exception

Base class for every exception raised by glpi_python_client.

exception GlpiTransportError[source]

Bases: GlpiError

The 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: GlpiTransportError

The HTTP request exceeded its timeout before GLPI responded.

A narrowing of GlpiTransportError that 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, ValueError

GLPI answered with an unexpected HTTP status code.

Parameters:
messagestr

Human-readable description of the failure.

status_codeint

The HTTP status code GLPI returned.

urlstr

The absolute URL that was requested.

response_textstr, optional

The (possibly truncated) response body, for diagnostics.

Attributes:
status_codeint

The HTTP status code GLPI returned.

urlstr

The absolute URL that was requested.

response_textstr

The (possibly truncated) response body, for diagnostics.

Parameters:
  • message (str)

  • status_code (int)

  • url (str)

  • response_text (str)

Return type:

None

response_text: str
status_code: int
url: str
exception GlpiAuthError(message, *, status_code, url, response_text='')[source]

Bases: GlpiStatusError

GLPI rejected the credentials or the caller lacks rights (401/403).

Parameters:
  • message (str)

  • status_code (int)

  • url (str)

  • response_text (str)

Return type:

None

exception GlpiNotFoundError(message, *, status_code, url, response_text='')[source]

Bases: GlpiStatusError

GLPI has no resource at the requested URL (404).

Parameters:
  • message (str)

  • status_code (int)

  • url (str)

  • response_text (str)

Return type:

None

exception GlpiServerError(message, *, status_code, url, response_text='')[source]

Bases: GlpiStatusError

GLPI failed to serve the request (5xx). Retried by the transport.

Parameters:
  • message (str)

  • status_code (int)

  • url (str)

  • response_text (str)

Return type:

None

exception GlpiValidationError[source]

Bases: GlpiError, ValueError

The caller supplied an argument or configuration the client rejects.

exception GlpiProtocolError[source]

Bases: GlpiError, ValueError

GLPI 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: GlpiError

A rich-text content value could not be converted.

Raised when GlpiContentConverter cannot 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 (markdownify inbound, markdown outbound), and a parser fault used to reach the caller as a bare builtin — most visibly a RecursionError, which except GlpiError does not catch and which a caller reading a ticket has no reason to expect from get_ticket. Deeply nested HTML is caught and answered with the body’s text instead of raising at all (see glpi_python_client.content.conversion.GlpiContentConverter.from_transport()); this is the backstop for everything else.

Unlike GlpiStatusError, GlpiValidationError and GlpiProtocolError this does not inherit ValueError. Those three do so for back-compatibility with releases that raised bare ValueError at the same sites; there was never a ValueError here to be compatible with, and a parser exhausting the interpreter’s stack is not a value the caller got wrong. The reasoning matches GlpiTransportError.

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_html

what GLPI sent, verbatim. Also accepts the wire spelling content on construction.

content

the same body as Markdown, converted on the first read and cached. GetKBArticle has description / description_html as 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, &nbsp; 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: GlpiModel

Grouped public ticket context returned by ticket-context workflows.

Parameters:
ticketGetTicket

Primary ticket record returned by the GLPI API.

taskslist[GetTicketTask], optional

Linked task records.

followupslist[GetFollowup], optional

Linked followup records.

solutionslist[GetSolution], optional

Linked solution records.

documentslist[GetDocument], optional

Linked document records.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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.

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_extra

Get extra fields set during validation.

model_fields_set

Returns 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.

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]
ticket: GetTicket
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_creation so 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:
optionsTicketMarkdownOptions, optional

Controls which sections and metadata fields are included in the output. When None (the default) a fresh TicketMarkdownOptions is used, which enables all sections and fields.

Returns:
str

Markdown transcript suitable for direct display or for forwarding into a downstream Markdown renderer. The string never ends with trailing whitespace.

Raises:
GlpiContentError

One 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:

str

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: object

Options controlling which sections and fields appear in the Markdown export.

All flags default to True so that a bare to_markdown() call reproduces the original full output.

Parameters:
include_descriptionbool

Emit the ## Description section with the ticket body.

include_followupsbool

Include followup entries in the ## Timeline section.

include_tasksbool

Include task entries in the ## Timeline section.

include_solutionsbool

Include solution entries in the ## Timeline section.

include_documentsbool

Append the ## Documents section with linked file references.

show_statusbool

Emit the Status field in the ticket subtitle line.

show_requesterbool

Emit the Requester field in the ticket subtitle line.

show_editorbool

Emit the Last edited by field 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 by field in timeline-entry subtitle lines.

show_event_editorbool

Emit the Last edited by field 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 State field in timeline-entry subtitle lines.

show_event_statusbool

Emit the Status field in timeline-entry subtitle lines.

show_durationbool

Emit the Duration field in task subtitle lines.

show_technicianbool

Emit the Technician and Technician group fields in task subtitle lines.

show_approverbool

Emit the Approver field 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)

include_description: bool = True
include_documents: bool = True
include_followups: bool = True
include_solutions: bool = True
include_tasks: bool = True
show_approver: bool = True
show_dates: bool = True
show_duration: bool = True
show_editor: bool = True
show_event_author: bool = True
show_event_dates: bool = True
show_event_editor: bool = True
show_event_state: bool = True
show_event_status: bool = True
show_requester: bool = True
show_status: bool = True
show_technician: bool = True

Common Reference Models

class IdRef(*, extra_payload=<factory>, id=None, **extra_data)[source]

Bases: GlpiModel

Foreign-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:
idint | None, optional

Native GLPI identifier of the referenced item.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

id: int | None
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: GlpiModel

Foreign-key reference carrying both id and read-only name.

GLPI returns relationships as {"id": int, "name": str} payloads on most endpoints. The name value is server-managed and is preserved here purely for read-side convenience.

Parameters:
idint | None, optional

Native GLPI identifier of the referenced item.

namestr | None, optional

Server-provided display name of the referenced item.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

id: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
class IdNameCompletenameRef(*, extra_payload=<factory>, id=None, name=None, completename=None, **extra_data)[source]

Bases: GlpiModel

Foreign-key reference carrying id, name, and completename.

A few GLPI relationships, such as Ticket.entity, surface a third completename slot that holds the dotted hierarchical name.

Parameters:
idint | None, optional

Native GLPI identifier of the referenced item.

namestr | None, optional

Server-provided display name.

completenamestr | None, optional

Server-provided fully qualified name.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

completename: str | None
id: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None

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: GlpiModel

Response shape returned by GET /Assistance/Ticket endpoints.

Mirrors components.schemas.Ticket. Fields marked readOnly in the contract are excluded from the write models.

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

namestr | None, optional

Title of the ticket.

content_htmlGlpiRawContent

Body of the ticket exactly as GLPI sent it, which is HTML (format: html). Accepts the wire spelling content too. Read content for Markdown. Defaults to None.

user_recipientIdNameRef | None, optional

Reference to the user designated as the ticket recipient (no contract description).

user_editorIdNameRef | None, optional

Reference to the user who last edited the ticket.

is_deletedbool | None, optional

Whether the ticket has been moved to the trash.

categoryIdNameRef | None, optional

Reference to the ITIL category of the ticket.

locationIdNameRef | None, optional

Reference to the location associated with the ticket.

urgencyGlpiPriority | None, optional

Urgency level (contract enumeration: 1 Very Low, 2 Low, 3 Medium, 4 High, 5 Very High).

impactGlpiPriority | None, optional

Impact level (contract enumeration: 1 Very Low, 2 Low, 3 Medium, 4 High, 5 Very High).

priorityGlpiPriority | None, optional

Computed or manually overridden priority (contract enumeration: 1 Very Low, 2 Low, 3 Medium, 4 High, 5 Very High).

actiontimeint | None, optional

Total action time in seconds (readOnly).

begin_waiting_datedatetime | None, optional

Timestamp at which the ticket entered the pending state (readOnly).

waiting_durationint | None, optional

Total waiting duration in seconds (contract field waiting_duration — Total waiting duration in seconds, readOnly).

resolution_durationint | None, optional

Total resolution duration in seconds (contract field resolution_duration — Total resolution duration in seconds, readOnly).

close_durationint | None, optional

Total close duration in seconds (contract field close_duration — Total close duration in seconds, readOnly).

resolution_datedatetime | None, optional

Timestamp at which the ticket was resolved (readOnly).

date_creationdatetime | None, optional

Creation timestamp of the ticket record.

date_moddatetime | None, optional

Last modification timestamp of the ticket record.

datedatetime | None, optional

Opening date of the ticket.

date_solvedatetime | None, optional

Date the ticket was marked as solved.

date_closedatetime | None, optional

Date the ticket was closed.

typeGlpiTicketType | None, optional

Ticket category (contract field type — The type of the ticket; enumeration: 1 Incident, 2 Request).

external_idstr | None, optional

Identifier assigned by an external system.

request_typeIdNameRef | None, optional

Reference to the request type or channel.

take_into_account_datedatetime | None, optional

Timestamp at which a technician first acknowledged the ticket (readOnly).

take_into_account_durationint | None, optional

Total take-into-account duration in seconds (contract field take_into_account_duration — Total take into account duration in seconds, readOnly).

sla_ttrIdNameRef | None, optional

SLA applied for time-to-resolve.

sla_ttoIdNameRef | None, optional

SLA applied for time-to-own.

ola_ttrIdNameRef | None, optional

OLA applied for time-to-resolve.

ola_ttoIdNameRef | None, optional

OLA applied for time-to-own.

sla_level_ttrIdNameRef | None, optional

SLA level escalation step for time-to-resolve.

ola_level_ttrIdNameRef | None, optional

OLA level escalation step for time-to-resolve.

sla_waiting_durationint | None, optional

Total SLA waiting duration in seconds (contract field sla_waiting_duration — Total SLA waiting duration in seconds, readOnly).

ola_waiting_durationint | None, optional

Total OLA waiting duration in seconds (contract field ola_waiting_duration — Total OLA waiting duration in seconds, readOnly).

ola_ttr_begin_datedatetime | None, optional

Timestamp at which the OLA TTR clock started (readOnly).

ola_tto_begin_datedatetime | None, optional

Timestamp at which the OLA TTO clock started (readOnly).

internal_resolution_datedatetime | None, optional

Internal resolution date used for OLA computations (readOnly; no contract description).

internal_take_into_account_datedatetime | None, optional

Internal take-into-account date used for OLA computations (readOnly).

global_validationGlpiGlobalValidation | None, optional

Aggregated validation status of the ticket (contract field global_validation — The global status of the validation; enumeration: 1 None, 2 Waiting, 3 Accepted, 4 Refused).

statusIdNameRef | None, optional

Current ticket status as an id/name reference.

entityIdNameCompletenameRef | None, optional

Reference to the GLPI entity that owns the ticket.

teamlist[_TicketTeamMember] | None, optional

Inline list of actors assigned to the ticket.

Attributes:
content

The ticket body as Markdown, or None if GLPI sent none.

Converted from content_html on the first read and cached, so listing tickets costs nothing per body and a body that cannot be converted affects only this record. content_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns 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:
content

The ticket body as Markdown, or None if GLPI sent none.

Converted from content_html on the first read and cached, so listing tickets costs nothing per body and a body that cannot be converted affects only this record. content_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns 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

actiontime: int | None
begin_waiting_date: datetime | None
category: IdNameRef | None
close_duration: int | None
property content: str | None

The ticket body as Markdown, or None if GLPI sent none.

Converted from content_html on the first read and cached, so listing tickets costs nothing per body and a body that cannot be converted affects only this record. content_html holds the HTML exactly as it arrived.

content_html: GlpiRawContent
date: datetime | None
date_close: datetime | None
date_creation: datetime | None
date_mod: datetime | None
date_solve: datetime | None
entity: IdNameCompletenameRef | None
external_id: str | None
global_validation: GlpiGlobalValidation | None
id: int | None
impact: GlpiPriority | None
internal_resolution_date: datetime | None
internal_take_into_account_date: datetime | None
is_deleted: bool | None
location: IdNameRef | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
ola_level_ttr: IdNameRef | None
ola_tto: IdNameRef | None
ola_tto_begin_date: datetime | None
ola_ttr: IdNameRef | None
ola_ttr_begin_date: datetime | None
ola_waiting_duration: int | None
priority: GlpiPriority | None
request_type: IdNameRef | None
resolution_date: datetime | None
resolution_duration: int | None
sla_level_ttr: IdNameRef | None
sla_tto: IdNameRef | None
sla_ttr: IdNameRef | None
sla_waiting_duration: int | None
status: IdNameRef | None
take_into_account_date: datetime | None
take_into_account_duration: int | None
team: list[_TicketTeamMember] | None
type: GlpiTicketType | None
urgency: GlpiPriority | None
user_editor: IdNameRef | None
user_recipient: IdNameRef | None
waiting_duration: int | 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: GlpiModel

Request body for POST /Assistance/Ticket.

Read-only contract fields are excluded, and so is status – not because the contract marks it readOnly (it does, and it is wrong about that: see PatchTicket) but because GLPI 11 ignores the field on create. Measured on a live instance: posting {"status": 4} answers 201 and the new ticket reads back as New. Declaring it here would publish a create argument that does nothing.

Parameters:
namestr | None, optional

Title of the ticket.

contentGlpiMarkdownContent

Body of the ticket; Markdown is converted to HTML on serialisation (format: html). Defaults to None.

is_deletedbool | None, optional

Whether to create the ticket in the trashed state.

categoryIdNameRef | None, optional

Reference to the ITIL category of the ticket.

locationIdNameRef | None, optional

Reference to the location associated with the ticket.

urgencyGlpiPriority | None, optional

Urgency level (contract enumeration: 1 Very Low, 2 Low, 3 Medium, 4 High, 5 Very High).

impactGlpiPriority | None, optional

Impact level (contract enumeration: 1 Very Low, 2 Low, 3 Medium, 4 High, 5 Very High).

priorityGlpiPriority | None, optional

Priority override (contract enumeration: 1 Very Low, 2 Low, 3 Medium, 4 High, 5 Very High).

date_creationdatetime | None, optional

Creation timestamp to set on the ticket record.

date_moddatetime | None, optional

Modification timestamp to set on the ticket record.

datedatetime | None, optional

Opening date to assign to the ticket.

date_solvedatetime | None, optional

Date to set as the solved timestamp.

date_closedatetime | None, optional

Date to set as the closed timestamp.

typeGlpiTicketType | None, optional

Ticket category (contract field type — The type of the ticket; enumeration: 1 Incident, 2 Request).

external_idstr | None, optional

Identifier assigned by an external system.

request_typeIdNameRef | None, optional

Reference to the request type or channel.

sla_ttrIdNameRef | None, optional

SLA to apply for time-to-resolve.

sla_ttoIdNameRef | None, optional

SLA to apply for time-to-own.

ola_ttrIdNameRef | None, optional

OLA to apply for time-to-resolve.

ola_ttoIdNameRef | None, optional

OLA to apply for time-to-own.

sla_level_ttrIdNameRef | None, optional

SLA level escalation step for time-to-resolve.

ola_level_ttrIdNameRef | None, optional

OLA level escalation step for time-to-resolve.

global_validationGlpiGlobalValidation | None, optional

Aggregated validation status to set on the ticket (contract field global_validation — The global status of the validation; enumeration: 1 None, 2 Waiting, 3 Accepted, 4 Refused).

entityIdNameCompletenameRef | None, optional

Reference to the GLPI entity that owns the ticket.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

category: IdNameRef | None
content: GlpiMarkdownContent
date: datetime | None
date_close: datetime | None
date_creation: datetime | None
date_mod: datetime | None
date_solve: datetime | None
entity: IdNameCompletenameRef | None
external_id: str | None
global_validation: GlpiGlobalValidation | None
impact: GlpiPriority | None
is_deleted: bool | None
location: IdNameRef | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
ola_level_ttr: IdNameRef | None
ola_tto: IdNameRef | None
ola_ttr: IdNameRef | None
priority: GlpiPriority | None
request_type: IdNameRef | None
sla_level_ttr: IdNameRef | None
sla_tto: IdNameRef | None
sla_ttr: IdNameRef | 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: PostTicket

Request body for PATCH /Assistance/Ticket/{id}.

Every PostTicket field applies here too. status is the one field this model adds, and the reason the two are no longer interchangeable: GLPI honours a status write on PATCH and drops it on POST.

The contract disagrees, and it is worth knowing why the package used to as well. GLPI publishes Ticket.status.id as readOnly: 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, PATCH with {"status": 5} returns 200 and the ticket really does move – the published contract is simply wrong here, the same way it omits the Major level from priority (see GlpiPriority).

status is typed as the enum rather than a bare int because GLPI validates nothing on this field and its interface hides the damage. Writing 99 answers 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 as 55 for 5 therefore loses a ticket silently, and this enum is the only thing on the path that can catch it.

Parameters:
statusGlpiTicketStatus | None, optional

Lifecycle status to move the ticket to (1 New, 2 Assigned, 3 Planned, 4 Pending, 5 Solved, 6 Closed, 10 Validation). Serialises to the bare integer form, which is the spelling measured as honoured; the nested {"id": ...} form works too, but status_id does not.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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].

status: GlpiTicketStatus | None
class DeleteTicket(*, extra_payload=<factory>, force=None, **extra_data)[source]

Bases: GlpiModel

Query parameters for DELETE /Assistance/Ticket/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the ticket instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the ticket can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on ticket timeline followup endpoints.

Mirrors components.schemas.Followup. Most fields carry no description in the contract; content (format: html) and timeline_position are notable exceptions.

Parameters:
idint | None, optional

Native GLPI identifier of the followup (readOnly).

itemtypestr | None, optional

GLPI item type the followup belongs to, typically "Ticket".

items_idint | None, optional

Identifier of the parent GLPI item.

content_htmlGlpiRawContent

Body of the followup exactly as GLPI sent it, which is HTML (format: html). Accepts the wire spelling content too. Read content for Markdown. Defaults to None.

is_privatebool | None, optional

Whether the followup is visible only to technicians.

userIdNameRef | None, optional

Reference to the author of the followup.

user_editorIdNameRef | None, optional

Reference to the user who last edited the followup.

request_typeIdNameRef | None, optional

Reference to the request type or channel of the followup (no contract description).

datedatetime | None, optional

Date the followup was written.

date_creationdatetime | None, optional

Creation timestamp of the followup record.

date_moddatetime | None, optional

Last modification timestamp of the followup record.

timeline_positionGlpiTimelinePosition | None, optional

Horizontal position of the followup in the GLPI ticket timeline widget (contract field timeline_position — The position in the timeline; enumeration: 0 No timeline, 1 Not set, 2 Left, 3 Mid left, 4 Mid right, 5 Right).

source_item_idint | None, optional

Identifier of the source item that generated this followup, if any.

source_of_item_idint | None, optional

Identifier of the item for which this followup is a source (no contract description).

Attributes:
content

The followup body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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 None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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 None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

content_html: GlpiRawContent
date: datetime | None
date_creation: datetime | None
date_mod: datetime | None
id: int | None
is_private: bool | None
items_id: int | None
itemtype: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

request_type: IdNameRef | None
source_item_id: int | None
source_of_item_id: int | None
timeline_position: GlpiTimelinePosition | None
user: IdNameRef | None
user_editor: IdNameRef | 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: GlpiModel

Request body for POST on ticket timeline followup endpoints.

Read-only contract field (id) is excluded. All other fields from components.schemas.Followup are writable.

Parameters:
itemtypestr | None, optional

GLPI item type the followup belongs to, typically "Ticket".

items_idint | None, optional

Identifier of the parent GLPI item.

contentGlpiMarkdownContent

Body of the followup; Markdown is converted to HTML on serialisation (format: html). Defaults to None.

is_privatebool | None, optional

Whether the followup is visible only to technicians.

userIdNameRef | None, optional

Reference to the author of the followup.

user_editorIdNameRef | None, optional

Reference to the user who last edited the followup.

request_typeIdNameRef | None, optional

Reference to the request type or channel of the followup (no contract description).

datedatetime | None, optional

Date to assign to the followup.

date_creationdatetime | None, optional

Creation timestamp to set on the followup record.

date_moddatetime | None, optional

Last modification timestamp to set on the followup record (no contract description).

timeline_positionGlpiTimelinePosition | None, optional

Horizontal position of the followup in the GLPI ticket timeline widget (contract field timeline_position — The position in the timeline; enumeration: 0 No timeline, 1 Not set, 2 Left, 3 Mid left, 4 Mid right, 5 Right).

source_item_idint | None, optional

Identifier of the source item that generated this followup, if any.

source_of_item_idint | None, optional

Identifier of the item for which this followup is a source (no contract description).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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
date: datetime | None
date_creation: datetime | None
date_mod: datetime | None
is_private: bool | None
items_id: int | None
itemtype: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

request_type: IdNameRef | None
source_item_id: int | None
source_of_item_id: int | None
timeline_position: GlpiTimelinePosition | None
user: IdNameRef | None
user_editor: IdNameRef | 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: PostFollowup

Request body for PATCH on ticket timeline followup endpoints.

Inherits all fields from PostFollowup.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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: GlpiModel

Query parameters for DELETE on ticket timeline followup endpoints.

Parameters:
forcebool | None, optional

When True, permanently delete the followup instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the followup can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on ticket timeline task endpoints.

Mirrors components.schemas.TicketTask. Several fields carry description values in the contract; others are documented by field name and type.

Parameters:
idint | None, optional

Native GLPI identifier of the task (readOnly).

uuidstr | None, optional

Server-generated universally unique identifier matching the pattern /^[0-9a-f]{8}-...-4...-[89ab]...-...$/i (readOnly).

content_htmlGlpiRawContent

Body of the task exactly as GLPI sent it, which is HTML (format: html). Accepts the wire spelling content too. Read content for Markdown. Defaults to None.

is_privatebool | None, optional

Whether the task is visible only to technicians.

userIdNameRef | None, optional

Reference to the author of the task.

user_editorIdNameRef | None, optional

Reference to the user who last edited the task.

user_techIdNameRef | None, optional

Reference to the technician assigned to perform the task (no contract description).

group_techIdNameRef | None, optional

Reference to the group assigned to perform the task.

datedatetime | None, optional

Date the task was created.

date_creationdatetime | None, optional

Creation timestamp of the task record.

date_moddatetime | None, optional

Last modification timestamp of the task record.

durationint | None, optional

Time spent on the task in seconds.

planned_begindatetime | None, optional

Planned start date and time for the task.

planned_enddatetime | None, optional

Planned end date and time for the task.

stateGlpiTaskState | None, optional

Completion state of the task (contract field state — The state of the task; enumeration: 0 Information, 1 To do, 2 Done).

categoryIdNameRef | None, optional

Reference to the task category.

timeline_positionGlpiTimelinePosition | None, optional

Horizontal position of the task in the GLPI ticket timeline widget (contract field timeline_position — The position in the timeline; enumeration: 0 No timeline, 1 Not set, 2 Left, 3 Mid left, 4 Mid right, 5 Right).

tickets_idint | None, optional

Identifier of the parent ticket.

source_item_idint | None, optional

Identifier of the source item that generated this task, if any.

source_of_item_idint | None, optional

Identifier of the item for which this task is a source (no contract description).

Attributes:
content

The task body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns 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:
content

The task body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns 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

category: IdNameRef | None
property content: str | None

The task body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

content_html: GlpiRawContent
date: datetime | None
date_creation: datetime | None
date_mod: datetime | None
duration: int | None
group_tech: IdNameRef | None
id: int | None
is_private: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

planned_begin: datetime | None
planned_end: datetime | None
source_item_id: int | None
source_of_item_id: int | None
state: GlpiTaskState | None
tickets_id: int | None
timeline_position: GlpiTimelinePosition | None
user: IdNameRef | None
user_editor: IdNameRef | None
user_tech: IdNameRef | None
uuid: str | 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: GlpiModel

Request body for POST on ticket timeline task endpoints.

Read-only contract fields (id, uuid) are excluded.

Parameters:
contentGlpiMarkdownContent

Body of the task; Markdown is converted to HTML on serialisation (format: html). Defaults to None.

is_privatebool | None, optional

Whether the task is visible only to technicians.

userIdNameRef | None, optional

Reference to the author of the task.

user_editorIdNameRef | None, optional

Reference to the user who last edited the task.

user_techIdNameRef | None, optional

Reference to the technician assigned to perform the task (no contract description).

group_techIdNameRef | None, optional

Reference to the group assigned to perform the task.

datedatetime | None, optional

Date to assign to the task.

date_creationdatetime | None, optional

Creation timestamp to set on the task record.

date_moddatetime | None, optional

Last modification timestamp to set on the task record (no contract description).

durationint | None, optional

Time spent on the task in seconds.

planned_begindatetime | None, optional

Planned start date and time for the task.

planned_enddatetime | None, optional

Planned end date and time for the task.

stateGlpiTaskState | None, optional

Completion state of the task (contract field state — The state of the task; enumeration: 0 Information, 1 To do, 2 Done).

categoryIdNameRef | None, optional

Reference to the task category.

timeline_positionGlpiTimelinePosition | None, optional

Horizontal position of the task in the GLPI ticket timeline widget (contract field timeline_position — The position in the timeline; enumeration: 0 No timeline, 1 Not set, 2 Left, 3 Mid left, 4 Mid right, 5 Right).

tickets_idint | None, optional

Identifier of the parent ticket.

source_item_idint | None, optional

Identifier of the source item that generated this task, if any.

source_of_item_idint | None, optional

Identifier of the item for which this task is a source (no contract description).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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

category: IdNameRef | None
content: GlpiMarkdownContent
date: datetime | None
date_creation: datetime | None
date_mod: datetime | None
duration: int | None
group_tech: IdNameRef | None
is_private: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

planned_begin: datetime | None
planned_end: datetime | None
source_item_id: int | None
source_of_item_id: int | None
state: GlpiTaskState | None
tickets_id: int | None
timeline_position: GlpiTimelinePosition | None
user: IdNameRef | None
user_editor: IdNameRef | None
user_tech: IdNameRef | 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: PostTicketTask

Request body for PATCH on ticket timeline task endpoints.

Inherits all fields from PostTicketTask.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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: GlpiModel

Query parameters for DELETE on ticket timeline task endpoints.

Parameters:
forcebool | None, optional

When True, permanently delete the task instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the task can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on ticket timeline solution endpoints.

Mirrors components.schemas.Solution. Most fields carry no description in the contract; status is a notable exception.

Parameters:
idint | None, optional

Native GLPI identifier of the solution (readOnly).

itemtypestr | None, optional

GLPI item type the solution belongs to, typically "Ticket".

items_idint | None, optional

Identifier of the parent GLPI item.

typeIdNameRef | None, optional

Reference to the solution type.

content_htmlGlpiRawContent

Body of the solution exactly as GLPI sent it, which is HTML (format: html). Accepts the wire spelling content too. Read content for Markdown. Defaults to None.

userIdNameRef | None, optional

Reference to the author of the solution.

user_editorIdNameRef | None, optional

Reference to the user who last edited the solution.

approverIdNameRef | None, optional

Reference to the user who approved or rejected the solution (no contract description).

statusGlpiSolutionStatus | None, optional

Approval state of the solution (contract field status — The status of the solution; enumeration: 1 None, 2 Waiting, 3 Accepted, 4 Refused).

approval_followupIdNameRef | None, optional

Reference to the followup generated when the solution was approved or rejected.

date_creationdatetime | None, optional

Creation timestamp of the solution record.

date_moddatetime | None, optional

Last modification timestamp of the solution record.

date_approvaldatetime | None, optional

Timestamp at which the solution was approved or rejected (no contract description).

Attributes:
content

The solution body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns 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:
content

The solution body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns 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

approval_followup: IdNameRef | None
approver: IdNameRef | None
property content: str | None

The solution body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

content_html: GlpiRawContent
date_approval: datetime | None
date_creation: datetime | None
date_mod: datetime | None
id: int | None
items_id: int | None
itemtype: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: GlpiSolutionStatus | None
type: IdNameRef | None
user: IdNameRef | None
user_editor: IdNameRef | 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: GlpiModel

Request body for POST on ticket timeline solution endpoints.

Read-only contract field (id) is excluded.

Parameters:
itemtypestr | None, optional

GLPI item type the solution belongs to, typically "Ticket".

items_idint | None, optional

Identifier of the parent GLPI item.

typeIdNameRef | None, optional

Reference to the solution type.

contentGlpiMarkdownContent

Body of the solution; Markdown is converted to HTML on serialisation (format: html). Defaults to None.

userIdNameRef | None, optional

Reference to the author of the solution.

user_editorIdNameRef | None, optional

Reference to the user who last edited the solution.

approverIdNameRef | None, optional

Reference to the user who approved or rejected the solution (no contract description).

statusGlpiSolutionStatus | None, optional

Approval state of the solution (contract field status — The status of the solution; enumeration: 1 None, 2 Waiting, 3 Accepted, 4 Refused).

approval_followupIdNameRef | None, optional

Reference to the followup generated when the solution was approved or rejected.

date_creationdatetime | None, optional

Creation timestamp to set on the solution record.

date_moddatetime | None, optional

Last modification timestamp to set on the solution record (no contract description).

date_approvaldatetime | None, optional

Timestamp at which the solution was approved or rejected (no contract description).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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

approval_followup: IdNameRef | None
approver: IdNameRef | None
content: GlpiMarkdownContent
date_approval: datetime | None
date_creation: datetime | None
date_mod: datetime | None
items_id: int | None
itemtype: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: GlpiSolutionStatus | None
type: IdNameRef | None
user: IdNameRef | None
user_editor: IdNameRef | 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: PostSolution

Request body for PATCH on ticket timeline solution endpoints.

Inherits all fields from PostSolution.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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: GlpiModel

Query parameters for DELETE on ticket timeline solution endpoints.

Parameters:
forcebool | None, optional

When True, permanently delete the solution instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the solution can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on ticket timeline document endpoints.

Mirrors components.schemas.Document_Item. Most fields are marked readOnly in the contract and are never accepted on write requests. Only timeline_position is writable.

Parameters:
idint | None, optional

Native GLPI identifier of the document-item link (readOnly).

itemtypestr | None, optional

GLPI item type the document is attached to (readOnly).

items_idint | None, optional

Identifier of the parent GLPI item (readOnly).

documents_idint | None, optional

Identifier of the referenced Document record (readOnly; no contract description).

filepathstr | None, optional

Server-managed storage path of the linked file (readOnly; no contract description).

timeline_positionGlpiTimelinePosition | None, optional

Horizontal position of the document in the GLPI ticket timeline widget (contract field timeline_position — The position in the timeline; enumeration: 0 No timeline, 1 Not set, 2 Left, 3 Mid left, 4 Mid right, 5 Right).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

documents_id: int | None
filepath: str | None
id: int | None
items_id: int | None
itemtype: str | None
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: GlpiModel

Request body for POST on ticket timeline document endpoints.

All read-only contract fields (id, itemtype, items_id, documents_id, filepath) are excluded; only the writable timeline_position field is exposed.

Parameters:
timeline_positionGlpiTimelinePosition | None, optional

Horizontal position of the document in the GLPI ticket timeline widget (contract field timeline_position — The position in the timeline; enumeration: 0 No timeline, 1 Not set, 2 Left, 3 Mid left, 4 Mid right, 5 Right).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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 PatchTimelineDocument(*, extra_payload=<factory>, timeline_position=None, **extra_data)[source]

Bases: PostTimelineDocument

Request body for PATCH on ticket timeline document endpoints.

Inherits the single writable field (timeline_position) from PostTimelineDocument.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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 DeleteTimelineDocument(*, extra_payload=<factory>, force=None, **extra_data)[source]

Bases: GlpiModel

Query parameters for DELETE on ticket timeline document endpoints.

Parameters:
forcebool | None, optional

When True, permanently delete the document-item link instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the link can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on ticket team-member endpoints.

Mirrors components.schemas.TeamMember. No field carries a description in the OpenAPI contract; the parameters below are documented by field name and context.

Parameters:
idint | None, optional

Native GLPI identifier of the team-member link (readOnly).

namestr | None, optional

Display name of the actor (typically the user or group name).

typestr | None, optional

GLPI actor type, such as "User" or "Group".

rolestr | None, optional

Ticket role assigned to the actor, such as "Requester", "Observer" or "Assigned to".

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

id: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
role: str | None
type: str | None
class PostTeamMember(*, extra_payload=<factory>, id=None, type=None, role=None, **extra_data)[source]

Bases: GlpiModel

Request body for POST on ticket team-member endpoints.

The contract marks id as readOnly on the schema definition, but the live GLPI server still requires the target actor’s id to identify the team member, so the field is exposed here. No field carries a description in the OpenAPI contract.

Parameters:
idint | None, optional

GLPI identifier of the actor to add (user or group id).

typestr | None, optional

GLPI actor type, such as "User" or "Group".

rolestr | None, optional

Ticket role to assign to the actor, such as "Requester", "Observer" or "Assigned to".

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

id: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

role: str | None
type: str | None
class PatchTeamMember(*, extra_payload=<factory>, id=None, type=None, role=None, **extra_data)[source]

Bases: PostTeamMember

Request body for PATCH on ticket team-member endpoints.

Inherits all fields from PostTeamMember.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Placeholder body for DELETE on 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_schema package.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Response shape returned by GET /Management/Document endpoints.

Mirrors components.schemas.Document. No field carries a description in the OpenAPI contract. The filepath field is server-managed (readOnly).

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

namestr | None, optional

Display name of the document.

commentstr | None, optional

Free-form comment associated with the document.

entityIdNameRef | None, optional

Reference to the owning GLPI entity.

date_creationdatetime | None, optional

Creation timestamp of the document record (format: date-time).

date_moddatetime | 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.

filenamestr | None, optional

Original file name of the uploaded file.

filepathstr | None, optional

Server-managed storage path of the file (readOnly).

mimestr | None, optional

MIME type of the uploaded file.

sha1sumstr | None, optional

SHA-1 checksum of the stored file, used for deduplication.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameRef | None
filename: str | None
filepath: str | None
id: int | None
is_deleted: bool | None
mime: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
sha1sum: str | None
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: GlpiModel

Request body for POST /Management/Document.

Read-only contract fields (id, filepath) are intentionally excluded because the server rejects them on input.

Parameters:
namestr | None, optional

Display name of the document.

commentstr | None, optional

Free-form comment associated with the document.

entityIdNameRef | None, optional

Reference to the owning GLPI entity.

date_creationdatetime | None, optional

Creation timestamp to set on the document record (format: date-time).

date_moddatetime | 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.

filenamestr | None, optional

Original file name of the uploaded file.

mimestr | None, optional

MIME type of the uploaded file.

sha1sumstr | None, optional

SHA-1 checksum of the stored file, used for deduplication.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameRef | None
filename: str | None
is_deleted: bool | None
mime: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
sha1sum: str | None
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: PostDocument

Request body for PATCH /Management/Document/{id}.

The contract uses the same Document schema for create and partial-update bodies; PatchDocument is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Query parameters for DELETE /Management/Document/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the document instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the document can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET /Administration/User endpoints.

Mirrors components.schemas.User (GLPI description: Utilisateur). All fields are optional because the contract does not advertise a required array; absent or null values from the server are surfaced as None. Credential fields are marked writeOnly in the contract and are therefore never returned by GET endpoints, so they are absent from this model.

Parameters:
idint | None, optional

Native GLPI identifier (contract field id — ID, readOnly).

usernamestr | None, optional

Login name of the user (contract field username — Username).

realnamestr | None, optional

Family name (contract field realname — Real name).

firstnamestr | None, optional

Given name (contract field firstname — First name).

phonestr | None, optional

Primary phone number (contract field phone — Phone number).

phone2str | None, optional

Secondary phone number (contract field phone2 — Phone number 2).

mobilestr | None, optional

Mobile phone number (contract field mobile — Mobile phone number).

emailslist[_EmailAddress] | None, optional

Collection of e-mail addresses attached to the user (contract field emails — Email addresses).

commentstr | 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).

picturestr | None, optional

Path or identifier of the avatar picture (contract field picture, readOnly).

date_password_changedatetime | None, optional

Timestamp of the last password change (contract field date_password_change — Date of last password change, readOnly).

locationIdNameRef | None, optional

Reference to the user’s default location (contract field location — embedded Location object).

authtypeGlpiUserAuthType | None, optional

Authentication backend used for this account (contract field authtype). Numeric enumeration: 1 GLPI database, 2 Email, 3 LDAP, 4 External, 5 CAS, 6 X.509 Certificate.

last_logindatetime | None, optional

Timestamp of the user’s last successful login (contract field last_login).

default_profileIdNameRef | None, optional

Default profile assumed by the user at login (contract field default_profile — Default profile).

default_entityIdNameRef | None, optional

Default entity scope assumed by the user at login (contract field default_entity — Default entity).

date_creationdatetime | None, optional

Creation timestamp of the user record (contract field date_creation).

date_moddatetime | None, optional

Last modification timestamp of the user record (contract field date_mod).

date_syncdatetime | None, optional

Last synchronisation timestamp with the external directory (contract field date_sync, readOnly).

titleIdNameRef | None, optional

Reference to the user’s UserTitle (contract field title; no contract description).

categoryIdNameRef | None, optional

Reference to the user’s UserCategory (contract field category).

registration_numberstr | None, optional

Free-form registration/employee number (contract field registration_number).

begin_datedatetime | None, optional

Beginning of the validity window for the account (contract field begin_date — Valid since).

end_datedatetime | None, optional

End of the validity window for the account (contract field end_date — Valid until).

nicknamestr | None, optional

Display nickname for the user (contract field nickname, maxLength=50).

substitution_start_datedatetime | None, optional

Start of the period during which this user is acting as a substitute (contract field substitution_start_date).

substitution_end_datedatetime | None, optional

End of the period during which this user is acting as a substitute (contract field substitution_end_date).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

authtype: GlpiUserAuthType | None
begin_date: datetime | None
category: IdNameRef | None
comment: str | None
date_creation: datetime | None
date_mod: datetime | None
date_password_change: datetime | None
date_sync: datetime | None
default_entity: IdNameRef | None
default_profile: IdNameRef | None
emails: list[_EmailAddress] | None
end_date: datetime | None
firstname: str | None
id: int | None
is_active: bool | None
is_deleted: bool | None
last_login: datetime | None
location: IdNameRef | None
mobile: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

nickname: str | None
phone: str | None
phone2: str | None
picture: str | None
realname: str | None
registration_number: str | None
substitution_end_date: datetime | None
substitution_start_date: datetime | None
title: IdNameRef | None
username: str | None
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: GlpiModel

Request body for POST /Administration/User.

Mirrors components.schemas.User for 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 marks password and password2 as writeOnly: they are accepted on create/update but never returned by GET endpoints.

The two credential fields are typed as pydantic.SecretStr so that the cleartext values do not leak through repr, log records, structured tracebacks or interactive debuggers. Their serializer unmasks the value via SecretStr.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:
usernamestr | None, optional

Login name of the user (contract field username — Username).

realnamestr | None, optional

Family name (contract field realname — Real name).

firstnamestr | None, optional

Given name (contract field firstname — First name).

phonestr | None, optional

Primary phone number (contract field phone — Phone number).

phone2str | None, optional

Secondary phone number (contract field phone2 — Phone number 2).

mobilestr | None, optional

Mobile phone number (contract field mobile — Mobile phone number).

emailslist[_EmailAddress] | None, optional

Collection of e-mail addresses attached to the user (contract field emails — Email addresses).

commentstr | 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).

passwordSecretStr | None, optional

Cleartext password to assign to the account (contract field password — Password, format=password, writeOnly). Wrapped in SecretStr; the value is unmasked only when the request body is serialised.

password2SecretStr | None, optional

Confirmation of password; the GLPI server validates that both fields match before persisting the account (contract field password2 — Password confirmation, format=password, writeOnly). Wrapped in SecretStr; unmasked only on serialisation.

locationIdNameRef | None, optional

Reference to the user’s default location (contract field location — embedded Location object).

authtypeGlpiUserAuthType | None, optional

Authentication backend used for this account (contract field authtype). Numeric enumeration: 1 GLPI database, 2 Email, 3 LDAP, 4 External, 5 CAS, 6 X.509 Certificate.

last_logindatetime | None, optional

Timestamp of the user’s last successful login (contract field last_login).

default_profileIdNameRef | None, optional

Default profile assumed by the user at login (contract field default_profile — Default profile).

default_entityIdNameRef | None, optional

Default entity scope assumed by the user at login (contract field default_entity — Default entity).

date_creationdatetime | None, optional

Creation timestamp to override on the user record (contract field date_creation).

date_moddatetime | None, optional

Last modification timestamp to override on the user record (contract field date_mod).

titleIdNameRef | None, optional

Reference to the user’s UserTitle (contract field title; no contract description).

categoryIdNameRef | None, optional

Reference to the user’s UserCategory (contract field category).

registration_numberstr | None, optional

Free-form registration/employee number (contract field registration_number).

begin_datedatetime | None, optional

Beginning of the validity window for the account (contract field begin_date — Valid since).

end_datedatetime | None, optional

End of the validity window for the account (contract field end_date — Valid until).

nicknamestr | None, optional

Display nickname for the user (contract field nickname, maxLength=50).

substitution_start_datedatetime | None, optional

Start of the period during which this user is acting as a substitute (contract field substitution_start_date).

substitution_end_datedatetime | None, optional

End of the period during which this user is acting as a substitute (contract field substitution_end_date).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

authtype: GlpiUserAuthType | None
begin_date: datetime | None
category: IdNameRef | None
comment: str | None
date_creation: datetime | None
date_mod: datetime | None
default_entity: IdNameRef | None
default_profile: IdNameRef | None
emails: list[_EmailAddress] | None
end_date: datetime | None
firstname: str | None
is_active: bool | None
is_deleted: bool | None
last_login: datetime | None
location: IdNameRef | None
mobile: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

nickname: str | None
password: SecretStr | None
password2: SecretStr | None
phone: str | None
phone2: str | None
realname: str | None
registration_number: str | None
substitution_end_date: datetime | None
substitution_start_date: datetime | None
title: IdNameRef | None
username: str | None
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: PostUser

Request body for PATCH /Administration/User/{id}.

The contract uses the same User schema for create and partial-update bodies; PatchUser is kept distinct so client mixins can express the intent of the operation explicitly. All fields, including the SecretStr-wrapped password / password2 pair inherited from PostUser, behave exactly as on create.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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 DeleteUser(*, extra_payload=<factory>, force=None, **extra_data)[source]

Bases: GlpiModel

Query parameters for DELETE /Administration/User/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the user instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the user can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET /Dropdowns/Location endpoints.

Mirrors components.schemas.Location. No field carries a description in the OpenAPI contract; the parameter notes below reflect the field names, types and readOnly flags as advertised.

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

namestr | None, optional

Short display name of the location.

completenamestr | None, optional

Full hierarchical path of the location in dotted notation (readOnly).

codestr | None, optional

Short alphanumeric code assigned to the location.

aliasstr | None, optional

Alternate name or alias for the location.

commentstr | None, optional

Free-form comment associated with the location.

entityIdNameRef | None, optional

Reference to the owning GLPI entity.

is_recursivebool | None, optional

Whether the location is visible to child entities.

parentIdNameRef | None, optional

Reference to the parent location in the hierarchy.

levelint | None, optional

Depth of the location in the hierarchy tree (readOnly).

roomstr | None, optional

Room identifier within the building.

buildingstr | None, optional

Building identifier.

addressstr | None, optional

Street address of the location.

townstr | None, optional

Town or city name.

postcodestr | None, optional

Postal code.

statestr | None, optional

State, region or province.

countrystr | None, optional

Country name.

latitudestr | None, optional

Geographic latitude coordinate.

longitudestr | None, optional

Geographic longitude coordinate.

altitudestr | None, optional

Altitude above sea level.

date_creationdatetime | None, optional

Creation timestamp of the location record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp of the location record (format: date-time).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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

address: str | None
alias: str | None
altitude: str | None
building: str | None
code: str | None
comment: str | None
completename: str | None
country: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameRef | None
id: int | None
is_recursive: bool | None
latitude: str | None
level: int | None
longitude: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
parent: IdNameRef | None
postcode: str | None
room: str | None
state: str | None
town: str | None
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: GlpiModel

Request body for POST /Dropdowns/Location.

Read-only contract fields (id, completename, level) are intentionally excluded because the server rejects them on input.

Parameters:
namestr | None, optional

Short display name of the location.

codestr | None, optional

Short alphanumeric code assigned to the location.

aliasstr | None, optional

Alternate name or alias for the location.

commentstr | None, optional

Free-form comment associated with the location.

entityIdNameRef | None, optional

Reference to the owning GLPI entity.

is_recursivebool | None, optional

Whether the location is visible to child entities.

parentIdNameRef | None, optional

Reference to the parent location in the hierarchy.

roomstr | None, optional

Room identifier within the building.

buildingstr | None, optional

Building identifier.

addressstr | None, optional

Street address of the location.

townstr | None, optional

Town or city name.

postcodestr | None, optional

Postal code.

statestr | None, optional

State, region or province.

countrystr | None, optional

Country name.

latitudestr | None, optional

Geographic latitude coordinate.

longitudestr | None, optional

Geographic longitude coordinate.

altitudestr | None, optional

Altitude above sea level.

date_creationdatetime | None, optional

Creation timestamp to set on the location record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp to set on the location record (format: date-time).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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

address: str | None
alias: str | None
altitude: str | None
building: str | None
code: str | None
comment: str | None
country: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameRef | None
is_recursive: bool | None
latitude: str | None
longitude: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
parent: IdNameRef | None
postcode: str | None
room: str | None
state: str | None
town: str | None
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: PostLocation

Request body for PATCH /Dropdowns/Location/{id}.

The contract uses the same Location schema for create and partial-update bodies; PatchLocation is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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: GlpiModel

Query parameters for DELETE /Dropdowns/Location/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the location instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the location can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET /Knowledgebase/Article endpoints.

Mirrors components.schemas.KBArticle. content_html and description_html hold the HTML exactly as GLPI sent it, and both accept their wire spellings (content, description) as well; the content and description properties 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 None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

description

The article summary as Markdown, or None if GLPI sent none.

The short counterpart to content, converted from description_html on the first read and cached the same way.

model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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')])

  • categories (list[IdNameRef] | None)

  • 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 None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

description

The article summary as Markdown, or None if GLPI sent none.

The short counterpart to content, converted from description_html on the first read and cached the same way.

model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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')])

  • categories (list[IdNameRef] | None)

  • 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

categories: list[IdNameRef] | None
property content: str | None

The article body as Markdown, or None if GLPI sent none.

Converted from content_html on 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_html holds the HTML exactly as it arrived.

content_html: GlpiRawContent
date_begin: datetime | None
date_creation: datetime | None
date_end: datetime | None
date_mod: datetime | None
property description: str | None

The article summary as Markdown, or None if GLPI sent none.

The short counterpart to content, converted from description_html on the first read and cached the same way.

description_html: GlpiRawDescription
entity: IdNameRef | None
id: int | None
illustration: str | None
is_faq: bool | None
is_pinned: bool | None
is_recursive: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
revisions: list[_KBArticleRevisionRef] | None
show_in_service_catalog: bool | None
translations: list[_KBArticleTranslationRef] | None
user: IdNameRef | None
views: int | None
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: GlpiModel

Request body for POST /Knowledgebase/Article.

Server-managed fields are excluded: id (readOnly), views (a server-side counter), and the revisions/translations history arrays. The contract marks user.id as writable (the article author), so user is exposed here even though the server defaults it to the current user when omitted.

categories looks writable but the GLPI 2.3.0 v2 API drops it (the nested id is readOnly). GlpiClient.create_kb_article / update_kb_article apply it through a legacy fallback (set_kb_article_categories), which needs a configured v1 session pointing at the legacy apirest.php.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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)])

  • categories (list[IdNameRef] | None)

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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)])

  • categories (list[IdNameRef] | None)

  • 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

categories: list[IdNameRef] | None
content: GlpiMarkdownContent
date_begin: datetime | None
date_creation: datetime | None
date_end: datetime | None
date_mod: datetime | None
description: GlpiMarkdownContent
entity: IdNameRef | None
illustration: str | None
is_faq: bool | None
is_pinned: bool | None
is_recursive: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
show_in_service_catalog: bool | None
user: IdNameRef | None
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: PostKBArticle

Request body for PATCH /Knowledgebase/Article/{article_id}.

Inherits every writable field from PostKBArticle.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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)])

  • categories (list[IdNameRef] | None)

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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)])

  • categories (list[IdNameRef] | None)

  • 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: GlpiModel

Body for DELETE /Knowledgebase/Article/{article_id}.

Parameters:
forcebool | None, optional

When True, permanently delete the article instead of moving the record to the GLPI trash.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on KB comment endpoints.

Mirrors components.schemas.KBArticleComment.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
id: int | None
kbarticle: IdNameRef | None
language: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

parent: IdRef | None
user: IdNameRef | None
class PostKBArticleComment(*, extra_payload=<factory>, user=None, language=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]

Bases: GlpiModel

Request body for POST on KB comment endpoints.

The parent article (kbarticle) is taken from the URL path, and the contract marks the comment parent reference as read-only, so both are excluded. user.id is writable and may be set explicitly; the server defaults it to the current user when omitted.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
language: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

user: IdNameRef | None
class PatchKBArticleComment(*, extra_payload=<factory>, user=None, language=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]

Bases: PostKBArticleComment

Request body for PATCH on KB comment endpoints.

Inherits every writable field from PostKBArticleComment.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Body for DELETE on KB comment endpoints.

Parameters:
forcebool | None, optional

When True, permanently delete the comment instead of moving the record to the GLPI trash.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET on KB revision endpoints.

Mirrors components.schemas.KBArticleRevision. content_html holds the HTML exactly as GLPI sent it and also accepts the wire spelling content; the content property 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 None if GLPI sent none.

Converted from content_html on the first read and cached. content_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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 None if GLPI sent none.

Converted from content_html on the first read and cached. content_html holds the HTML exactly as it arrived.

model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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 None if GLPI sent none.

Converted from content_html on the first read and cached. content_html holds the HTML exactly as it arrived.

content_html: GlpiRawContent
date: datetime | None
id: int | None
kbarticle: IdNameRef | None
language: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
revision: int | None
user: IdNameRef | None

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: GlpiModel

Response shape returned by GET /Knowledgebase/Category endpoints.

Mirrors components.schemas.KBCategory. completename and level are server-managed (readOnly).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
completename: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameRef | None
id: int | None
is_recursive: bool | None
level: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
parent: IdNameRef | None
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: GlpiModel

Request body for POST /Knowledgebase/Category.

Read-only contract fields (id, completename, level) are excluded because the server rejects them on input.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameRef | None
is_recursive: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
parent: IdNameRef | None
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: PostKBCategory

Request body for PATCH /Knowledgebase/Category/{id}.

The contract uses the same KBCategory schema for create and partial-update bodies; PatchKBCategory is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Body for DELETE /Knowledgebase/Category/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the category instead of moving the record to the GLPI trash.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET /Administration/Entity endpoints.

Mirrors components.schemas.Entity. All fields are optional because the contract does not advertise a required array.

Parameters:
idint | None, optional

Native GLPI identifier (contract field id — ID, readOnly).

namestr | None, optional

Display name of the entity (contract field name — Name).

commentstr | None, optional

Free-form comment associated with the entity (contract field comment — Comment).

completenamestr | None, optional

Full hierarchical path of the entity in dotted notation (contract field completename — Complete name, readOnly).

parentIdNameRef | None, optional

Reference to the parent entity in the hierarchy (contract field parent — Parent entity).

levelint | None, optional

Depth of the entity in the hierarchy tree (contract field level — Level, readOnly).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
completename: str | None
id: int | None
level: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
parent: IdNameRef | None
class PostEntity(*, extra_payload=<factory>, name=None, comment=None, parent=None, **extra_data)[source]

Bases: GlpiModel

Request body for POST /Administration/Entity.

Read-only contract fields (id, completename, level) are intentionally excluded because the server rejects them on input.

Parameters:
namestr | None, optional

Display name of the entity (contract field name — Name).

commentstr | None, optional

Free-form comment associated with the entity (contract field comment — Comment).

parentIdNameRef | None, optional

Reference to the parent entity in the hierarchy (contract field parent — Parent entity).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
parent: IdNameRef | None
class PatchEntity(*, extra_payload=<factory>, name=None, comment=None, parent=None, **extra_data)[source]

Bases: PostEntity

Request body for PATCH /Administration/Entity/{id}.

The contract uses the same Entity schema for create and partial-update bodies; PatchEntity is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Query parameters for DELETE /Administration/Entity/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the entity instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the entity can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

One PluginFieldsContainer row returned by the v1 REST API.

Parameters:
idint | None, optional

Native identifier of the container.

namestr | None, optional

Internal name used to derive the value itemtype (PluginFields<Itemtype><name>).

labelstr | None, optional

Human-readable label shown in the GLPI UI.

itemtypesstr | None, optional

JSON-encoded list of itemtypes the container is attached to (the v1 API returns it as a string, e.g. '["Ticket"]').

typestr | None, optional

Container kind ("tab", "dom", "domtab", …).

subtypestr | None, optional

Optional sub-discriminator returned by the plugin.

entities_idint | 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.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • id (int | None)

  • name (str | None)

  • label (str | None)

  • itemtypes (str | None)

  • type (str | None)

  • subtype (str | None)

  • entities_id (int | None)

  • is_recursive (bool | None)

  • is_active (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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • id (int | None)

  • name (str | None)

  • label (str | None)

  • itemtypes (str | None)

  • type (str | None)

  • subtype (str | None)

  • entities_id (int | None)

  • is_recursive (bool | None)

  • is_active (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

entities_id: int | None
id: int | None
is_active: bool | None
is_recursive: bool | None
itemtypes: str | None
label: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
subtype: str | None
type: str | None
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: GlpiModel

One PluginFieldsField row returned by the v1 REST API.

Parameters:
idint | None, optional

Native identifier of the field declaration.

namestr | None, optional

Column name used inside the per-item value row (this is the key appearing in GetPluginFieldsValueRow.extra_payload).

labelstr | None, optional

Human-readable label shown in the GLPI UI.

typestr | None, optional

Field type ("string", "text", "richtext", "dropdown", "yesno", "date", "datetime", "number", "url", "header", …).

plugin_fields_containers_idint | None, optional

Identifier of the parent GetPluginFieldsContainer.

rankingint | None, optional

Display ordering of the field inside its container.

default_valuestr | 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_valuesstr | None, optional

Newline-separated list of accepted values for some field types (the v1 API returns the raw text payload).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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

allowed_values: str | None
default_value: str | None
id: int | None
is_active: bool | None
is_readonly: bool | None
label: str | None
mandatory: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

multiple: bool | None
name: str | None
plugin_fields_containers_id: int | None
ranking: int | None
type: str | None
class GetPluginFieldsValueRow(*, extra_payload=<factory>, id=None, items_id=None, itemtype=None, plugin_fields_containers_id=None, entities_id=None, **extra_data)[source]

Bases: GlpiModel

One PluginFields<Itemtype><Container> row keyed by parent item.

The actual field columns (<name> from each GetPluginFieldsField) are dynamic per container and so are collected into GlpiModel.extra_payload rather than declared here.

Parameters:
idint | None, optional

Native identifier of the value row.

items_idint | None, optional

Identifier of the parent GLPI item the row is attached to.

itemtypestr | None, optional

Itemtype of the parent GLPI item (e.g. "Ticket").

plugin_fields_containers_idint | None, optional

Identifier of the originating GetPluginFieldsContainer.

entities_idint | None, optional

Identifier of the entity the row belongs to.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • id (int | None)

  • items_id (int | None)

  • itemtype (str | None)

  • plugin_fields_containers_id (int | None)

  • entities_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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • id (int | None)

  • items_id (int | None)

  • itemtype (str | None)

  • plugin_fields_containers_id (int | None)

  • entities_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

entities_id: int | None
id: int | None
items_id: int | None
itemtype: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plugin_fields_containers_id: int | None
class PostPluginFieldsValueRow(*, extra_payload=<factory>, items_id, itemtype, plugin_fields_containers_id, entities_id=None, **extra_data)[source]

Bases: GlpiModel

Request body used to create a fresh plugin-fields value row.

The dynamic field columns are passed through GlpiModel.extra_payload so each container can supply its own column names without a tailored Pydantic model.

Parameters:
items_idint

Identifier of the parent GLPI item the row is attached to.

itemtypestr

Itemtype of the parent GLPI item (e.g. "Ticket").

plugin_fields_containers_idint

Identifier of the originating GetPluginFieldsContainer.

entities_idint | None, optional

Identifier of the entity the row should be linked to. When omitted GLPI applies its default scope.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • items_id (int)

  • itemtype (str)

  • plugin_fields_containers_id (int)

  • entities_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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • items_id (int)

  • itemtype (str)

  • plugin_fields_containers_id (int)

  • entities_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

entities_id: int | None
items_id: int
itemtype: str
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plugin_fields_containers_id: int

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: GlpiModel

Response shape returned by GET /Assets/Computer endpoints.

Mirrors components.schemas.Computer. No field carries a description in the OpenAPI contract; the parameter notes below reflect the field names, types and readOnly flags as advertised.

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

namestr | None, optional

Short display name of the computer.

commentstr | None, optional

Free-form comment associated with the computer.

statusIdNameRef | None, optional

Related status reference, see Dropdowns/State.

entityIdNameCompletenameRef | None, optional

Owning GLPI entity reference, including its completename.

is_recursivebool | None, optional

Whether the computer is visible to child entities.

manufacturerIdNameRef | None, optional

Related manufacturer reference.

userIdNameRef | None, optional

Related user reference for the person the computer is assigned to.

user_techIdNameRef | None, optional

Related user reference for the technician in charge of the computer.

contactstr | None, optional

Free-form contact name associated with the computer.

contact_numstr | None, optional

Free-form contact phone number associated with the computer.

serialstr | None, optional

Manufacturer serial number.

otherserialstr | None, optional

Secondary inventory or asset-tag number.

is_deletedbool | None, optional

Whether the computer has been moved to the GLPI trash.

date_creationdatetime | None, optional

Creation timestamp of the computer record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp of the computer record (format: date-time).

locationIdNameRef | None, optional

Related location reference.

typeIdNameRef | None, optional

Related computer type reference.

modelIdNameRef | None, optional

Related computer model reference.

grouplist[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_techlist[IdNameRef] | None, optional

Related groups in charge of the computer. Also an array, for the same reason as group.

uuidstr | None, optional

Hardware UUID reported by automatic inventory (readOnly).

networkIdNameRef | None, optional

Related network reference.

autoupdatesystemIdNameRef | 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_namestr | 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_tcofloat | None, optional

Total cost of ownership tracked against the computer.

last_inventory_updatedatetime | None, optional

Timestamp of the last automatic inventory update (readOnly, format: date-time).

last_bootdatetime | None, optional

Timestamp of the last reported boot (readOnly, format: date-time).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

autoupdatesystem: IdNameRef | None
comment: str | None
contact: str | None
contact_num: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameCompletenameRef | None
group: list[IdNameRef] | None
group_tech: list[IdNameRef] | None
id: int | None
is_deleted: bool | None
is_dynamic: bool | None
is_recursive: bool | None
is_template: bool | None
last_boot: datetime | None
last_inventory_update: datetime | None
location: IdNameRef | None
manufacturer: IdNameRef | None
model: IdNameRef | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
network: IdNameRef | None
otherserial: str | None
serial: str | None
status: IdNameRef | None
template_name: str | None
ticket_tco: float | None
type: IdNameRef | None
user: IdNameRef | None
user_tech: IdNameRef | None
uuid: str | None
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: GlpiModel

Request 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:
namestr | None, optional

Short display name of the computer.

commentstr | None, optional

Free-form comment associated with the computer.

statusIdNameRef | None, optional

Related status reference, see Dropdowns/State.

entityIdNameCompletenameRef | None, optional

Owning GLPI entity reference, including its completename.

is_recursivebool | None, optional

Whether the computer is visible to child entities.

manufacturerIdNameRef | None, optional

Related manufacturer reference.

userIdNameRef | None, optional

Related user reference for the person the computer is assigned to.

user_techIdNameRef | None, optional

Related user reference for the technician in charge of the computer.

contactstr | None, optional

Free-form contact name associated with the computer.

contact_numstr | None, optional

Free-form contact phone number associated with the computer.

serialstr | None, optional

Manufacturer serial number.

otherserialstr | None, optional

Secondary inventory or asset-tag number.

is_deletedbool | None, optional

Whether the computer should be moved to the GLPI trash.

date_creationdatetime | None, optional

Creation timestamp to set on the computer record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp to set on the computer record (format: date-time).

locationIdNameRef | None, optional

Related location reference.

typeIdNameRef | None, optional

Related computer type reference.

modelIdNameRef | None, optional

Related computer model reference.

grouplist[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_techlist[IdNameRef] | None, optional

Related groups in charge of the computer. Also an array, for the same reason as group.

networkIdNameRef | None, optional

Related network reference.

autoupdatesystemIdNameRef | 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_namestr | 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_tcofloat | None, optional

Total cost of ownership tracked against the computer.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

autoupdatesystem: IdNameRef | None
comment: str | None
contact: str | None
contact_num: str | None
date_creation: datetime | None
date_mod: datetime | None
entity: IdNameCompletenameRef | None
group: list[IdNameRef] | None
group_tech: list[IdNameRef] | None
is_deleted: bool | None
is_dynamic: bool | None
is_recursive: bool | None
is_template: bool | None
location: IdNameRef | None
manufacturer: IdNameRef | None
model: IdNameRef | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
network: IdNameRef | None
otherserial: str | None
serial: str | None
status: IdNameRef | None
template_name: str | None
ticket_tco: float | None
type: IdNameRef | None
user: IdNameRef | None
user_tech: IdNameRef | None
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: PostComputer

Request body for PATCH /Assets/Computer/{id}.

The contract uses the same Computer schema for create and partial-update bodies; PatchComputer is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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 DeleteComputer(*, extra_payload=<factory>, force=None, **extra_data)[source]

Bases: GlpiModel

Query parameters for DELETE /Assets/Computer/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the computer instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the computer can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET /Management/Contract endpoints.

Mirrors components.schemas.Contract.

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

namestr | None, optional

Short display name of the contract.

commentstr | None, optional

Free-form comment associated with the contract.

statusIdNameRef | None, optional

Related contract status reference.

entityIdNameRef | None, optional

Owning GLPI entity reference.

date_creationdatetime | None, optional

Creation timestamp of the contract record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp of the contract record (format: date-time).

typeIdNameRef | None, optional

Related contract type reference, see Dropdowns/ContractType.

is_deletedbool | None, optional

Whether the contract has been moved to the GLPI trash.

costslist[IdRef] | None, optional

Related contract cost line references. Read-only on this client: cost lines are created and updated through their own ContractCost endpoints, never through this model.

numberstr | None, optional

Contract reference number.

locationIdNameRef | None, optional

Related location reference.

date_begindate | None, optional

Contract start date (format: date). A plain calendar date, not a timestamp: GLPI stores no time-of-day here, and keeping it a date also keeps it out of the server-clock conversion applied to aware timestamps.

durationint | None, optional

Contract duration, in months.

notice_periodint | None, optional

Notice period, in months.

renewal_periodint | None, optional

Renewal period, in months.

invoice_periodint | None, optional

Invoice period, in months.

accounting_numberstr | None, optional

Accounting reference number.

week_begin_hourstr | None, optional

Weekday coverage start time, in HH:MM:SS format (RFC 3339 partial-time).

week_end_hourstr | None, optional

Weekday coverage end time, in HH:MM:SS format (RFC 3339 partial-time).

saturday_begin_hourstr | None, optional

Saturday coverage start time, in HH:MM:SS format (RFC 3339 partial-time).

saturday_end_hourstr | None, optional

Saturday coverage end time, in HH:MM:SS format (RFC 3339 partial-time).

sunday_begin_hourstr | None, optional

Sunday coverage start time, in HH:MM:SS format (RFC 3339 partial-time).

sunday_end_hourstr | None, optional

Sunday coverage end time, in HH:MM:SS format (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_allowedint | None, optional

Maximum number of items that can be linked to this contract (0 means unlimited).

alertint | None, optional

Selects which expiration alerts are active. The contract is self-inconsistent about the last two values: the field’s enum lists [0, 4, 8, 12, 64, 72], but its accompanying description numbers the same six meanings as 0 no alert, 4 alert on end date, 8 alert on notice date, 12 both, 16 periodic alert, 24 periodic 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, 64 and 72 to a live GLPI 11 contract stores the value unchanged and rejects none of them, so the endpoint validates this field not at all and the enum in the contract document does not describe an enforced set. Typed as a plain int for 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_typeGlpiContractRenewalType | None, optional

Renewal behaviour of the contract: no renewal, tacit (automatic) renewal, or explicit (manual) renewal.

template_namestr | 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.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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)

  • costs (list[IdRef] | 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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)

  • costs (list[IdRef] | 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

accounting_number: str | None
alert: int | None
comment: str | None
costs: list[IdRef] | None
date_begin: date | None
date_creation: datetime | None
date_mod: datetime | None
duration: int | None
entity: IdNameRef | None
id: int | None
invoice_period: int | None
is_deleted: bool | None
is_template: bool | None
location: IdNameRef | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
notice_period: int | None
number: str | None
renewal_period: int | None
renewal_type: GlpiContractRenewalType | None
saturday_begin_hour: str | None
saturday_end_hour: str | None
status: IdNameRef | None
sunday_begin_hour: str | None
sunday_end_hour: str | None
template_name: str | None
type: IdNameRef | None
use_saturday: bool | None
use_sunday: bool | None
week_begin_hour: str | None
week_end_hour: str | 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: GlpiModel

Request body for POST /Management/Contract.

The read-only contract field (id) is intentionally excluded because the server rejects it on input. costs is also excluded: cost lines are written through their own ContractCost endpoints, never through this model.

Parameters:
namestr | None, optional

Short display name of the contract.

commentstr | None, optional

Free-form comment associated with the contract.

statusIdNameRef | None, optional

Related contract status reference.

entityIdNameRef | None, optional

Owning GLPI entity reference.

date_creationdatetime | None, optional

Creation timestamp to set on the contract record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp to set on the contract record (format: date-time).

typeIdNameRef | None, optional

Related contract type reference, see Dropdowns/ContractType.

is_deletedbool | None, optional

Whether the contract should be moved to the GLPI trash.

numberstr | None, optional

Contract reference number.

locationIdNameRef | None, optional

Related location reference.

date_begindate | None, optional

Contract start date (format: date). A plain calendar date, not a timestamp: GLPI stores no time-of-day here, and keeping it a date also keeps it out of the server-clock conversion applied to aware timestamps.

durationint | None, optional

Contract duration, in months.

notice_periodint | None, optional

Notice period, in months.

renewal_periodint | None, optional

Renewal period, in months.

invoice_periodint | None, optional

Invoice period, in months.

accounting_numberstr | None, optional

Accounting reference number.

week_begin_hourstr | None, optional

Weekday coverage start time, in HH:MM:SS format (RFC 3339 partial-time).

week_end_hourstr | None, optional

Weekday coverage end time, in HH:MM:SS format (RFC 3339 partial-time).

saturday_begin_hourstr | None, optional

Saturday coverage start time, in HH:MM:SS format (RFC 3339 partial-time).

saturday_end_hourstr | None, optional

Saturday coverage end time, in HH:MM:SS format (RFC 3339 partial-time).

sunday_begin_hourstr | None, optional

Sunday coverage start time, in HH:MM:SS format (RFC 3339 partial-time).

sunday_end_hourstr | None, optional

Sunday coverage end time, in HH:MM:SS format (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_allowedint | None, optional

Maximum number of items that can be linked to this contract (0 means unlimited).

alertint | None, optional

Selects which expiration alerts are active. The contract is self-inconsistent about the last two values: the field’s enum lists [0, 4, 8, 12, 64, 72], but its accompanying description numbers the same six meanings as 0 no alert, 4 alert on end date, 8 alert on notice date, 12 both, 16 periodic alert, 24 periodic 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, 64 and 72 to a live GLPI 11 contract stores the value unchanged and rejects none of them, so the endpoint validates this field not at all and the enum in the contract document does not describe an enforced set. Typed as a plain int for 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_typeGlpiContractRenewalType | None, optional

Renewal behaviour of the contract: no renewal, tacit (automatic) renewal, or explicit (manual) renewal.

template_namestr | 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.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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

accounting_number: str | None
alert: int | None
comment: str | None
date_begin: date | None
date_creation: datetime | None
date_mod: datetime | None
duration: int | None
entity: IdNameRef | None
invoice_period: int | None
is_deleted: bool | None
is_template: bool | None
location: IdNameRef | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
notice_period: int | None
number: str | None
renewal_period: int | None
renewal_type: GlpiContractRenewalType | None
saturday_begin_hour: str | None
saturday_end_hour: str | None
status: IdNameRef | None
sunday_begin_hour: str | None
sunday_end_hour: str | None
template_name: str | None
type: IdNameRef | None
use_saturday: bool | None
use_sunday: bool | None
week_begin_hour: str | None
week_end_hour: str | 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: PostContract

Request body for PATCH /Management/Contract/{id}.

The contract uses the same Contract schema for create and partial-update bodies; PatchContract is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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_extra

Get extra fields set during validation.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

Parameters:
  • extra_payload (dict[str, Any])

  • 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: GlpiModel

Query parameters for DELETE /Management/Contract/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the contract instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the contract can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape for GET /Management/Contract/{id}/Cost endpoints.

Mirrors components.schemas.ContractCost.

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

contractIdNameRef | None, optional

Related contract reference, the parent of this cost line.

namestr | None, optional

Short display name of the cost line.

commentstr | None, optional

Free-form comment associated with the cost line.

date_begindatetime | None, optional

Cost line start timestamp (format: date-time). Unlike Contract.date_begin, which the contract declares with format: date, this field carries a time-of-day component.

date_enddatetime | None, optional

Cost line end timestamp (format: date-time).

costfloat | None, optional

Monetary amount of the cost line.

budgetIdNameRef | None, optional

Related budget reference.

entityIdNameRef | None, optional

Owning GLPI entity reference.

is_recursivebool | None, optional

Whether the cost line is visible in sub-entities of entity.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

budget: IdNameRef | None
comment: str | None
contract: IdNameRef | None
cost: float | None
date_begin: datetime | None
date_end: datetime | None
entity: IdNameRef | None
id: int | None
is_recursive: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
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: GlpiModel

Request body for POST /Management/Contract/{id}/Cost.

The read-only contract field (id) is intentionally excluded because the server rejects it on input.

Parameters:
contractIdNameRef | None, optional

Related contract reference, the parent of this cost line.

namestr | None, optional

Short display name of the cost line.

commentstr | None, optional

Free-form comment associated with the cost line.

date_begindatetime | None, optional

Cost line start timestamp to set (format: date-time). Unlike Contract.date_begin, which the contract declares with format: date, this field carries a time-of-day component.

date_enddatetime | None, optional

Cost line end timestamp to set (format: date-time).

costfloat | None, optional

Monetary amount of the cost line.

budgetIdNameRef | None, optional

Related budget reference.

entityIdNameRef | None, optional

Owning GLPI entity reference.

is_recursivebool | None, optional

Whether the cost line should be visible in sub-entities of entity.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

budget: IdNameRef | None
comment: str | None
contract: IdNameRef | None
cost: float | None
date_begin: datetime | None
date_end: datetime | None
entity: IdNameRef | None
is_recursive: bool | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
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: PostContractCost

Request body for PATCH /Management/Contract/{id}/Cost/{cost_id}.

The contract uses the same ContractCost schema for create and partial-update bodies; PatchContractCost is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Query parameters for DELETE /Management/Contract/{id}/Cost/{cost_id}.

Parameters:
forcebool | None, optional

When True, permanently delete the cost line instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the cost line can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: GlpiModel

Response shape returned by GET /Dropdowns/ContractType endpoints.

Mirrors components.schemas.ContractType. No field carries a description in the OpenAPI contract; the parameter notes below reflect the field names, types and readOnly flags as advertised.

Parameters:
idint | None, optional

Native GLPI identifier (readOnly).

namestr | None, optional

Short display name of the contract type.

commentstr | None, optional

Free-form comment associated with the contract type.

date_creationdatetime | None, optional

Creation timestamp of the contract type record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp of the contract type record (format: date-time).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
id: int | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
class PostContractType(*, extra_payload=<factory>, name=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]

Bases: GlpiModel

Request body for POST /Dropdowns/ContractType.

The read-only contract field (id) is intentionally excluded because the server rejects it on input.

Parameters:
namestr | None, optional

Short display name of the contract type.

commentstr | None, optional

Free-form comment associated with the contract type.

date_creationdatetime | None, optional

Creation timestamp to set on the contract type record (format: date-time).

date_moddatetime | None, optional

Last modification timestamp to set on the contract type record (format: date-time).

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

comment: str | None
date_creation: datetime | None
date_mod: datetime | None
model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
class PatchContractType(*, extra_payload=<factory>, name=None, comment=None, date_creation=None, date_mod=None, **extra_data)[source]

Bases: PostContractType

Request body for PATCH /Dropdowns/ContractType/{id}.

The contract uses the same ContractType schema for create and partial-update bodies; PatchContractType is kept distinct so client mixins can express the intent of the operation explicitly.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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: GlpiModel

Query parameters for DELETE /Dropdowns/ContractType/{id}.

Parameters:
forcebool | None, optional

When True, permanently delete the contract type instead of moving the record to the GLPI trash. When False or None, the server applies its default soft-delete behaviour and the contract type can still be restored.

Attributes:
model_extra

Get extra fields set during validation.

model_fields_set

Returns 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_extra

Get extra fields set during validation.

model_fields_set

Returns 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

force: bool | None
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: IntEnum

Base 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:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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.

property glpi_id: int

Return the numeric GLPI identifier represented by this enum.

Returns:
int

Numeric GLPI identifier.

rsql_equals(field)[source]

Return one equality RSQL fragment for this enum value.

Parameters:
fieldstr

GLPI field name used in the filter.

Returns:
str

RSQL equality expression of the form "<field>==<value>".

Parameters:

field (str)

Return type:

str

class GlpiTicketStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: GlpiEnum

GLPI ticket status identifiers as advertised by the contract.

The contract enum on Ticket.status.id is [1, 10, 2, 3, 4, 5, 6] where 10 represents the validation step that sits between NEW and ASSIGNED.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

GLPI ticket type identifiers as advertised by the contract.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

Common GLPI urgency, impact, and priority identifiers.

The contract advertises the same [1, 2, 3, 4, 5] enum on the urgency, impact, and priority ticket fields, but the live server does not honour that for priority: GLPI’s priority scale has a sixth level, Major, which it derives from urgency and impact. urgency and impact really do stop at 5.

MAJOR is 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: priority is typed with this enum on GetTicket, so a single Major ticket 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 urgency and impact now also accept 6, which GLPI will never send. Accepting a value that cannot occur is harmless; rejecting one that does occur was not.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

GLPI TicketTask.state enum values.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

GLPI Solution.status enum values.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

Timeline position values shared by Followup, Solution and TicketTask.

The contract advertises [-1, 0, 1, 2, 3, 4] on timeline_position. LEFT and RIGHT follow the GLPI UI conventions.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

GLPI User.authtype enum values.

The contract advertises [1, 2, 3, 4, 5, 6] without textual labels. Names map to the GLPI source enum order.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

GLPI Ticket.global_validation enum values.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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: GlpiEnum

GLPI contract renewal types as advertised by the contract.

The contract enum on Contract.renewal_type is [0, 1, 2], with the meanings documented inline on that field: no renewal, tacit (automatic) renewal, and explicit (manual) renewal.

Attributes:
denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the 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.

conjugate

Returns 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’.