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 synchronous one is the single source of truth for endpoint behaviour; the asynchronous one wraps each synchronous method into a coroutine.

class GlpiClient(*, glpi_api_url, 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, UserMixin, EntityMixin, LocationMixin, PluginFieldsMixin, TicketContextMixin, StatisticsMixin, _BaseGlpiClient, TransportMixin

Synchronous GLPI client backed by the contract-aligned API mixins.

The client owns the shared HTTP session, OAuth token manager, and optional legacy v1 session used solely for binary document uploads. Token acquisition is serialised by a threading.Lock so the same instance can be safely shared across threads as well as across asyncio tasks dispatched through AsyncGlpiClient.

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_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_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_document(document_id, *[, force])

Delete one GLPI document by identifier.

delete_entity(entity_id, *[, force])

Delete one GLPI entity 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.

from_env(*[, env, prefix])

Build a client instance from environment variables.

get_document(document_id)

Fetch one GLPI document by identifier.

get_entity(entity_id)

Fetch one GLPI entity 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_entities([rsql_filter, batch_size])

Yield successive pages of GLPI entities 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_ticket_timeline_document(ticket_id, ...)

Link an existing GLPI document to one ticket timeline.

list_item_plugin_field_rows(itemtype, ...)

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

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_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_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_ticket_custom_fields(ticket_id, values)

Persist custom-field values on one ticket.

unlink_ticket_timeline_document(ticket_id, ...)

Unlink one timeline document from a ticket.

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

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)

  • 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_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_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_document(document_id, *[, force])

Delete one GLPI document by identifier.

delete_entity(entity_id, *[, force])

Delete one GLPI entity 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.

from_env(*[, env, prefix])

Build a client instance from environment variables.

get_document(document_id)

Fetch one GLPI document by identifier.

get_entity(entity_id)

Fetch one GLPI entity 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_entities([rsql_filter, batch_size])

Yield successive pages of GLPI entities 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_ticket_timeline_document(ticket_id, ...)

Link an existing GLPI document to one ticket timeline.

list_item_plugin_field_rows(itemtype, ...)

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

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_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_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_ticket_custom_fields(ticket_id, values)

Persist custom-field values on one ticket.

unlink_ticket_timeline_document(ticket_id, ...)

Unlink one timeline document from a ticket.

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_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:
ValueError

If the supplied configuration is incomplete or invalid (e.g. missing OAuth credentials together with no v1 fallback).

Parameters:
  • glpi_api_url (str)

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

The client itself, suitable for chaining method calls.

Return type:

Self

__exit__(exc_type, exc, tb)[source]

Close the client on with 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:
ValueError

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_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:
ValueError

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

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_location(location)

Create one GLPI location.

Parameters:
locationPostLocation

Request body describing the location to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
ValueError

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing the id field or the HTTP status is not success.

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

Parameters:

user (PostUser)

Return type:

int

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

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

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

Parameters:
  • entity_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:
ValueError

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

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

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

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

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

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

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

Parameters:

document_id (int)

Return type:

bytes

entity_recursive: bool
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).

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 asynchronous client accepts an additional executor keyword here.

Returns:
Self

A fully configured client ready to perform requests.

Raises:
ValueError

If the resolved configuration is missing a required field.

Parameters:
Return type:

Self

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

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

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

Parameters:

entity_id (int)

Return type:

GetEntity

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

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

If default_days < 1 or start_date > 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:
ValueError

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 executed sequentially in this synchronous implementation.

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

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

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

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

If default_days < 1 or start_date > 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:
ValueError

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

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

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

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_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_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 as-is to each page request.

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

If the create response is missing id or returns a non-success HTTP status.

Parameters:
Return type:

int

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_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:
ValueError

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

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

Parameters:
Return type:

None

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_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 forwarded as-is, e.g. "date_mod desc".

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]

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 ValueError 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

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

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_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:
ValueError

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

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_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:
ValueError

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

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

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

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

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

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

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 async AsyncGlpiClient offloads this blocking call to a worker thread automatically; callers using the sync GlpiClient invoke it directly.

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

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(*, executor=None, **kwargs)[source]

Bases: AsyncBridge, AsyncPaginationMixin, TicketMixin, TicketTaskMixin, FollowupMixin, SolutionMixin, TimelineDocumentMixin, TeamMemberMixin, DocumentMixin, UserMixin, EntityMixin, LocationMixin, PluginFieldsMixin, AsyncTicketContextMixin, AsyncStatisticsMixin, _BaseGlpiClient, TransportMixin

Asynchronous GLPI client built on the sync mixins via the bridge.

Every public sync method exposed by the inherited mixins is automatically wrapped into a coroutine that defers the blocking call to a worker thread. The custom helpers that benefit from concurrent fan-out provide hand-written async overrides which are preserved as coroutine functions by the bridge.

Construction parameters and from_env() are documented on _BaseGlpiClient; the only additional keyword is executor (described below).

Methods

add_ticket_team_member(ticket_id, member)

Add one team member to a ticket.

close()

Release every resource owned by the client.

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_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_document(document_id, *[, force])

Delete one GLPI document by identifier.

delete_entity(entity_id, *[, force])

Delete one GLPI entity 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.

from_env(*[, env, prefix])

Build a client instance from environment variables.

get_document(document_id)

Fetch one GLPI document by identifier.

get_entity(entity_id)

Fetch one GLPI entity by identifier.

get_location(location_id)

Fetch one GLPI location by identifier.

get_task_durations(*[, start_date, ...])

Return task duration totals with concurrent per-ticket fetches.

get_task_statistics(ticket_ids)

Return task duration totals with concurrent per-ticket fetches.

get_ticket(ticket_id)

Fetch one GLPI ticket by identifier.

get_ticket_context(ticket_id)

Return one aggregated ticket context with concurrent fan-out.

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_entities([rsql_filter, batch_size])

Yield successive pages of GLPI entities 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_ticket_timeline_document(ticket_id, ...)

Link an existing GLPI document to one ticket timeline.

list_item_plugin_field_rows(itemtype, ...)

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

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_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_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_ticket_custom_fields(ticket_id, values)

Persist custom-field values on one ticket.

unlink_ticket_timeline_document(ticket_id, ...)

Unlink one timeline document from a ticket.

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_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 an asynchronous GLPI client and its transport resources.

Parameters:
executorconcurrent.futures.Executor | None, optional

Optional executor every wrapped call is routed through. When None (the default) the bridge falls back to asyncio.to_thread(), which uses the loop’s default thread pool executor. Supply a dedicated concurrent.futures.ThreadPoolExecutor when the application performs aggressive fan-outs that would otherwise saturate the default pool.

**kwargsAny

Remaining keyword arguments forwarded to _BaseGlpiClient.

Parameters:
  • executor (Executor | None)

  • kwargs (Any)

Methods

add_ticket_team_member(ticket_id, member)

Add one team member to a ticket.

close()

Release every resource owned by the client.

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_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_document(document_id, *[, force])

Delete one GLPI document by identifier.

delete_entity(entity_id, *[, force])

Delete one GLPI entity 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.

from_env(*[, env, prefix])

Build a client instance from environment variables.

get_document(document_id)

Fetch one GLPI document by identifier.

get_entity(entity_id)

Fetch one GLPI entity by identifier.

get_location(location_id)

Fetch one GLPI location by identifier.

get_task_durations(*[, start_date, ...])

Return task duration totals with concurrent per-ticket fetches.

get_task_statistics(ticket_ids)

Return task duration totals with concurrent per-ticket fetches.

get_ticket(ticket_id)

Fetch one GLPI ticket by identifier.

get_ticket_context(ticket_id)

Return one aggregated ticket context with concurrent fan-out.

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_entities([rsql_filter, batch_size])

Yield successive pages of GLPI entities 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_ticket_timeline_document(ticket_id, ...)

Link an existing GLPI document to one ticket timeline.

list_item_plugin_field_rows(itemtype, ...)

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

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_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_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_ticket_custom_fields(ticket_id, values)

Persist custom-field values on one ticket.

unlink_ticket_timeline_document(ticket_id, ...)

Unlink one timeline document from a ticket.

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_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:
ValueError

If the supplied configuration is incomplete or invalid (e.g. missing OAuth credentials together with no v1 fallback).

Parameters:
  • executor (Executor | None)

  • kwargs (Any)

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

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 off-thread, the optional v1 fallback session is closed off-thread, and the client is marked as closed so subsequent calls raise immediately. The method is idempotent.

Return type:

None

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

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_location(location)

Create one GLPI location.

Parameters:
locationPostLocation

Request body describing the location to create.

Returns:
int

Identifier assigned by the GLPI server.

Raises:
ValueError

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing the id field or the HTTP status is not success.

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

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

If the create response is missing id or returns a non-success HTTP status.

Parameters:

user (PostUser)

Return type:

int

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

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

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

Parameters:
  • entity_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:
ValueError

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

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

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

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

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

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

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

Parameters:

document_id (int)

Return type:

bytes

entity_recursive: bool
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).

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 asynchronous client accepts an additional executor keyword here.

Returns:
Self

A fully configured client ready to perform requests.

Raises:
ValueError

If the resolved configuration is missing a required field.

Parameters:
Return type:

Self

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

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

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

Parameters:

entity_id (int)

Return type:

GetEntity

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

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 concurrent per-ticket fetches.

Overrides the synchronous implementation so that when return_task_details=True the per-ticket list_ticket_tasks() calls are dispatched concurrently using asyncio.gather(). The date-window, entity, and user filter logic is identical to the synchronous version.

Parameters:
start_datestr | None, optional

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

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 (default 30).

entity_idint | None, optional

Restrict to tickets in this entity.

entity_namestr | None, optional

Resolve entity by name and restrict to matched entities.

user_idint | None, optional

Restrict to tickets where the user is assignee or requester.

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, fan-out per-ticket task fetches concurrently and include a tasks list in the result.

Returns:
TaskDurationsResult

Same shape as the synchronous get_task_durations().

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 with concurrent per-ticket fetches.

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.

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

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 with concurrent fan-out.

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

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

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

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.

Async override of StatisticsMixin.get_ticket_statistics(). The synchronous base runs in a worker thread where self.search_tickets and self.search_entities resolve to bridge-wrapped coroutines that would be silently dropped. This override awaits those calls directly on the event loop instead.

Parameters:
start_datestr | None, optional

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

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 (default 30).

entity_idint | None, optional

Restrict to tickets in this entity.

entity_namestr | None, optional

Resolve entity by name and restrict to matched entities.

extra_filterstr | None, optional

Optional raw RSQL fragment appended as an AND clause.

Returns:
dict[str, object]

Same shape as the synchronous get_ticket_statistics().

Raises:
ValueError

If default_days < 1 or start_date > 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:
ValueError

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

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

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.

Async override of StatisticsMixin.get_user_activity(). The synchronous base calls self.search_users, self.iter_search_tickets, and self.get_task_durations through self, which on the async client resolve to bridge-wrapped coroutines. This override awaits those calls and uses async for on the async generator.

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

Same shape as the synchronous get_user_activity().

Raises:
ValueError

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_entities(rsql_filter='', *, batch_size=50)

Yield successive pages of GLPI entities until exhausted.

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_tickets(rsql_filter='', *, batch_size=50, sort=None, fields=())

Yield successive pages of GLPI tickets until exhausted.

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

sortstr | None, optional

sort query parameter forwarded as-is to each page request.

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.

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

If the create response is missing id or returns a non-success HTTP status.

Parameters:
Return type:

int

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_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:
ValueError

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

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

Parameters:
Return type:

None

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_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 forwarded as-is, e.g. "date_mod desc".

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]

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 ValueError 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

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

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_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:
ValueError

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

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_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:
ValueError

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

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

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

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

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

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

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 async AsyncGlpiClient offloads this blocking call to a worker thread automatically; callers using the sync GlpiClient invoke it directly.

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

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 AsyncBridge[source]

Bases: object

Base class that converts inherited sync methods into coroutines.

The bridge is intended to be mixed into the most-derived async client class before the sync mixins so its __init_subclass__() hook can observe the full MRO and install coroutine wrappers on the subclass for every public method that the sync mixins expose.

Subclasses may also assign a concurrent.futures.Executor instance to _executor to route every wrapped call through a dedicated pool. When _executor is None the bridge falls back to asyncio.to_thread(), which uses the default loop executor.

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.

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

contentGlpiMarkdownContent

Body of the ticket exchanged as HTML over the wire (format: html); transparent Markdown conversion is applied on the model boundary. 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_durationTotal waiting duration in seconds, readOnly).

resolution_durationint | None, optional

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

close_durationint | None, optional

Total close duration in seconds (contract field close_durationTotal 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 typeThe 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_durationTotal 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_durationTotal SLA waiting duration in seconds, readOnly).

ola_waiting_durationint | None, optional

Total OLA waiting duration in seconds (contract field ola_waiting_durationTotal 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_validationThe 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:
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

actiontime: int | None
begin_waiting_date: datetime | None
category: IdNameRef | None
close_duration: int | 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
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. status is also excluded because GLPI manages the ticket lifecycle through dedicated timeline routes (followups, solutions, validation).

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 typeThe 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_validationThe 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, **extra_data)[source]

Bases: PostTicket

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

The contract uses the same Ticket schema for create and partial-update bodies; PatchTicket 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 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=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.

contentGlpiMarkdownContent

Body of the followup exchanged as HTML over the wire (format: html); transparent Markdown conversion is applied on the model boundary. 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_positionThe 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])

  • id (int | None)

  • 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])

  • id (int | None)

  • 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
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_positionThe 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=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).

contentGlpiMarkdownContent

Body of the task exchanged as HTML over the wire (format: html); transparent Markdown conversion is applied on the model boundary. 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 stateThe 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_positionThe 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])

  • id (int | None)

  • uuid (str | None)

  • content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])

  • is_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])

  • id (int | None)

  • uuid (str | None)

  • content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])

  • is_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
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 stateThe 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_positionThe 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=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.

contentGlpiMarkdownContent

Body of the solution exchanged as HTML over the wire (format: html); transparent Markdown conversion is applied on the model boundary. 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 statusThe 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:
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)

  • 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])

  • id (int | None)

  • 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
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 statusThe 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_positionThe 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_positionThe 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 idID, readOnly).

usernamestr | None, optional

Login name of the user (contract field usernameUsername).

realnamestr | None, optional

Family name (contract field realnameReal name).

firstnamestr | None, optional

Given name (contract field firstnameFirst name).

phonestr | None, optional

Primary phone number (contract field phonePhone number).

phone2str | None, optional

Secondary phone number (contract field phone2Phone number 2).

mobilestr | None, optional

Mobile phone number (contract field mobileMobile phone number).

emailslist[_EmailAddress] | None, optional

Collection of e-mail addresses attached to the user (contract field emailsEmail addresses).

commentstr | None, optional

Free-form comment associated with the user (contract field commentComment).

is_activebool | None, optional

Whether the account is currently active (contract field is_activeIs active).

is_deletedbool | None, optional

Whether the account has been moved to the trash (contract field is_deletedIs 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_changeDate 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_profileDefault profile).

default_entityIdNameRef | None, optional

Default entity scope assumed by the user at login (contract field default_entityDefault 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_dateValid since).

end_datedatetime | None, optional

End of the validity window for the account (contract field end_dateValid 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 usernameUsername).

realnamestr | None, optional

Family name (contract field realnameReal name).

firstnamestr | None, optional

Given name (contract field firstnameFirst name).

phonestr | None, optional

Primary phone number (contract field phonePhone number).

phone2str | None, optional

Secondary phone number (contract field phone2Phone number 2).

mobilestr | None, optional

Mobile phone number (contract field mobileMobile phone number).

emailslist[_EmailAddress] | None, optional

Collection of e-mail addresses attached to the user (contract field emailsEmail addresses).

commentstr | None, optional

Free-form comment associated with the user (contract field commentComment).

is_activebool | None, optional

Whether the account should be created in the active state (contract field is_activeIs active).

is_deletedbool | None, optional

Whether the account should be created in the trashed state (contract field is_deletedIs deleted).

passwordSecretStr | None, optional

Cleartext password to assign to the account (contract field passwordPassword, 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 password2Password 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_profileDefault profile).

default_entityIdNameRef | None, optional

Default entity scope assumed by the user at login (contract field default_entityDefault 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_dateValid since).

end_datedatetime | None, optional

End of the validity window for the account (contract field end_dateValid 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].

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 idID, readOnly).

namestr | None, optional

Display name of the entity (contract field nameName).

commentstr | None, optional

Free-form comment associated with the entity (contract field commentComment).

completenamestr | None, optional

Full hierarchical path of the entity in dotted notation (contract field completenameComplete name, readOnly).

parentIdNameRef | None, optional

Reference to the parent entity in the hierarchy (contract field parentParent entity).

levelint | None, optional

Depth of the entity in the hierarchy tree (contract field levelLevel, 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 nameName).

commentstr | None, optional

Free-form comment associated with the entity (contract field commentComment).

parentIdNameRef | None, optional

Reference to the parent entity in the hierarchy (contract field parentParent 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

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.

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

Package Metadata

__version__ = '0.3.4'

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