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,TransportMixinSynchronous 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.Lockso the same instance can be safely shared across threads as well as across asyncio tasks dispatched throughAsyncGlpiClient.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
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_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_url
str Base URL of the GLPI v2 REST API, e.g.
https://glpi.example.com/api.php/v2.- client_id
str|None,optional OAuth client identifier used to obtain access tokens.
- client_secret
str|None,optional OAuth client secret paired with
client_id.- username
str|None,optional GLPI account username used for the OAuth password grant.
- password
str|None,optional GLPI account password used for the OAuth password grant.
- glpi_entity
int|None,optional Default
GLPI-Entityheader sent with each request.- glpi_profile
int|None,optional Default
GLPI-Profileheader sent with each request.- entity_recursivebool,
optional When
TruetheGLPI-Entity-Recursiveheader is sent so entity scope includes child entities.- language
str,optional Default
Accept-Languageheader value (e.g."en_GB").- verify_sslbool,
optional Whether the HTTP session verifies the server certificate.
- auth_token_refresh
int|None,optional Number of seconds before token expiry at which the auth manager proactively refreshes the access token.
- v1_base_url
str|None,optional Base URL of the legacy GLPI v1 API used as a fallback for binary document uploads and the Fields plugin endpoints.
- v1_user_token
str|None,optional user_tokenfor the v1 fallback session.- v1_app_token
str|None,optional app_tokenfor the v1 fallback session.
- glpi_api_url
- Parameters:
glpi_api_url (str)
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
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_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:
ValueErrorIf 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
withblock.- Returns:
GlpiClientThe client itself, suitable for chaining method calls.
- Return type:
- __exit__(exc_type, exc, tb)[source]
Close the client on
withexit.- Parameters:
- exc_type
type[BaseException] |None Exception class raised inside the
withblock, if any.- exc
BaseException|None Exception instance raised inside the block, if any.
- tb
TracebackType|None Traceback associated with
exc.
- exc_type
- Parameters:
exc_type (type[BaseException] | None)
exc (BaseException | None)
tb (TracebackType | None)
- Return type:
None
- add_ticket_team_member(ticket_id, member)
Add one team member to a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to receive the new member.
- member
PostTeamMember Request body describing the member. The
idfield is the target user/group/supplier identifier,typeis one of"User","Group"or"Supplier", androleis one of"requester","assigned"or"observer".
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- close()[source]
Release every resource owned by the client.
The shared HTTP session is closed, the optional v1 fallback session is closed, and the client is marked as closed so subsequent calls raise immediately. The method is idempotent.
- Return type:
None
- create_document(document)
Create one GLPI document metadata record.
Binary uploads use
upload_document()instead of the JSON metadata endpoint exposed here.- Parameters:
- document
PostDocument Request body describing the document metadata.
- document
- Returns:
intIdentifier assigned by the GLPI server to the new document.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
document (PostDocument)
- Return type:
- create_entity(entity)
Create one GLPI entity.
- Parameters:
- entity
PostEntity Request body describing the entity to create.
- entity
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
entity (PostEntity)
- Return type:
- create_item_plugin_field_row(*, itemtype, items_id, container_id, container_name, values, entities_id=None)
Create one fresh plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item the row is attached to.
- container_id
int Identifier of the originating
GetPluginFieldsContainer.- container_name
str Internal name of the container, used to derive the value itemtype.
- values
dict[str,object] Field-name → value mapping for the dynamic columns declared on the container.
- entities_id
int|None,optional Entity to associate the row with. When omitted the GLPI server applies its default scope.
- itemtype
- Returns:
intIdentifier of the newly created row.
- Parameters:
- Return type:
- create_location(location)
Create one GLPI location.
- Parameters:
- location
PostLocation Request body describing the location to create.
- location
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
location (PostLocation)
- Return type:
- create_ticket(ticket)
Create one GLPI ticket.
- Parameters:
- ticket
PostTicket Request body describing the ticket to create. Any extra fields are forwarded verbatim through
extra_payload.
- ticket
- Returns:
intIdentifier assigned by the GLPI server to the new ticket.
- Raises:
ValueErrorIf the create response is missing the
idfield or the HTTP status is not success.
- Parameters:
ticket (PostTicket)
- Return type:
- create_ticket_followup(ticket_id, followup)
Create one followup on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup
PostFollowup Request body describing the followup to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new followup.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
followup (PostFollowup)
- Return type:
- create_ticket_solution(ticket_id, solution)
Create one solution on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution
PostSolution Request body describing the solution to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new solution.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
solution (PostSolution)
- Return type:
- create_ticket_task(ticket_id, task)
Create one task on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task
PostTicketTask Request body describing the task to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new task.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
task (PostTicketTask)
- Return type:
- create_user(user)
Create one GLPI user.
- Parameters:
- user
PostUser Request body describing the user to create.
- user
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
user (PostUser)
- Return type:
- delete_document(document_id, *, force=None)
Delete one GLPI document by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_entity(entity_id, *, force=None)
Delete one GLPI entity by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_location(location_id, *, force=None)
Delete one GLPI location by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket(ticket_id, *, force=None)
Delete one GLPI ticket by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket_followup(ticket_id, followup_id, *, force=None)
Delete one ticket followup by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket_solution(ticket_id, solution_id, *, force=None)
Delete one ticket solution by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_ticket_task(ticket_id, task_id, *, force=None)
Delete one ticket task by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- delete_user(user_id, *, force=None)
Delete one GLPI user by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- download_document_content(document_id)
Download the raw binary payload for one GLPI document.
- Parameters:
- document_id
GlpiId Numeric identifier of the document whose binary content is requested.
- document_id
- Returns:
bytesRaw bytes returned by the GLPI download endpoint.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- 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:
- env
Mapping[str,str] |None,optional Mapping the helper reads values from. Defaults to
os.environ.- prefix
str,optional Common prefix shared by every environment variable name.
- **overrides
object Keyword overrides forwarded to
__init__(). The asynchronous client accepts an additionalexecutorkeyword here.
- env
- Returns:
SelfA fully configured client ready to perform requests.
- Raises:
ValueErrorIf the resolved configuration is missing a required field.
- Parameters:
- Return type:
Self
- get_document(document_id)
Fetch one GLPI document by identifier.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to retrieve.
- document_id
- Returns:
GetDocumentValidated document metadata payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- get_entity(entity_id)
Fetch one GLPI entity by identifier.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to retrieve.
- entity_id
- Returns:
GetEntityValidated entity payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
- Return type:
- get_location(location_id)
Fetch one GLPI location by identifier.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to retrieve.
- location_id
- Returns:
GetLocationValidated location payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
- Return type:
- get_task_durations(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, user_id=None, user_editor_id=None, user_recipient_id=None, extra_filter=None, return_task_details=False)
Return task duration totals with optional per-task detail.
Builds an RSQL filter from the supplied parameters, collects all matching tickets by iterating
iter_search_tickets(), computesduration_by_entityby groupingget_task_statistics()results against the per-ticket entity map, and optionally returns a flat list of individual task records.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00). Defaults toend_date - default_days + 1when omitted.- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (defaults to 30 and must be a positive integer).- entity_id
int|None,optional Restrict to tickets in this entity.
- entity_name
str|None,optional Resolve entity by name and restrict to matched entities (ignored when
entity_idis given).- user_id
int|None,optional Restrict to tickets where the user is an assignee or requester (OR semantics across both roles).
- user_editor_id
int|None,optional Restrict to tickets last updated by this user.
- user_recipient_id
int|None,optional Restrict to tickets where this user is the requester.
- extra_filter
str|None,optional Optional raw RSQL fragment appended as an AND clause.
- return_task_detailsbool,
optional When
True, include ataskslist of individual task records in the returned mapping (defaultFalse).
- start_date
- Returns:
TaskDurationsResultMapping with
start_date,end_date,total_duration,task_count,duration_by_user,duration_by_entity, andtasks(Nonewhenreturn_task_details=False).
- Raises:
ValueErrorIf
default_days < 1orstart_date > end_date.
- Parameters:
- Return type:
TaskDurationsResult
- get_task_statistics(ticket_ids)
Return task duration totals grouped by user and ticket.
The helper expects a list of ticket identifiers because GLPI does not publish a global task collection endpoint. Callers typically gather the relevant ticket identifiers through
search_ticketsfirst.- Parameters:
- Returns:
TaskStatisticsResultMapping with
ticket_count,task_count,total_duration,duration_by_user, andduration_by_ticketentries (durations are integer seconds, matching the GLPIdurationfield).
- Parameters:
- Return type:
TaskStatisticsResult
- get_ticket(ticket_id)
Fetch one GLPI ticket by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to retrieve.
- ticket_id
- Returns:
GetTicketValidated ticket payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- get_ticket_context(ticket_id)
Return one aggregated ticket context view.
The primary ticket fetch and the four timeline list calls are executed sequentially in this synchronous implementation.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to assemble.
- ticket_id
- Returns:
GlpiTicketContextAggregated view bundling the primary ticket together with its tasks, followups, solutions, and timeline document links.
- Raises:
ValueErrorIf any of the underlying GLPI calls returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- get_ticket_custom_fields(ticket_id)
Return the custom-field values defined for one ticket.
The result is a nested mapping shaped as
{container_name: {field_name: value, ...}}. Containers that do not yet have a persisted value row for the ticket are skipped.
- get_ticket_followup(ticket_id, followup_id)
Fetch one ticket followup by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to retrieve.
- ticket_id
- Returns:
GetFollowupValidated followup payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_ticket_solution(ticket_id, solution_id)
Fetch one ticket solution by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to retrieve.
- ticket_id
- Returns:
GetSolutionValidated solution payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_ticket_statistics(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, extra_filter=None)
Return ticket counts grouped by entity, status, priority, and type.
The date window is applied to the GLPI
date_creationfield and results are aggregated locally in Python. Returned identifiers are the raw GLPI numeric values that callers can resolve with the dedicatedsearch_*helpers when human labels are needed.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00). Defaults toend_date - default_days + 1when omitted.- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (defaults to 30 and must be a positive integer).- entity_id
int|None,optional When provided, restricts results to tickets belonging to the entity with this GLPI identifier.
- entity_name
str|None,optional When provided (and
entity_idisNone), the name is resolved viasearch_entitiesand the matched entity IDs are used to filter tickets. If no entity matches,{"entities": {}}is returned immediately.- extra_filter
str|None,optional Optional raw RSQL fragment to
ANDwith the date window on the server side.
- start_date
- Returns:
- Raises:
ValueErrorIf
default_days < 1orstart_date > end_date.
- Parameters:
- Return type:
- get_ticket_task(ticket_id, task_id)
Fetch one ticket task by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to retrieve.
- ticket_id
- Returns:
GetTicketTaskValidated task payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_ticket_timeline_document(ticket_id, document_link_id)
Fetch one document linked to the ticket timeline by its document ID.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the linked document to retrieve.
- ticket_id
- Returns:
GetDocumentValidated document payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- get_user(user_id)
Fetch one GLPI user by identifier.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to retrieve.
- user_id
- Returns:
GetUserValidated user payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
user_id (int)
- Return type:
- get_user_activity(*, user_id=None, username=None, realname=None, firstname=None, start_date=None, end_date=None, default_days=30)
Return per-user GLPI activity aggregated across tickets and tasks.
Aggregates tickets where each matched user is an assignee, tickets where the user is a requester, and task durations over the requested date window. When multiple users resolve to the same display key their results are merged.
- Parameters:
- user_id
int|None,optional Identify the user by GLPI numeric identifier.
- username
str|None,optional Filter by username (substring match).
- realname
str|None,optional Filter by family name (substring match).
- firstname
str|None,optional Filter by given name (substring match).
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the activity window (inclusive from 00:00:00).- end_date
str|None,optional ISO
YYYY-MM-DDend of the activity window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (default 30).
- user_id
- Returns:
UserActivityResultMapping with one
userskey. Each user key maps to aUserActivityEntrywithuser_ids,tickets_as_technician,tickets_as_recipient, andtask_durations.
- Raises:
ValueErrorIf none of
user_id,username,realname, orfirstnameare supplied, or if the supplied criteria match no GLPI users.
- Parameters:
- Return type:
UserActivityResult
- iter_search_entities(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI entities until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page. Entity calls bypass theGLPI-Entityheader so cross-entity lookups remain possible.- Parameters:
- Yields:
- Parameters:
- Return type:
- iter_search_tickets(rsql_filter='', *, batch_size=50, sort=None, fields=())
Yield successive pages of GLPI tickets until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible ticket.- batch_size
int,optional Number of records requested per page (default 50). Acts as the
limitparameter on each underlyingsearch_tickets()call.- sort
str|None,optional sortquery parameter forwarded as-is to each page request.- fields
tuple[str, …],optional Restricted set of contract field names to request.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- iter_search_users(rsql_filter='', *, batch_size=50, skip_entity=False)
Yield successive pages of GLPI users until exhausted.
The generator drives pagination automatically by advancing the
startoffset after each batch. Iteration stops when the server returns fewer items thanbatch_size, which signals the last page.- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible user.- batch_size
int,optional Number of records requested per page (default 50).
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- link_ticket_timeline_document(ticket_id, document_link)
Link an existing GLPI document to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link
PostTimelineDocument Request body describing the link (typically the timeline position; document and ticket identifiers are inferred from the URL).
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new link.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
document_link (PostTimelineDocument)
- Return type:
- list_item_plugin_field_rows(itemtype, items_id, container_name)
List the value rows of one container for one parent item.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item.
- container_name
str Internal name of the container as exposed by
GetPluginFieldsContainer.name.
- itemtype
- Returns:
list[GetPluginFieldsValueRow]Zero or one row depending on whether the plugin has already persisted any value for this item.
- Parameters:
- Return type:
- list_plugin_fields_containers(itemtype=None)
List
PluginFieldsContainerrows registered on the server.- Parameters:
- Returns:
list[GetPluginFieldsContainer]Containers visible to the authenticated user.
- Parameters:
itemtype (str | None)
- Return type:
- list_plugin_fields_fields(container_id=None)
List
PluginFieldsFielddeclarations.- Parameters:
- Returns:
list[GetPluginFieldsField]Field declarations visible to the authenticated user.
- Parameters:
container_id (int | None)
- Return type:
- list_ticket_followups(ticket_id)
List all followups linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetFollowup]Followups returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_solutions(ticket_id)
List all solutions linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetSolution]Solutions returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_tasks(ticket_id)
List all tasks linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetTicketTask]Tasks returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_team_members(ticket_id)
List the team members currently linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket whose team members are listed.
- ticket_id
- Returns:
list[GetTeamMember]Team members validated against the contract
TeamMemberschema.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- list_ticket_timeline_documents(ticket_id)
List all documents linked to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetDocument]Document records returned by the GLPI server. The live API wraps each entry in a
{"type": "Document_Item", "item": {...}}envelope whoseitemvalue is a fullDocumentrecord; the envelope is unwrapped automatically.
- Parameters:
ticket_id (int)
- Return type:
- remove_ticket_team_member(ticket_id, member)
Remove one team member from a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket the member belongs to.
- member
PostTeamMember Request body identifying the member to remove (same shape as
add_ticket_team_member()).
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- search_documents(rsql_filter='', *, limit=50, start=0)
Search GLPI documents with an optional raw RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL expression forwarded to the
filterquery parameter (for example"name=='*manual*'"). When empty the parameter is omitted and the server returns its default paginated listing.- limit
int,optional Maximum number of records to return (defaults to 50).
- start
int,optional Zero-based offset for pagination (defaults to 0).
- rsql_filter
- Returns:
list[GetDocument]Documents matching the filter window.
- Parameters:
- Return type:
- search_entities(rsql_filter='', *, limit=50, start=0)
Search GLPI entities with an optional RSQL filter.
- Parameters:
- Returns:
- Parameters:
- Return type:
- search_locations(rsql_filter='', *, limit=50, start=0)
Search GLPI locations with an optional RSQL filter.
- Parameters:
- Returns:
list[GetLocation]Locations matching the filter.
- Parameters:
- Return type:
- search_tickets(rsql_filter='', *, limit=50, start=0, sort=None, fields=())
Search GLPI tickets with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter (for example"name==hello"or"status==2"). Empty by default, which lists every visible ticket.- limit
int,optional Maximum number of records returned by the GLPI server in one request.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter forwarded as-is, e.g."date_mod desc".- fields
tuple[str, …],optional Restricted set of contract field names to request. Empty tuple lets the GLPI server pick its default field set.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- search_users(rsql_filter='', *, limit=50, start=0, skip_entity=False)
Search GLPI users with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter, for example"username==alice". Empty by default.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- 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
ValueErrorbefore any write to keep the call atomic from the caller’s perspective.- Parameters:
- ticket_id
int Identifier of the ticket whose custom values must be set.
- values
dict[str,dict[str,Any]] Nested mapping
{container_name: {field_name: value}}describing the columns to write. Container and field names must match whatlist_plugin_fields_containers()andlist_plugin_fields_fields()return.
- ticket_id
- Parameters:
- Return type:
None
- unlink_ticket_timeline_document(ticket_id, document_link_id, *, force=None)
Unlink one timeline document from a ticket.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- update_document(document_id, document)
Update one GLPI document with a partial body.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to update.
- document
PatchDocument Partial request body.
- document_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
document (PatchDocument)
- Return type:
None
- update_entity(entity_id, entity)
Update one GLPI entity with a partial body.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to update.
- entity
PatchEntity Partial request body.
- entity_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
entity (PatchEntity)
- Return type:
None
- update_item_plugin_field_row(*, itemtype, container_name, row_id, values)
Update one existing plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype the container is attached to.
- container_name
str Internal name of the container.
- row_id
int Identifier of the existing value row (as returned by
list_item_plugin_field_rows()).- values
dict[str,object] Field-name → value mapping for the columns to update. Only the fields supplied here are touched; the others keep their previous value.
- itemtype
- Parameters:
- Return type:
None
- update_location(location_id, location)
Update one GLPI location with a partial body.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to update.
- location
PatchLocation Partial request body.
- location_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
location (PatchLocation)
- Return type:
None
- update_ticket(ticket_id, ticket)
Update one GLPI ticket with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to update.
- ticket
PatchTicket Partial request body. Only fields explicitly set are sent.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
ticket (PatchTicket)
- Return type:
None
- update_ticket_followup(ticket_id, followup_id, followup)
Update one ticket followup with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to update.
- followup
PatchFollowup Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
followup_id (int)
followup (PatchFollowup)
- Return type:
None
- update_ticket_solution(ticket_id, solution_id, solution)
Update one ticket solution with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to update.
- solution
PatchSolution Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
solution_id (int)
solution (PatchSolution)
- Return type:
None
- update_ticket_task(ticket_id, task_id, task)
Update one ticket task with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to update.
- task
PatchTicketTask Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
task_id (int)
task (PatchTicketTask)
- Return type:
None
- update_ticket_timeline_document(ticket_id, document_link_id, document_link)
Update one timeline document link with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the timeline document link to update.
- document_link
PatchTimelineDocument Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
document_link_id (int)
document_link (PatchTimelineDocument)
- Return type:
None
- update_user(user_id, user)
Update one GLPI user with a partial body.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to update.
- user
PatchUser Partial request body. Only fields explicitly set are sent.
- user_id
- Returns:
- Raises:
ValueErrorIf 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
AsyncGlpiClientoffloads this blocking call to a worker thread automatically; callers using the syncGlpiClientinvoke it directly.- Parameters:
- filename
str Name to advertise in the multipart form. Required and must be non-empty.
- content
bytes Raw binary payload to upload.
- mime_type
str,optional MIME type advertised in the multipart part (defaults to
application/octet-stream).- document_name
str|None,optional Human-readable display name. Defaults to
filenamewhen omitted.- ticket_id
int|None,optional Identifier of one ticket to attach the uploaded document to.
- entity_id
int|None,optional Identifier of one GLPI entity to scope the upload to.
- filename
- Returns:
- Raises:
ValueErrorIf
filenameis empty.RuntimeErrorIf the v1 session is not configured on the client.
- Parameters:
- Return type:
- class AsyncGlpiClient(*, executor=None, **kwargs)[source]
Bases:
AsyncBridge,AsyncPaginationMixin,TicketMixin,TicketTaskMixin,FollowupMixin,SolutionMixin,TimelineDocumentMixin,TeamMemberMixin,DocumentMixin,UserMixin,EntityMixin,LocationMixin,PluginFieldsMixin,AsyncTicketContextMixin,AsyncStatisticsMixin,_BaseGlpiClient,TransportMixinAsynchronous 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 isexecutor(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
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_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:
- executor
concurrent.futures.Executor|None,optional Optional executor every wrapped call is routed through. When
None(the default) the bridge falls back toasyncio.to_thread(), which uses the loop’s default thread pool executor. Supply a dedicatedconcurrent.futures.ThreadPoolExecutorwhen the application performs aggressive fan-outs that would otherwise saturate the default pool.- **kwargs
Any Remaining keyword arguments forwarded to
_BaseGlpiClient.
- executor
- 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
PluginFieldsContainerrows registered on the server.list_plugin_fields_fields([container_id])List
PluginFieldsFielddeclarations.list_ticket_followups(ticket_id)List all followups linked to one ticket.
list_ticket_solutions(ticket_id)List all solutions linked to one ticket.
list_ticket_tasks(ticket_id)List all tasks linked to one ticket.
list_ticket_team_members(ticket_id)List the team members currently linked to one ticket.
list_ticket_timeline_documents(ticket_id)List all documents linked to one ticket timeline.
remove_ticket_team_member(ticket_id, member)Remove one team member from a ticket.
search_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:
ValueErrorIf 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_id
GlpiId Numeric identifier of the ticket to receive the new member.
- member
PostTeamMember Request body describing the member. The
idfield is the target user/group/supplier identifier,typeis one of"User","Group"or"Supplier", androleis one of"requester","assigned"or"observer".
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- async close()[source]
Release every resource owned by the client.
The shared HTTP session is closed 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:
- document
PostDocument Request body describing the document metadata.
- document
- Returns:
intIdentifier assigned by the GLPI server to the new document.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
document (PostDocument)
- Return type:
- async create_entity(entity)
Create one GLPI entity.
- Parameters:
- entity
PostEntity Request body describing the entity to create.
- entity
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
entity (PostEntity)
- Return type:
- async create_item_plugin_field_row(*, itemtype, items_id, container_id, container_name, values, entities_id=None)
Create one fresh plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item the row is attached to.
- container_id
int Identifier of the originating
GetPluginFieldsContainer.- container_name
str Internal name of the container, used to derive the value itemtype.
- values
dict[str,object] Field-name → value mapping for the dynamic columns declared on the container.
- entities_id
int|None,optional Entity to associate the row with. When omitted the GLPI server applies its default scope.
- itemtype
- Returns:
intIdentifier of the newly created row.
- Parameters:
- Return type:
- async create_location(location)
Create one GLPI location.
- Parameters:
- location
PostLocation Request body describing the location to create.
- location
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
location (PostLocation)
- Return type:
- async create_ticket(ticket)
Create one GLPI ticket.
- Parameters:
- ticket
PostTicket Request body describing the ticket to create. Any extra fields are forwarded verbatim through
extra_payload.
- ticket
- Returns:
intIdentifier assigned by the GLPI server to the new ticket.
- Raises:
ValueErrorIf the create response is missing the
idfield or the HTTP status is not success.
- Parameters:
ticket (PostTicket)
- Return type:
- async create_ticket_followup(ticket_id, followup)
Create one followup on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup
PostFollowup Request body describing the followup to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new followup.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
followup (PostFollowup)
- Return type:
- async create_ticket_solution(ticket_id, solution)
Create one solution on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution
PostSolution Request body describing the solution to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new solution.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
solution (PostSolution)
- Return type:
- async create_ticket_task(ticket_id, task)
Create one task on a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task
PostTicketTask Request body describing the task to create.
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new task.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
task (PostTicketTask)
- Return type:
- async create_user(user)
Create one GLPI user.
- Parameters:
- user
PostUser Request body describing the user to create.
- user
- Returns:
intIdentifier assigned by the GLPI server.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
user (PostUser)
- Return type:
- async delete_document(document_id, *, force=None)
Delete one GLPI document by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_entity(entity_id, *, force=None)
Delete one GLPI entity by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_location(location_id, *, force=None)
Delete one GLPI location by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket(ticket_id, *, force=None)
Delete one GLPI ticket by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket_followup(ticket_id, followup_id, *, force=None)
Delete one ticket followup by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket_solution(ticket_id, solution_id, *, force=None)
Delete one ticket solution by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_ticket_task(ticket_id, task_id, *, force=None)
Delete one ticket task by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async delete_user(user_id, *, force=None)
Delete one GLPI user by identifier.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async download_document_content(document_id)
Download the raw binary payload for one GLPI document.
- Parameters:
- document_id
GlpiId Numeric identifier of the document whose binary content is requested.
- document_id
- Returns:
bytesRaw bytes returned by the GLPI download endpoint.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- 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:
- env
Mapping[str,str] |None,optional Mapping the helper reads values from. Defaults to
os.environ.- prefix
str,optional Common prefix shared by every environment variable name.
- **overrides
object Keyword overrides forwarded to
__init__(). The asynchronous client accepts an additionalexecutorkeyword here.
- env
- Returns:
SelfA fully configured client ready to perform requests.
- Raises:
ValueErrorIf 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_id
GlpiId Numeric identifier of the document to retrieve.
- document_id
- Returns:
GetDocumentValidated document metadata payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
- Return type:
- async get_entity(entity_id)
Fetch one GLPI entity by identifier.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to retrieve.
- entity_id
- Returns:
GetEntityValidated entity payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
- Return type:
- async get_location(location_id)
Fetch one GLPI location by identifier.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to retrieve.
- location_id
- Returns:
GetLocationValidated location payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
- Return type:
- async get_task_durations(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, user_id=None, user_editor_id=None, user_recipient_id=None, extra_filter=None, return_task_details=False)
Return task duration totals with concurrent per-ticket fetches.
Overrides the synchronous implementation so that when
return_task_details=Truethe per-ticketlist_ticket_tasks()calls are dispatched concurrently usingasyncio.gather(). The date-window, entity, and user filter logic is identical to the synchronous version.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00).- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (default 30).- entity_id
int|None,optional Restrict to tickets in this entity.
- entity_name
str|None,optional Resolve entity by name and restrict to matched entities.
- user_id
int|None,optional Restrict to tickets where the user is assignee or requester.
- user_editor_id
int|None,optional Restrict to tickets last updated by this user.
- user_recipient_id
int|None,optional Restrict to tickets where this user is the requester.
- extra_filter
str|None,optional Optional raw RSQL fragment appended as an AND clause.
- return_task_detailsbool,
optional When
True, fan-out per-ticket task fetches concurrently and include ataskslist in the result.
- start_date
- Returns:
TaskDurationsResultSame shape as the synchronous
get_task_durations().
- Parameters:
- Return type:
TaskDurationsResult
- async get_task_statistics(ticket_ids)
Return task duration totals with concurrent per-ticket fetches.
- Parameters:
- Returns:
TaskStatisticsResultMapping with
ticket_count,task_count,total_duration,duration_by_user, andduration_by_ticketentries.
- Parameters:
- Return type:
TaskStatisticsResult
- async get_ticket(ticket_id)
Fetch one GLPI ticket by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to retrieve.
- ticket_id
- Returns:
GetTicketValidated ticket payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- async get_ticket_context(ticket_id)
Return one aggregated ticket context with concurrent fan-out.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to assemble.
- ticket_id
- Returns:
GlpiTicketContextAggregated view bundling the primary ticket together with its tasks, followups, solutions, and timeline document links.
- Raises:
ValueErrorIf any of the underlying GLPI calls returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- async get_ticket_custom_fields(ticket_id)
Return the custom-field values defined for one ticket.
The result is a nested mapping shaped as
{container_name: {field_name: value, ...}}. Containers that do not yet have a persisted value row for the ticket are skipped.
- async get_ticket_followup(ticket_id, followup_id)
Fetch one ticket followup by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to retrieve.
- ticket_id
- Returns:
GetFollowupValidated followup payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_ticket_solution(ticket_id, solution_id)
Fetch one ticket solution by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to retrieve.
- ticket_id
- Returns:
GetSolutionValidated solution payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_ticket_statistics(*, start_date=None, end_date=None, default_days=30, entity_id=None, entity_name=None, extra_filter=None)
Return ticket counts grouped by entity, status, priority, and type.
Async override of
StatisticsMixin.get_ticket_statistics(). The synchronous base runs in a worker thread whereself.search_ticketsandself.search_entitiesresolve to bridge-wrapped coroutines that would be silently dropped. This override awaits those calls directly on the event loop instead.- Parameters:
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the window (inclusive from 00:00:00).- end_date
str|None,optional ISO
YYYY-MM-DDend of the window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (default 30).- entity_id
int|None,optional Restrict to tickets in this entity.
- entity_name
str|None,optional Resolve entity by name and restrict to matched entities.
- extra_filter
str|None,optional Optional raw RSQL fragment appended as an AND clause.
- start_date
- Returns:
dict[str,object]Same shape as the synchronous
get_ticket_statistics().
- Raises:
ValueErrorIf
default_days < 1orstart_date > end_date.
- Parameters:
- Return type:
- async get_ticket_task(ticket_id, task_id)
Fetch one ticket task by identifier.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to retrieve.
- ticket_id
- Returns:
GetTicketTaskValidated task payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_ticket_timeline_document(ticket_id, document_link_id)
Fetch one document linked to the ticket timeline by its document ID.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the linked document to retrieve.
- ticket_id
- Returns:
GetDocumentValidated document payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
- async get_user(user_id)
Fetch one GLPI user by identifier.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to retrieve.
- user_id
- Returns:
GetUserValidated user payload.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
user_id (int)
- Return type:
- async get_user_activity(*, user_id=None, username=None, realname=None, firstname=None, start_date=None, end_date=None, default_days=30)
Return per-user GLPI activity aggregated across tickets and tasks.
Async override of
StatisticsMixin.get_user_activity(). The synchronous base callsself.search_users,self.iter_search_tickets, andself.get_task_durationsthroughself, which on the async client resolve to bridge-wrapped coroutines. This override awaits those calls and usesasync foron the async generator.- Parameters:
- user_id
int|None,optional Identify the user by GLPI numeric identifier.
- username
str|None,optional Filter by username (substring match).
- realname
str|None,optional Filter by family name (substring match).
- firstname
str|None,optional Filter by given name (substring match).
- start_date
str|None,optional ISO
YYYY-MM-DDstart of the activity window (inclusive from 00:00:00).- end_date
str|None,optional ISO
YYYY-MM-DDend of the activity window (inclusive through 23:59:59). Defaults to today.- default_days
int,optional Span in days used when
start_dateis omitted (default 30).
- user_id
- Returns:
UserActivityResultSame shape as the synchronous
get_user_activity().
- Raises:
ValueErrorIf none of
user_id,username,realname, orfirstnameare supplied, or if the supplied criteria match no GLPI users.
- Parameters:
- Return type:
UserActivityResult
- async iter_search_entities(rsql_filter='', *, batch_size=50)
Yield successive pages of GLPI entities until exhausted.
- Parameters:
- Yields:
- Parameters:
- Return type:
- async iter_search_tickets(rsql_filter='', *, batch_size=50, sort=None, fields=())
Yield successive pages of GLPI tickets until exhausted.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible ticket.- batch_size
int,optional Number of records requested per page (default 50).
- sort
str|None,optional sortquery parameter forwarded as-is to each page request.- fields
tuple[str, …],optional Restricted set of contract field names to request.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- async iter_search_users(rsql_filter='', *, batch_size=50, skip_entity=False)
Yield successive pages of GLPI users until exhausted.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter. Empty by default, which lists every visible user.- batch_size
int,optional Number of records requested per page (default 50).
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Yields:
- Parameters:
- Return type:
- async link_ticket_timeline_document(ticket_id, document_link)
Link an existing GLPI document to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link
PostTimelineDocument Request body describing the link (typically the timeline position; document and ticket identifiers are inferred from the URL).
- ticket_id
- Returns:
intIdentifier assigned by the GLPI server to the new link.
- Raises:
ValueErrorIf the create response is missing
idor returns a non-success HTTP status.
- Parameters:
ticket_id (int)
document_link (PostTimelineDocument)
- Return type:
- async list_item_plugin_field_rows(itemtype, items_id, container_name)
List the value rows of one container for one parent item.
- Parameters:
- itemtype
str Parent itemtype (e.g.
"Ticket").- items_id
int Identifier of the parent item.
- container_name
str Internal name of the container as exposed by
GetPluginFieldsContainer.name.
- itemtype
- Returns:
list[GetPluginFieldsValueRow]Zero or one row depending on whether the plugin has already persisted any value for this item.
- Parameters:
- Return type:
- async list_plugin_fields_containers(itemtype=None)
List
PluginFieldsContainerrows registered on the server.- Parameters:
- Returns:
list[GetPluginFieldsContainer]Containers visible to the authenticated user.
- Parameters:
itemtype (str | None)
- Return type:
- async list_plugin_fields_fields(container_id=None)
List
PluginFieldsFielddeclarations.- Parameters:
- Returns:
list[GetPluginFieldsField]Field declarations visible to the authenticated user.
- Parameters:
container_id (int | None)
- Return type:
- async list_ticket_followups(ticket_id)
List all followups linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetFollowup]Followups returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_solutions(ticket_id)
List all solutions linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetSolution]Solutions returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_tasks(ticket_id)
List all tasks linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetTicketTask]Tasks returned by the GLPI server, with the timeline envelope unwrapped where present.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_team_members(ticket_id)
List the team members currently linked to one ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket whose team members are listed.
- ticket_id
- Returns:
list[GetTeamMember]Team members validated against the contract
TeamMemberschema.
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
- Return type:
- async list_ticket_timeline_documents(ticket_id)
List all documents linked to one ticket timeline.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- ticket_id
- Returns:
list[GetDocument]Document records returned by the GLPI server. The live API wraps each entry in a
{"type": "Document_Item", "item": {...}}envelope whoseitemvalue is a fullDocumentrecord; the envelope is unwrapped automatically.
- Parameters:
ticket_id (int)
- Return type:
- async remove_ticket_team_member(ticket_id, member)
Remove one team member from a ticket.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket the member belongs to.
- member
PostTeamMember Request body identifying the member to remove (same shape as
add_ticket_team_member()).
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
member (PostTeamMember)
- Return type:
None
- async search_documents(rsql_filter='', *, limit=50, start=0)
Search GLPI documents with an optional raw RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL expression forwarded to the
filterquery parameter (for example"name=='*manual*'"). When empty the parameter is omitted and the server returns its default paginated listing.- limit
int,optional Maximum number of records to return (defaults to 50).
- start
int,optional Zero-based offset for pagination (defaults to 0).
- rsql_filter
- Returns:
list[GetDocument]Documents matching the filter window.
- Parameters:
- Return type:
- async search_entities(rsql_filter='', *, limit=50, start=0)
Search GLPI entities with an optional RSQL filter.
- Parameters:
- Returns:
- Parameters:
- Return type:
- async search_locations(rsql_filter='', *, limit=50, start=0)
Search GLPI locations with an optional RSQL filter.
- Parameters:
- Returns:
list[GetLocation]Locations matching the filter.
- Parameters:
- Return type:
- async search_tickets(rsql_filter='', *, limit=50, start=0, sort=None, fields=())
Search GLPI tickets with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter (for example"name==hello"or"status==2"). Empty by default, which lists every visible ticket.- limit
int,optional Maximum number of records returned by the GLPI server in one request.
- start
int,optional Zero-based offset of the first record returned.
- sort
str|None,optional sortquery parameter forwarded as-is, e.g."date_mod desc".- fields
tuple[str, …],optional Restricted set of contract field names to request. Empty tuple lets the GLPI server pick its default field set.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- async search_users(rsql_filter='', *, limit=50, start=0, skip_entity=False)
Search GLPI users with an optional RSQL filter.
- Parameters:
- rsql_filter
str,optional Raw RSQL filter forwarded as the
filterquery parameter, for example"username==alice". Empty by default.- limit
int,optional Maximum number of records returned by the GLPI server.
- start
int,optional Zero-based offset of the first record returned.
- skip_entitybool,
optional When
TruetheGLPI-Entityheader is omitted so the search spans every entity the caller has access to.
- rsql_filter
- Returns:
- Parameters:
- Return type:
- 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
ValueErrorbefore any write to keep the call atomic from the caller’s perspective.- Parameters:
- ticket_id
int Identifier of the ticket whose custom values must be set.
- values
dict[str,dict[str,Any]] Nested mapping
{container_name: {field_name: value}}describing the columns to write. Container and field names must match whatlist_plugin_fields_containers()andlist_plugin_fields_fields()return.
- ticket_id
- Parameters:
- Return type:
None
- async unlink_ticket_timeline_document(ticket_id, document_link_id, *, force=None)
Unlink one timeline document from a ticket.
- Parameters:
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
- Return type:
None
- async update_document(document_id, document)
Update one GLPI document with a partial body.
- Parameters:
- document_id
GlpiId Numeric identifier of the document to update.
- document
PatchDocument Partial request body.
- document_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
document_id (int)
document (PatchDocument)
- Return type:
None
- async update_entity(entity_id, entity)
Update one GLPI entity with a partial body.
- Parameters:
- entity_id
GlpiId Numeric identifier of the entity to update.
- entity
PatchEntity Partial request body.
- entity_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
entity_id (int)
entity (PatchEntity)
- Return type:
None
- async update_item_plugin_field_row(*, itemtype, container_name, row_id, values)
Update one existing plugin-fields value row.
- Parameters:
- itemtype
str Parent itemtype the container is attached to.
- container_name
str Internal name of the container.
- row_id
int Identifier of the existing value row (as returned by
list_item_plugin_field_rows()).- values
dict[str,object] Field-name → value mapping for the columns to update. Only the fields supplied here are touched; the others keep their previous value.
- itemtype
- Parameters:
- Return type:
None
- async update_location(location_id, location)
Update one GLPI location with a partial body.
- Parameters:
- location_id
GlpiId Numeric identifier of the location to update.
- location
PatchLocation Partial request body.
- location_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
location_id (int)
location (PatchLocation)
- Return type:
None
- async update_ticket(ticket_id, ticket)
Update one GLPI ticket with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the ticket to update.
- ticket
PatchTicket Partial request body. Only fields explicitly set are sent.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
ticket (PatchTicket)
- Return type:
None
- async update_ticket_followup(ticket_id, followup_id, followup)
Update one ticket followup with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- followup_id
GlpiId Numeric identifier of the followup to update.
- followup
PatchFollowup Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
followup_id (int)
followup (PatchFollowup)
- Return type:
None
- async update_ticket_solution(ticket_id, solution_id, solution)
Update one ticket solution with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- solution_id
GlpiId Numeric identifier of the solution to update.
- solution
PatchSolution Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
solution_id (int)
solution (PatchSolution)
- Return type:
None
- async update_ticket_task(ticket_id, task_id, task)
Update one ticket task with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- task_id
GlpiId Numeric identifier of the task to update.
- task
PatchTicketTask Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
task_id (int)
task (PatchTicketTask)
- Return type:
None
- async update_ticket_timeline_document(ticket_id, document_link_id, document_link)
Update one timeline document link with a partial body.
- Parameters:
- ticket_id
GlpiId Numeric identifier of the parent ticket.
- document_link_id
GlpiId Numeric identifier of the timeline document link to update.
- document_link
PatchTimelineDocument Partial request body.
- ticket_id
- Returns:
- Raises:
ValueErrorIf the GLPI server returns a non-success HTTP status.
- Parameters:
ticket_id (int)
document_link_id (int)
document_link (PatchTimelineDocument)
- Return type:
None
- async update_user(user_id, user)
Update one GLPI user with a partial body.
- Parameters:
- user_id
GlpiId Numeric identifier of the user to update.
- user
PatchUser Partial request body. Only fields explicitly set are sent.
- user_id
- Returns:
- Raises:
ValueErrorIf 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
AsyncGlpiClientoffloads this blocking call to a worker thread automatically; callers using the syncGlpiClientinvoke it directly.- Parameters:
- filename
str Name to advertise in the multipart form. Required and must be non-empty.
- content
bytes Raw binary payload to upload.
- mime_type
str,optional MIME type advertised in the multipart part (defaults to
application/octet-stream).- document_name
str|None,optional Human-readable display name. Defaults to
filenamewhen omitted.- ticket_id
int|None,optional Identifier of one ticket to attach the uploaded document to.
- entity_id
int|None,optional Identifier of one GLPI entity to scope the upload to.
- filename
- Returns:
- Raises:
ValueErrorIf
filenameis empty.RuntimeErrorIf the v1 session is not configured on the client.
- Parameters:
- Return type:
- class AsyncBridge[source]
Bases:
objectBase 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.Executorinstance to_executorto route every wrapped call through a dedicated pool. When_executorisNonethe bridge falls back toasyncio.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:
GlpiModelGrouped public ticket context returned by ticket-context workflows.
- Parameters:
- ticket
GetTicket Primary ticket record returned by the GLPI API.
- tasks
list[GetTicketTask],optional Linked task records.
- followups
list[GetFollowup],optional Linked followup records.
- solutions
list[GetSolution],optional Linked solution records.
- documents
list[GetDocument],optional Linked document records.
- ticket
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
ticket (GetTicket)
tasks (list[GetTicketTask])
followups (list[GetFollowup])
solutions (list[GetSolution])
documents (list[GetDocument])
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
to_markdown([options])Render the ticket and its timeline as one Markdown transcript.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
ticket (GetTicket)
tasks (list[GetTicketTask])
followups (list[GetFollowup])
solutions (list[GetSolution])
documents (list[GetDocument])
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
to_markdown([options])Render the ticket and its timeline as one Markdown transcript.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- documents: list[GetDocument]
- followups: list[GetFollowup]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- solutions: list[GetSolution]
- tasks: list[GetTicketTask]
- to_markdown(options=None)[source]
Render the ticket and its timeline as one Markdown transcript.
The rendering starts with the ticket title, then a compact subtitle line containing the requester, last editor, and the key timestamps exposed by the public ticket model. The ticket body is separated from the timeline itself, and each followup, task, and solution receives its own heading plus a metadata subtitle. Timeline entries are always sorted by
date_creationso the transcript follows the actual chronology rather than the GLPI UI anchoring hints. Linked documents are still appended in a dedicated section because the document-link payload does not expose the same authoring metadata.- Parameters:
- options
TicketMarkdownOptions,optional Controls which sections and metadata fields are included in the output. When None (the default) a fresh
TicketMarkdownOptionsis used, which enables all sections and fields.
- options
- Returns:
strMarkdown transcript suitable for direct display or for forwarding into a downstream Markdown renderer. The string never ends with trailing whitespace.
- Parameters:
options (TicketMarkdownOptions | None)
- Return type:
- class TicketMarkdownOptions(include_description=True, include_followups=True, include_tasks=True, include_solutions=True, include_documents=True, show_status=True, show_requester=True, show_editor=True, show_dates=True, show_event_author=True, show_event_editor=True, show_event_dates=True, show_event_state=True, show_event_status=True, show_duration=True, show_technician=True, show_approver=True)[source]
Bases:
objectOptions controlling which sections and fields appear in the Markdown export.
All flags default to
Trueso that a bareto_markdown()call reproduces the original full output.- Parameters:
- include_descriptionbool
Emit the
## Descriptionsection with the ticket body.- include_followupsbool
Include followup entries in the
## Timelinesection.- include_tasksbool
Include task entries in the
## Timelinesection.- include_solutionsbool
Include solution entries in the
## Timelinesection.- include_documentsbool
Append the
## Documentssection with linked file references.- show_statusbool
Emit the
Statusfield in the ticket subtitle line.- show_requesterbool
Emit the
Requesterfield in the ticket subtitle line.- show_editorbool
Emit the
Last edited byfield in the ticket subtitle line.- show_datesbool
Emit all ticket-level date fields (created, updated, resolved, closed) in the ticket subtitle line.
- show_event_authorbool
Emit the
Created byfield in timeline-entry subtitle lines.- show_event_editorbool
Emit the
Last edited byfield in timeline-entry subtitle lines.- show_event_datesbool
Emit date fields (created, updated, scheduled, planned start/end, approved) in timeline-entry subtitle lines.
- show_event_statebool
Emit the
Statefield in timeline-entry subtitle lines.- show_event_statusbool
Emit the
Statusfield in timeline-entry subtitle lines.- show_durationbool
Emit the
Durationfield in task subtitle lines.- show_technicianbool
Emit the
TechnicianandTechnician groupfields in task subtitle lines.- show_approverbool
Emit the
Approverfield in solution subtitle lines.
- Parameters:
include_description (bool)
include_followups (bool)
include_tasks (bool)
include_solutions (bool)
include_documents (bool)
show_status (bool)
show_requester (bool)
show_editor (bool)
show_dates (bool)
show_event_author (bool)
show_event_editor (bool)
show_event_dates (bool)
show_event_state (bool)
show_event_status (bool)
show_duration (bool)
show_technician (bool)
show_approver (bool)
Common Reference Models
- class IdRef(*, extra_payload=<factory>, id=None, **extra_data)[source]
Bases:
GlpiModelForeign-key reference carrying only the GLPI identifier.
The GLPI write endpoints accept foreign-key values as
{"id": int}objects. Use this helper to build outgoing request bodies that target a related GLPI item.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class IdNameRef(*, extra_payload=<factory>, id=None, name=None, **extra_data)[source]
Bases:
GlpiModelForeign-key reference carrying both id and read-only name.
GLPI returns relationships as
{"id": int, "name": str}payloads on most endpoints. Thenamevalue is server-managed and is preserved here purely for read-side convenience.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class IdNameCompletenameRef(*, extra_payload=<factory>, id=None, name=None, completename=None, **extra_data)[source]
Bases:
GlpiModelForeign-key reference carrying id, name, and completename.
A few GLPI relationships, such as
Ticket.entity, surface a thirdcompletenameslot that holds the dotted hierarchical name.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Tickets
- class GetTicket(*, extra_payload=<factory>, id=None, name=None, content=None, user_recipient=None, user_editor=None, is_deleted=None, category=None, location=None, urgency=None, impact=None, priority=None, actiontime=None, begin_waiting_date=None, waiting_duration=None, resolution_duration=None, close_duration=None, resolution_date=None, date_creation=None, date_mod=None, date=None, date_solve=None, date_close=None, type=None, external_id=None, request_type=None, take_into_account_date=None, take_into_account_duration=None, sla_ttr=None, sla_tto=None, ola_ttr=None, ola_tto=None, sla_level_ttr=None, ola_level_ttr=None, sla_waiting_duration=None, ola_waiting_duration=None, ola_ttr_begin_date=None, ola_tto_begin_date=None, internal_resolution_date=None, internal_take_into_account_date=None, global_validation=None, status=None, entity=None, team=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Assistance/Ticketendpoints.Mirrors
components.schemas.Ticket. Fields markedreadOnlyin the contract are excluded from the write models.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Title of the ticket.
- content
GlpiMarkdownContent Body of the ticket exchanged as HTML over the wire (
format: html); transparent Markdown conversion is applied on the model boundary. Defaults toNone.- user_recipient
IdNameRef|None,optional Reference to the user designated as the ticket recipient (no contract description).
- user_editor
IdNameRef|None,optional Reference to the user who last edited the ticket.
- is_deletedbool |
None,optional Whether the ticket has been moved to the trash.
- category
IdNameRef|None,optional Reference to the ITIL category of the ticket.
- location
IdNameRef|None,optional Reference to the location associated with the ticket.
- urgency
GlpiPriority|None,optional Urgency level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- impact
GlpiPriority|None,optional Impact level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- priority
GlpiPriority|None,optional Computed or manually overridden priority (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- actiontime
int|None,optional Total action time in seconds (
readOnly).- begin_waiting_date
datetime|None,optional Timestamp at which the ticket entered the pending state (
readOnly).- waiting_duration
int|None,optional Total waiting duration in seconds (contract field
waiting_duration—Total waiting duration in seconds,readOnly).- resolution_duration
int|None,optional Total resolution duration in seconds (contract field
resolution_duration—Total resolution duration in seconds,readOnly).- close_duration
int|None,optional Total close duration in seconds (contract field
close_duration—Total close duration in seconds,readOnly).- resolution_date
datetime|None,optional Timestamp at which the ticket was resolved (
readOnly).- date_creation
datetime|None,optional Creation timestamp of the ticket record.
- date_mod
datetime|None,optional Last modification timestamp of the ticket record.
- date
datetime|None,optional Opening date of the ticket.
- date_solve
datetime|None,optional Date the ticket was marked as solved.
- date_close
datetime|None,optional Date the ticket was closed.
- type
GlpiTicketType|None,optional Ticket category (contract field
type—The type of the ticket; enumeration:1Incident,2Request).- external_id
str|None,optional Identifier assigned by an external system.
- request_type
IdNameRef|None,optional Reference to the request type or channel.
- take_into_account_date
datetime|None,optional Timestamp at which a technician first acknowledged the ticket (
readOnly).- take_into_account_duration
int|None,optional Total take-into-account duration in seconds (contract field
take_into_account_duration—Total take into account duration in seconds,readOnly).- sla_ttr
IdNameRef|None,optional SLA applied for time-to-resolve.
- sla_tto
IdNameRef|None,optional SLA applied for time-to-own.
- ola_ttr
IdNameRef|None,optional OLA applied for time-to-resolve.
- ola_tto
IdNameRef|None,optional OLA applied for time-to-own.
- sla_level_ttr
IdNameRef|None,optional SLA level escalation step for time-to-resolve.
- ola_level_ttr
IdNameRef|None,optional OLA level escalation step for time-to-resolve.
- sla_waiting_duration
int|None,optional Total SLA waiting duration in seconds (contract field
sla_waiting_duration—Total SLA waiting duration in seconds,readOnly).- ola_waiting_duration
int|None,optional Total OLA waiting duration in seconds (contract field
ola_waiting_duration—Total OLA waiting duration in seconds,readOnly).- ola_ttr_begin_date
datetime|None,optional Timestamp at which the OLA TTR clock started (
readOnly).- ola_tto_begin_date
datetime|None,optional Timestamp at which the OLA TTO clock started (
readOnly).- internal_resolution_date
datetime|None,optional Internal resolution date used for OLA computations (
readOnly; no contract description).- internal_take_into_account_date
datetime|None,optional Internal take-into-account date used for OLA computations (
readOnly).- global_validation
GlpiGlobalValidation|None,optional Aggregated validation status of the ticket (contract field
global_validation—The global status of the validation; enumeration:1None,2Waiting,3Accepted,4Refused).- status
IdNameRef|None,optional Current ticket status as an id/name reference.
- entity
IdNameCompletenameRef|None,optional Reference to the GLPI entity that owns the ticket.
- team
list[_TicketTeamMember] |None,optional Inline list of actors assigned to the ticket.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
content (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_recipient (IdNameRef | None)
user_editor (IdNameRef | None)
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
actiontime (int | None)
begin_waiting_date (datetime | None)
waiting_duration (int | None)
resolution_duration (int | None)
close_duration (int | None)
resolution_date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
take_into_account_date (datetime | None)
take_into_account_duration (int | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
sla_waiting_duration (int | None)
ola_waiting_duration (int | None)
ola_ttr_begin_date (datetime | None)
ola_tto_begin_date (datetime | None)
internal_resolution_date (datetime | None)
internal_take_into_account_date (datetime | None)
global_validation (GlpiGlobalValidation | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
team (list[_TicketTeamMember] | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
content (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_recipient (IdNameRef | None)
user_editor (IdNameRef | None)
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
actiontime (int | None)
begin_waiting_date (datetime | None)
waiting_duration (int | None)
resolution_duration (int | None)
close_duration (int | None)
resolution_date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
take_into_account_date (datetime | None)
take_into_account_duration (int | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
sla_waiting_duration (int | None)
ola_waiting_duration (int | None)
ola_ttr_begin_date (datetime | None)
ola_tto_begin_date (datetime | None)
internal_resolution_date (datetime | None)
internal_take_into_account_date (datetime | None)
global_validation (GlpiGlobalValidation | None)
status (IdNameRef | None)
entity (IdNameCompletenameRef | None)
team (list[_TicketTeamMember] | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- entity: IdNameCompletenameRef | None
- global_validation: GlpiGlobalValidation | None
- impact: GlpiPriority | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- priority: GlpiPriority | None
- type: GlpiTicketType | None
- urgency: GlpiPriority | None
- class PostTicket(*, extra_payload=<factory>, name=None, content=None, is_deleted=None, category=None, location=None, urgency=None, impact=None, priority=None, date_creation=None, date_mod=None, date=None, date_solve=None, date_close=None, type=None, external_id=None, request_type=None, sla_ttr=None, sla_tto=None, ola_ttr=None, ola_tto=None, sla_level_ttr=None, ola_level_ttr=None, global_validation=None, entity=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Assistance/Ticket.Read-only contract fields are excluded.
statusis also excluded because GLPI manages the ticket lifecycle through dedicated timeline routes (followups, solutions, validation).- Parameters:
- name
str|None,optional Title of the ticket.
- content
GlpiMarkdownContent Body of the ticket; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- is_deletedbool |
None,optional Whether to create the ticket in the trashed state.
- category
IdNameRef|None,optional Reference to the ITIL category of the ticket.
- location
IdNameRef|None,optional Reference to the location associated with the ticket.
- urgency
GlpiPriority|None,optional Urgency level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- impact
GlpiPriority|None,optional Impact level (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- priority
GlpiPriority|None,optional Priority override (contract enumeration:
1Very Low,2Low,3Medium,4High,5Very High).- date_creation
datetime|None,optional Creation timestamp to set on the ticket record.
- date_mod
datetime|None,optional Modification timestamp to set on the ticket record.
- date
datetime|None,optional Opening date to assign to the ticket.
- date_solve
datetime|None,optional Date to set as the solved timestamp.
- date_close
datetime|None,optional Date to set as the closed timestamp.
- type
GlpiTicketType|None,optional Ticket category (contract field
type—The type of the ticket; enumeration:1Incident,2Request).- external_id
str|None,optional Identifier assigned by an external system.
- request_type
IdNameRef|None,optional Reference to the request type or channel.
- sla_ttr
IdNameRef|None,optional SLA to apply for time-to-resolve.
- sla_tto
IdNameRef|None,optional SLA to apply for time-to-own.
- ola_ttr
IdNameRef|None,optional OLA to apply for time-to-resolve.
- ola_tto
IdNameRef|None,optional OLA to apply for time-to-own.
- sla_level_ttr
IdNameRef|None,optional SLA level escalation step for time-to-resolve.
- ola_level_ttr
IdNameRef|None,optional OLA level escalation step for time-to-resolve.
- global_validation
GlpiGlobalValidation|None,optional Aggregated validation status to set on the ticket (contract field
global_validation—The global status of the validation; enumeration:1None,2Waiting,3Accepted,4Refused).- entity
IdNameCompletenameRef|None,optional Reference to the GLPI entity that owns the ticket.
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- entity: IdNameCompletenameRef | None
- global_validation: GlpiGlobalValidation | None
- impact: GlpiPriority | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- priority: GlpiPriority | None
- type: GlpiTicketType | None
- urgency: GlpiPriority | None
- class PatchTicket(*, extra_payload=<factory>, name=None, content=None, is_deleted=None, category=None, location=None, urgency=None, impact=None, priority=None, date_creation=None, date_mod=None, date=None, date_solve=None, date_close=None, type=None, external_id=None, request_type=None, sla_ttr=None, sla_tto=None, ola_ttr=None, ola_tto=None, sla_level_ttr=None, ola_level_ttr=None, global_validation=None, entity=None, **extra_data)[source]
Bases:
PostTicketRequest body for
PATCH /Assistance/Ticket/{id}.The contract uses the same
Ticketschema for create and partial-update bodies;PatchTicketis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_deleted (bool | None)
category (IdNameRef | None)
location (IdNameRef | None)
urgency (GlpiPriority | None)
impact (GlpiPriority | None)
priority (GlpiPriority | None)
date_creation (datetime | None)
date_mod (datetime | None)
date (datetime | None)
date_solve (datetime | None)
date_close (datetime | None)
type (GlpiTicketType | None)
external_id (str | None)
request_type (IdNameRef | None)
sla_ttr (IdNameRef | None)
sla_tto (IdNameRef | None)
ola_ttr (IdNameRef | None)
ola_tto (IdNameRef | None)
sla_level_ttr (IdNameRef | None)
ola_level_ttr (IdNameRef | None)
global_validation (GlpiGlobalValidation | None)
entity (IdNameCompletenameRef | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- 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:
GlpiModelQuery parameters for
DELETE /Assistance/Ticket/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Followups
- class GetFollowup(*, extra_payload=<factory>, id=None, itemtype=None, items_id=None, content=None, is_private=None, user=None, user_editor=None, request_type=None, date=None, date_creation=None, date_mod=None, timeline_position=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline followup endpoints.Mirrors
components.schemas.Followup. Most fields carry nodescriptionin the contract;content(format: html) andtimeline_positionare notable exceptions.- Parameters:
- id
int|None,optional Native GLPI identifier of the followup (
readOnly).- itemtype
str|None,optional GLPI item type the followup belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- content
GlpiMarkdownContent Body of the followup exchanged as HTML over the wire (
format: html); transparent Markdown conversion is applied on the model boundary. Defaults toNone.- is_privatebool |
None,optional Whether the followup is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the followup.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the followup.
- request_type
IdNameRef|None,optional Reference to the request type or channel of the followup (no contract description).
- date
datetime|None,optional Date the followup was written.
- date_creation
datetime|None,optional Creation timestamp of the followup record.
- date_mod
datetime|None,optional Last modification timestamp of the followup record.
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the followup in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- source_item_id
int|None,optional Identifier of the source item that generated this followup, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this followup is a source (no contract description).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
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
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PostFollowup(*, extra_payload=<factory>, itemtype=None, items_id=None, content=None, is_private=None, user=None, user_editor=None, request_type=None, date=None, date_creation=None, date_mod=None, timeline_position=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline followup endpoints.Read-only contract field (
id) is excluded. All other fields fromcomponents.schemas.Followupare writable.- Parameters:
- itemtype
str|None,optional GLPI item type the followup belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- content
GlpiMarkdownContent Body of the followup; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- is_privatebool |
None,optional Whether the followup is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the followup.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the followup.
- request_type
IdNameRef|None,optional Reference to the request type or channel of the followup (no contract description).
- date
datetime|None,optional Date to assign to the followup.
- date_creation
datetime|None,optional Creation timestamp to set on the followup record.
- date_mod
datetime|None,optional Last modification timestamp to set on the followup record (no contract description).
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the followup in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- source_item_id
int|None,optional Identifier of the source item that generated this followup, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this followup is a source (no contract description).
- itemtype
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PatchFollowup(*, extra_payload=<factory>, itemtype=None, items_id=None, content=None, is_private=None, user=None, user_editor=None, request_type=None, date=None, date_creation=None, date_mod=None, timeline_position=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
PostFollowupRequest body for
PATCHon ticket timeline followup endpoints.Inherits all fields from
PostFollowup.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
request_type (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
timeline_position (GlpiTimelinePosition | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteFollowup(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline followup endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Tasks
- class GetTicketTask(*, extra_payload=<factory>, id=None, uuid=None, content=None, is_private=None, user=None, user_editor=None, user_tech=None, group_tech=None, date=None, date_creation=None, date_mod=None, duration=None, planned_begin=None, planned_end=None, state=None, category=None, timeline_position=None, tickets_id=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline task endpoints.Mirrors
components.schemas.TicketTask. Several fields carrydescriptionvalues in the contract; others are documented by field name and type.- Parameters:
- id
int|None,optional Native GLPI identifier of the task (
readOnly).- uuid
str|None,optional Server-generated universally unique identifier matching the pattern
/^[0-9a-f]{8}-...-4...-[89ab]...-...$/i(readOnly).- content
GlpiMarkdownContent Body of the task exchanged as HTML over the wire (
format: html); transparent Markdown conversion is applied on the model boundary. Defaults toNone.- is_privatebool |
None,optional Whether the task is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the task.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the task.
- user_tech
IdNameRef|None,optional Reference to the technician assigned to perform the task (no contract description).
- group_tech
IdNameRef|None,optional Reference to the group assigned to perform the task.
- date
datetime|None,optional Date the task was created.
- date_creation
datetime|None,optional Creation timestamp of the task record.
- date_mod
datetime|None,optional Last modification timestamp of the task record.
- duration
int|None,optional Time spent on the task in seconds.
- planned_begin
datetime|None,optional Planned start date and time for the task.
- planned_end
datetime|None,optional Planned end date and time for the task.
- state
GlpiTaskState|None,optional Completion state of the task (contract field
state—The state of the task; enumeration:0Information,1To do,2Done).- category
IdNameRef|None,optional Reference to the task category.
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the task in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- tickets_id
int|None,optional Identifier of the parent ticket.
- source_item_id
int|None,optional Identifier of the source item that generated this task, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this task is a source (no contract description).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
uuid (str | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
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
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: GlpiTaskState | None
- timeline_position: GlpiTimelinePosition | None
- class PostTicketTask(*, extra_payload=<factory>, content=None, is_private=None, user=None, user_editor=None, user_tech=None, group_tech=None, date=None, date_creation=None, date_mod=None, duration=None, planned_begin=None, planned_end=None, state=None, category=None, timeline_position=None, tickets_id=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline task endpoints.Read-only contract fields (
id,uuid) are excluded.- Parameters:
- content
GlpiMarkdownContent Body of the task; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- is_privatebool |
None,optional Whether the task is visible only to technicians.
- user
IdNameRef|None,optional Reference to the author of the task.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the task.
- user_tech
IdNameRef|None,optional Reference to the technician assigned to perform the task (no contract description).
- group_tech
IdNameRef|None,optional Reference to the group assigned to perform the task.
- date
datetime|None,optional Date to assign to the task.
- date_creation
datetime|None,optional Creation timestamp to set on the task record.
- date_mod
datetime|None,optional Last modification timestamp to set on the task record (no contract description).
- duration
int|None,optional Time spent on the task in seconds.
- planned_begin
datetime|None,optional Planned start date and time for the task.
- planned_end
datetime|None,optional Planned end date and time for the task.
- state
GlpiTaskState|None,optional Completion state of the task (contract field
state—The state of the task; enumeration:0Information,1To do,2Done).- category
IdNameRef|None,optional Reference to the task category.
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the task in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).- tickets_id
int|None,optional Identifier of the parent ticket.
- source_item_id
int|None,optional Identifier of the source item that generated this task, if any.
- source_of_item_id
int|None,optional Identifier of the item for which this task is a source (no contract description).
- content
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: GlpiTaskState | None
- timeline_position: GlpiTimelinePosition | None
- class PatchTicketTask(*, extra_payload=<factory>, content=None, is_private=None, user=None, user_editor=None, user_tech=None, group_tech=None, date=None, date_creation=None, date_mod=None, duration=None, planned_begin=None, planned_end=None, state=None, category=None, timeline_position=None, tickets_id=None, source_item_id=None, source_of_item_id=None, **extra_data)[source]
Bases:
PostTicketTaskRequest body for
PATCHon ticket timeline task endpoints.Inherits all fields from
PostTicketTask.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
is_private (bool | None)
user (IdNameRef | None)
user_editor (IdNameRef | None)
user_tech (IdNameRef | None)
group_tech (IdNameRef | None)
date (datetime | None)
date_creation (datetime | None)
date_mod (datetime | None)
duration (int | None)
planned_begin (datetime | None)
planned_end (datetime | None)
state (GlpiTaskState | None)
category (IdNameRef | None)
timeline_position (GlpiTimelinePosition | None)
tickets_id (int | None)
source_item_id (int | None)
source_of_item_id (int | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteTicketTask(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline task endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Solutions
- class GetSolution(*, extra_payload=<factory>, id=None, itemtype=None, items_id=None, type=None, content=None, user=None, user_editor=None, approver=None, status=None, approval_followup=None, date_creation=None, date_mod=None, date_approval=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline solution endpoints.Mirrors
components.schemas.Solution. Most fields carry nodescriptionin the contract;statusis a notable exception.- Parameters:
- id
int|None,optional Native GLPI identifier of the solution (
readOnly).- itemtype
str|None,optional GLPI item type the solution belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- type
IdNameRef|None,optional Reference to the solution type.
- content
GlpiMarkdownContent Body of the solution exchanged as HTML over the wire (
format: html); transparent Markdown conversion is applied on the model boundary. Defaults toNone.- user
IdNameRef|None,optional Reference to the author of the solution.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the solution.
- approver
IdNameRef|None,optional Reference to the user who approved or rejected the solution (no contract description).
- status
GlpiSolutionStatus|None,optional Approval state of the solution (contract field
status—The status of the solution; enumeration:1None,2Waiting,3Accepted,4Refused).- approval_followup
IdNameRef|None,optional Reference to the followup generated when the solution was approved or rejected.
- date_creation
datetime|None,optional Creation timestamp of the solution record.
- date_mod
datetime|None,optional Last modification timestamp of the solution record.
- date_approval
datetime|None,optional Timestamp at which the solution was approved or rejected (no contract description).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
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
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: GlpiSolutionStatus | None
- class PostSolution(*, extra_payload=<factory>, itemtype=None, items_id=None, type=None, content=None, user=None, user_editor=None, approver=None, status=None, approval_followup=None, date_creation=None, date_mod=None, date_approval=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline solution endpoints.Read-only contract field (
id) is excluded.- Parameters:
- itemtype
str|None,optional GLPI item type the solution belongs to, typically
"Ticket".- items_id
int|None,optional Identifier of the parent GLPI item.
- type
IdNameRef|None,optional Reference to the solution type.
- content
GlpiMarkdownContent Body of the solution; Markdown is converted to HTML on serialisation (
format: html). Defaults toNone.- user
IdNameRef|None,optional Reference to the author of the solution.
- user_editor
IdNameRef|None,optional Reference to the user who last edited the solution.
- approver
IdNameRef|None,optional Reference to the user who approved or rejected the solution (no contract description).
- status
GlpiSolutionStatus|None,optional Approval state of the solution (contract field
status—The status of the solution; enumeration:1None,2Waiting,3Accepted,4Refused).- approval_followup
IdNameRef|None,optional Reference to the followup generated when the solution was approved or rejected.
- date_creation
datetime|None,optional Creation timestamp to set on the solution record.
- date_mod
datetime|None,optional Last modification timestamp to set on the solution record (no contract description).
- date_approval
datetime|None,optional Timestamp at which the solution was approved or rejected (no contract description).
- itemtype
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- content: GlpiMarkdownContent
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: GlpiSolutionStatus | None
- class PatchSolution(*, extra_payload=<factory>, itemtype=None, items_id=None, type=None, content=None, user=None, user_editor=None, approver=None, status=None, approval_followup=None, date_creation=None, date_mod=None, date_approval=None, **extra_data)[source]
Bases:
PostSolutionRequest body for
PATCHon ticket timeline solution endpoints.Inherits all fields from
PostSolution.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
itemtype (str | None)
items_id (int | None)
type (IdNameRef | None)
content (Annotated[str | None, BeforeValidator(func=~glpi_python_client.models.api_schema._content._from_transport, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~glpi_python_client.models.api_schema._content._to_transport, return_type=str | None, when_used=always)])
user (IdNameRef | None)
user_editor (IdNameRef | None)
approver (IdNameRef | None)
status (GlpiSolutionStatus | None)
approval_followup (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_approval (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteSolution(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline solution endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Timeline — Documents
- class GetTimelineDocument(*, extra_payload=<factory>, id=None, itemtype=None, items_id=None, documents_id=None, filepath=None, timeline_position=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket timeline document endpoints.Mirrors
components.schemas.Document_Item. Most fields are markedreadOnlyin the contract and are never accepted on write requests. Onlytimeline_positionis writable.- Parameters:
- id
int|None,optional Native GLPI identifier of the document-item link (
readOnly).- itemtype
str|None,optional GLPI item type the document is attached to (
readOnly).- items_id
int|None,optional Identifier of the parent GLPI item (
readOnly).- documents_id
int|None,optional Identifier of the referenced
Documentrecord (readOnly; no contract description).- filepath
str|None,optional Server-managed storage path of the linked file (
readOnly; no contract description).- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the document in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PostTimelineDocument(*, extra_payload=<factory>, timeline_position=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket timeline document endpoints.All read-only contract fields (
id,itemtype,items_id,documents_id,filepath) are excluded; only the writabletimeline_positionfield is exposed.- Parameters:
- timeline_position
GlpiTimelinePosition|None,optional Horizontal position of the document in the GLPI ticket timeline widget (contract field
timeline_position—The position in the timeline; enumeration:0No timeline,1Not set,2Left,3Mid left,4Mid right,5Right).
- timeline_position
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timeline_position: GlpiTimelinePosition | None
- class PatchTimelineDocument(*, extra_payload=<factory>, timeline_position=None, **extra_data)[source]
Bases:
PostTimelineDocumentRequest body for
PATCHon ticket timeline document endpoints.Inherits the single writable field (
timeline_position) fromPostTimelineDocument.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
timeline_position (GlpiTimelinePosition | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteTimelineDocument(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETEon ticket timeline document endpoints.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Ticket Team Members
- class GetTeamMember(*, extra_payload=<factory>, id=None, name=None, type=None, role=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GETon ticket team-member endpoints.Mirrors
components.schemas.TeamMember. No field carries adescriptionin the OpenAPI contract; the parameters below are documented by field name and context.- Parameters:
- id
int|None,optional Native GLPI identifier of the team-member link (
readOnly).- name
str|None,optional Display name of the actor (typically the user or group name).
- type
str|None,optional GLPI actor type, such as
"User"or"Group".- role
str|None,optional Ticket role assigned to the actor, such as
"Requester","Observer"or"Assigned to".
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostTeamMember(*, extra_payload=<factory>, id=None, type=None, role=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POSTon ticket team-member endpoints.The contract marks
idasreadOnlyon the schema definition, but the live GLPI server still requires the target actor’sidto identify the team member, so the field is exposed here. No field carries adescriptionin the OpenAPI contract.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchTeamMember(*, extra_payload=<factory>, id=None, type=None, role=None, **extra_data)[source]
Bases:
PostTeamMemberRequest body for
PATCHon ticket team-member endpoints.Inherits all fields from
PostTeamMember.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteTeamMember(*, extra_payload=<factory>, **extra_data)[source]
Bases:
GlpiModelPlaceholder body for
DELETEon ticket team-member endpoints.The contract advertises the role, itemtype and user identifiers as path parameters and exposes no body or query parameters; this empty model is kept for parity with the rest of the
api_schemapackage.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Documents
- class GetDocument(*, extra_payload=<factory>, id=None, name=None, comment=None, entity=None, date_creation=None, date_mod=None, is_deleted=None, filename=None, filepath=None, mime=None, sha1sum=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Management/Documentendpoints.Mirrors
components.schemas.Document. No field carries adescriptionin the OpenAPI contract. Thefilepathfield is server-managed (readOnly).- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Display name of the document.
- comment
str|None,optional Free-form comment associated with the document.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- date_creation
datetime|None,optional Creation timestamp of the document record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the document record (
format: date-time).- is_deletedbool |
None,optional Whether the document has been moved to the trash.
- filename
str|None,optional Original file name of the uploaded file.
- filepath
str|None,optional Server-managed storage path of the file (
readOnly).- mime
str|None,optional MIME type of the uploaded file.
- sha1sum
str|None,optional SHA-1 checksum of the stored file, used for deduplication.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostDocument(*, extra_payload=<factory>, name=None, comment=None, entity=None, date_creation=None, date_mod=None, is_deleted=None, filename=None, mime=None, sha1sum=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Management/Document.Read-only contract fields (
id,filepath) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Display name of the document.
- comment
str|None,optional Free-form comment associated with the document.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- date_creation
datetime|None,optional Creation timestamp to set on the document record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the document record (
format: date-time).- is_deletedbool |
None,optional Whether to create the document in the trashed state.
- filename
str|None,optional Original file name of the uploaded file.
- mime
str|None,optional MIME type of the uploaded file.
- sha1sum
str|None,optional SHA-1 checksum of the stored file, used for deduplication.
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchDocument(*, extra_payload=<factory>, name=None, comment=None, entity=None, date_creation=None, date_mod=None, is_deleted=None, filename=None, mime=None, sha1sum=None, **extra_data)[source]
Bases:
PostDocumentRequest body for
PATCH /Management/Document/{id}.The contract uses the same
Documentschema for create and partial-update bodies;PatchDocumentis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteDocument(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Management/Document/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Users
- class GetUser(*, extra_payload=<factory>, id=None, username=None, realname=None, firstname=None, phone=None, phone2=None, mobile=None, emails=None, comment=None, is_active=None, is_deleted=None, picture=None, date_password_change=None, location=None, authtype=None, last_login=None, default_profile=None, default_entity=None, date_creation=None, date_mod=None, date_sync=None, title=None, category=None, registration_number=None, begin_date=None, end_date=None, nickname=None, substitution_start_date=None, substitution_end_date=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Administration/Userendpoints.Mirrors
components.schemas.User(GLPI description:Utilisateur). All fields are optional because the contract does not advertise arequiredarray; absent ornullvalues from the server are surfaced asNone. Credential fields are markedwriteOnlyin the contract and are therefore never returned by GET endpoints, so they are absent from this model.- Parameters:
- id
int|None,optional Native GLPI identifier (contract field
id—ID,readOnly).- username
str|None,optional Login name of the user (contract field
username—Username).- realname
str|None,optional Family name (contract field
realname—Real name).- firstname
str|None,optional Given name (contract field
firstname—First name).- phone
str|None,optional Primary phone number (contract field
phone—Phone number).- phone2
str|None,optional Secondary phone number (contract field
phone2—Phone number 2).- mobile
str|None,optional Mobile phone number (contract field
mobile—Mobile phone number).- emails
list[_EmailAddress] |None,optional Collection of e-mail addresses attached to the user (contract field
emails—Email addresses).- comment
str|None,optional Free-form comment associated with the user (contract field
comment—Comment).- is_activebool |
None,optional Whether the account is currently active (contract field
is_active—Is active).- is_deletedbool |
None,optional Whether the account has been moved to the trash (contract field
is_deleted—Is deleted).- picture
str|None,optional Path or identifier of the avatar picture (contract field
picture,readOnly).- date_password_change
datetime|None,optional Timestamp of the last password change (contract field
date_password_change—Date of last password change,readOnly).- location
IdNameRef|None,optional Reference to the user’s default location (contract field
location— embeddedLocationobject).- authtype
GlpiUserAuthType|None,optional Authentication backend used for this account (contract field
authtype). Numeric enumeration:1GLPI database,2Email,3LDAP,4External,5CAS,6X.509 Certificate.- last_login
datetime|None,optional Timestamp of the user’s last successful login (contract field
last_login).- default_profile
IdNameRef|None,optional Default profile assumed by the user at login (contract field
default_profile—Default profile).- default_entity
IdNameRef|None,optional Default entity scope assumed by the user at login (contract field
default_entity—Default entity).- date_creation
datetime|None,optional Creation timestamp of the user record (contract field
date_creation).- date_mod
datetime|None,optional Last modification timestamp of the user record (contract field
date_mod).- date_sync
datetime|None,optional Last synchronisation timestamp with the external directory (contract field
date_sync,readOnly).- title
IdNameRef|None,optional Reference to the user’s
UserTitle(contract fieldtitle; no contract description).- category
IdNameRef|None,optional Reference to the user’s
UserCategory(contract fieldcategory).- registration_number
str|None,optional Free-form registration/employee number (contract field
registration_number).- begin_date
datetime|None,optional Beginning of the validity window for the account (contract field
begin_date—Valid since).- end_date
datetime|None,optional End of the validity window for the account (contract field
end_date—Valid until).- nickname
str|None,optional Display nickname for the user (contract field
nickname,maxLength=50).- substitution_start_date
datetime|None,optional Start of the period during which this user is acting as a substitute (contract field
substitution_start_date).- substitution_end_date
datetime|None,optional End of the period during which this user is acting as a substitute (contract field
substitution_end_date).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
picture (str | None)
date_password_change (datetime | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_sync (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
picture (str | None)
date_password_change (datetime | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
date_sync (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- authtype: GlpiUserAuthType | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostUser(*, extra_payload=<factory>, username=None, realname=None, firstname=None, phone=None, phone2=None, mobile=None, emails=None, comment=None, is_active=None, is_deleted=None, password=None, password2=None, location=None, authtype=None, last_login=None, default_profile=None, default_entity=None, date_creation=None, date_mod=None, title=None, category=None, registration_number=None, begin_date=None, end_date=None, nickname=None, substitution_start_date=None, substitution_end_date=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Administration/User.Mirrors
components.schemas.Userfor create operations. Read-only contract fields (id,picture,date_password_change,date_sync) are intentionally excluded because the server rejects them on input. The contract markspasswordandpassword2aswriteOnly: they are accepted on create/update but never returned by GET endpoints.The two credential fields are typed as
pydantic.SecretStrso that the cleartext values do not leak throughrepr, log records, structured tracebacks or interactive debuggers. Their serializer unmasks the value viaSecretStr.get_secret_value()when the model is dumped into the outgoing JSON request body, so the API still receives the plain credential as it expects.- Parameters:
- username
str|None,optional Login name of the user (contract field
username—Username).- realname
str|None,optional Family name (contract field
realname—Real name).- firstname
str|None,optional Given name (contract field
firstname—First name).- phone
str|None,optional Primary phone number (contract field
phone—Phone number).- phone2
str|None,optional Secondary phone number (contract field
phone2—Phone number 2).- mobile
str|None,optional Mobile phone number (contract field
mobile—Mobile phone number).- emails
list[_EmailAddress] |None,optional Collection of e-mail addresses attached to the user (contract field
emails—Email addresses).- comment
str|None,optional Free-form comment associated with the user (contract field
comment—Comment).- is_activebool |
None,optional Whether the account should be created in the active state (contract field
is_active—Is active).- is_deletedbool |
None,optional Whether the account should be created in the trashed state (contract field
is_deleted—Is deleted).- password
SecretStr|None,optional Cleartext password to assign to the account (contract field
password—Password,format=password,writeOnly). Wrapped inSecretStr; the value is unmasked only when the request body is serialised.- password2
SecretStr|None,optional Confirmation of
password; the GLPI server validates that both fields match before persisting the account (contract fieldpassword2—Password confirmation,format=password,writeOnly). Wrapped inSecretStr; unmasked only on serialisation.- location
IdNameRef|None,optional Reference to the user’s default location (contract field
location— embeddedLocationobject).- authtype
GlpiUserAuthType|None,optional Authentication backend used for this account (contract field
authtype). Numeric enumeration:1GLPI database,2Email,3LDAP,4External,5CAS,6X.509 Certificate.- last_login
datetime|None,optional Timestamp of the user’s last successful login (contract field
last_login).- default_profile
IdNameRef|None,optional Default profile assumed by the user at login (contract field
default_profile—Default profile).- default_entity
IdNameRef|None,optional Default entity scope assumed by the user at login (contract field
default_entity—Default entity).- date_creation
datetime|None,optional Creation timestamp to override on the user record (contract field
date_creation).- date_mod
datetime|None,optional Last modification timestamp to override on the user record (contract field
date_mod).- title
IdNameRef|None,optional Reference to the user’s
UserTitle(contract fieldtitle; no contract description).- category
IdNameRef|None,optional Reference to the user’s
UserCategory(contract fieldcategory).- registration_number
str|None,optional Free-form registration/employee number (contract field
registration_number).- begin_date
datetime|None,optional Beginning of the validity window for the account (contract field
begin_date—Valid since).- end_date
datetime|None,optional End of the validity window for the account (contract field
end_date—Valid until).- nickname
str|None,optional Display nickname for the user (contract field
nickname,maxLength=50).- substitution_start_date
datetime|None,optional Start of the period during which this user is acting as a substitute (contract field
substitution_start_date).- substitution_end_date
datetime|None,optional End of the period during which this user is acting as a substitute (contract field
substitution_end_date).
- username
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- authtype: GlpiUserAuthType | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchUser(*, extra_payload=<factory>, username=None, realname=None, firstname=None, phone=None, phone2=None, mobile=None, emails=None, comment=None, is_active=None, is_deleted=None, password=None, password2=None, location=None, authtype=None, last_login=None, default_profile=None, default_entity=None, date_creation=None, date_mod=None, title=None, category=None, registration_number=None, begin_date=None, end_date=None, nickname=None, substitution_start_date=None, substitution_end_date=None, **extra_data)[source]
Bases:
PostUserRequest body for
PATCH /Administration/User/{id}.The contract uses the same
Userschema for create and partial-update bodies;PatchUseris kept distinct so client mixins can express the intent of the operation explicitly. All fields, including theSecretStr-wrappedpassword/password2pair inherited fromPostUser, behave exactly as on create.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
username (str | None)
realname (str | None)
firstname (str | None)
phone (str | None)
phone2 (str | None)
mobile (str | None)
emails (list[_EmailAddress] | None)
comment (str | None)
is_active (bool | None)
is_deleted (bool | None)
password (SecretStr | None)
password2 (SecretStr | None)
location (IdNameRef | None)
authtype (GlpiUserAuthType | None)
last_login (datetime | None)
default_profile (IdNameRef | None)
default_entity (IdNameRef | None)
date_creation (datetime | None)
date_mod (datetime | None)
title (IdNameRef | None)
category (IdNameRef | None)
registration_number (str | None)
begin_date (datetime | None)
end_date (datetime | None)
nickname (str | None)
substitution_start_date (datetime | None)
substitution_end_date (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteUser(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Administration/User/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Locations
- class GetLocation(*, extra_payload=<factory>, id=None, name=None, completename=None, code=None, alias=None, comment=None, entity=None, is_recursive=None, parent=None, level=None, room=None, building=None, address=None, town=None, postcode=None, state=None, country=None, latitude=None, longitude=None, altitude=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Dropdowns/Locationendpoints.Mirrors
components.schemas.Location. No field carries adescriptionin the OpenAPI contract; the parameter notes below reflect the field names, types andreadOnlyflags as advertised.- Parameters:
- id
int|None,optional Native GLPI identifier (
readOnly).- name
str|None,optional Short display name of the location.
- completename
str|None,optional Full hierarchical path of the location in dotted notation (
readOnly).- code
str|None,optional Short alphanumeric code assigned to the location.
- alias
str|None,optional Alternate name or alias for the location.
- comment
str|None,optional Free-form comment associated with the location.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- is_recursivebool |
None,optional Whether the location is visible to child entities.
- parent
IdNameRef|None,optional Reference to the parent location in the hierarchy.
- level
int|None,optional Depth of the location in the hierarchy tree (
readOnly).- room
str|None,optional Room identifier within the building.
- building
str|None,optional Building identifier.
- address
str|None,optional Street address of the location.
- town
str|None,optional Town or city name.
- postcode
str|None,optional Postal code.
- state
str|None,optional State, region or province.
- country
str|None,optional Country name.
- latitude
str|None,optional Geographic latitude coordinate.
- longitude
str|None,optional Geographic longitude coordinate.
- altitude
str|None,optional Altitude above sea level.
- date_creation
datetime|None,optional Creation timestamp of the location record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp of the location record (
format: date-time).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
completename (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
level (int | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
completename (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
level (int | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostLocation(*, extra_payload=<factory>, name=None, code=None, alias=None, comment=None, entity=None, is_recursive=None, parent=None, room=None, building=None, address=None, town=None, postcode=None, state=None, country=None, latitude=None, longitude=None, altitude=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Dropdowns/Location.Read-only contract fields (
id,completename,level) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Short display name of the location.
- code
str|None,optional Short alphanumeric code assigned to the location.
- alias
str|None,optional Alternate name or alias for the location.
- comment
str|None,optional Free-form comment associated with the location.
- entity
IdNameRef|None,optional Reference to the owning GLPI entity.
- is_recursivebool |
None,optional Whether the location is visible to child entities.
- parent
IdNameRef|None,optional Reference to the parent location in the hierarchy.
- room
str|None,optional Room identifier within the building.
- building
str|None,optional Building identifier.
- address
str|None,optional Street address of the location.
- town
str|None,optional Town or city name.
- postcode
str|None,optional Postal code.
- state
str|None,optional State, region or province.
- country
str|None,optional Country name.
- latitude
str|None,optional Geographic latitude coordinate.
- longitude
str|None,optional Geographic longitude coordinate.
- altitude
str|None,optional Altitude above sea level.
- date_creation
datetime|None,optional Creation timestamp to set on the location record (
format: date-time).- date_mod
datetime|None,optional Last modification timestamp to set on the location record (
format: date-time).
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchLocation(*, extra_payload=<factory>, name=None, code=None, alias=None, comment=None, entity=None, is_recursive=None, parent=None, room=None, building=None, address=None, town=None, postcode=None, state=None, country=None, latitude=None, longitude=None, altitude=None, date_creation=None, date_mod=None, **extra_data)[source]
Bases:
PostLocationRequest body for
PATCH /Dropdowns/Location/{id}.The contract uses the same
Locationschema for create and partial-update bodies;PatchLocationis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
name (str | None)
code (str | None)
alias (str | None)
comment (str | None)
entity (IdNameRef | None)
is_recursive (bool | None)
parent (IdNameRef | None)
room (str | None)
building (str | None)
address (str | None)
town (str | None)
postcode (str | None)
state (str | None)
country (str | None)
latitude (str | None)
longitude (str | None)
altitude (str | None)
date_creation (datetime | None)
date_mod (datetime | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteLocation(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Dropdowns/Location/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Entities
- class GetEntity(*, extra_payload=<factory>, id=None, name=None, comment=None, completename=None, parent=None, level=None, **extra_data)[source]
Bases:
GlpiModelResponse shape returned by
GET /Administration/Entityendpoints.Mirrors
components.schemas.Entity. All fields are optional because the contract does not advertise arequiredarray.- Parameters:
- id
int|None,optional Native GLPI identifier (contract field
id—ID,readOnly).- name
str|None,optional Display name of the entity (contract field
name—Name).- comment
str|None,optional Free-form comment associated with the entity (contract field
comment—Comment).- completename
str|None,optional Full hierarchical path of the entity in dotted notation (contract field
completename—Complete name,readOnly).- parent
IdNameRef|None,optional Reference to the parent entity in the hierarchy (contract field
parent—Parent entity).- level
int|None,optional Depth of the entity in the hierarchy tree (contract field
level—Level,readOnly).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostEntity(*, extra_payload=<factory>, name=None, comment=None, parent=None, **extra_data)[source]
Bases:
GlpiModelRequest body for
POST /Administration/Entity.Read-only contract fields (
id,completename,level) are intentionally excluded because the server rejects them on input.- Parameters:
- name
str|None,optional Display name of the entity (contract field
name—Name).- comment
str|None,optional Free-form comment associated with the entity (contract field
comment—Comment).- parent
IdNameRef|None,optional Reference to the parent entity in the hierarchy (contract field
parent—Parent entity).
- name
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PatchEntity(*, extra_payload=<factory>, name=None, comment=None, parent=None, **extra_data)[source]
Bases:
PostEntityRequest body for
PATCH /Administration/Entity/{id}.The contract uses the same
Entityschema for create and partial-update bodies;PatchEntityis kept distinct so client mixins can express the intent of the operation explicitly.- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class DeleteEntity(*, extra_payload=<factory>, force=None, **extra_data)[source]
Bases:
GlpiModelQuery parameters for
DELETE /Administration/Entity/{id}.- Parameters:
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Plugin: Fields (custom fields)
Schemas returned by the GLPI Fields plugin (legacy v1 REST endpoints).
The companion mixin methods are exposed on GlpiClient /
AsyncGlpiClient as list_plugin_fields_containers,
list_plugin_fields_fields, list_item_plugin_field_rows,
create_item_plugin_field_row, update_item_plugin_field_row,
get_ticket_custom_fields and set_ticket_custom_fields.
- class GetPluginFieldsContainer(*, extra_payload=<factory>, id=None, name=None, label=None, itemtypes=None, type=None, subtype=None, entities_id=None, is_recursive=None, is_active=None, **extra_data)[source]
Bases:
GlpiModelOne
PluginFieldsContainerrow returned by the v1 REST API.- Parameters:
- id
int|None,optional Native identifier of the container.
- name
str|None,optional Internal name used to derive the value itemtype (
PluginFields<Itemtype><name>).- label
str|None,optional Human-readable label shown in the GLPI UI.
- itemtypes
str|None,optional JSON-encoded list of itemtypes the container is attached to (the v1 API returns it as a string, e.g.
'["Ticket"]').- type
str|None,optional Container kind (
"tab","dom","domtab", …).- subtype
str|None,optional Optional sub-discriminator returned by the plugin.
- entities_id
int|None,optional Identifier of the entity the container belongs to.
- is_recursivebool |
None,optional Whether the container is visible in child entities.
- is_activebool |
None,optional Whether the container is enabled.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class GetPluginFieldsField(*, extra_payload=<factory>, id=None, name=None, label=None, type=None, plugin_fields_containers_id=None, ranking=None, default_value=None, is_active=None, is_readonly=None, mandatory=None, multiple=None, allowed_values=None, **extra_data)[source]
Bases:
GlpiModelOne
PluginFieldsFieldrow returned by the v1 REST API.- Parameters:
- id
int|None,optional Native identifier of the field declaration.
- name
str|None,optional Column name used inside the per-item value row (this is the key appearing in
GetPluginFieldsValueRow.extra_payload).- label
str|None,optional Human-readable label shown in the GLPI UI.
- type
str|None,optional Field type (
"string","text","richtext","dropdown","yesno","date","datetime","number","url","header", …).- plugin_fields_containers_id
int|None,optional Identifier of the parent
GetPluginFieldsContainer.- ranking
int|None,optional Display ordering of the field inside its container.
- default_value
str|None,optional Default value applied when a fresh row is created.
- is_activebool |
None,optional Whether the field declaration is enabled.
- is_readonlybool |
None,optional Whether the field is read-only in the GLPI UI.
- mandatorybool |
None,optional Whether the field is required when the parent item is saved.
- multiplebool |
None,optional Whether the field accepts multiple values (dropdown only).
- allowed_values
str|None,optional Newline-separated list of accepted values for some field types (the v1 API returns the raw text payload).
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
label (str | None)
type (str | None)
plugin_fields_containers_id (int | None)
ranking (int | None)
default_value (str | None)
is_active (bool | None)
is_readonly (bool | None)
mandatory (bool | None)
multiple (bool | None)
allowed_values (str | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
id (int | None)
name (str | None)
label (str | None)
type (str | None)
plugin_fields_containers_id (int | None)
ranking (int | None)
default_value (str | None)
is_active (bool | None)
is_readonly (bool | None)
mandatory (bool | None)
multiple (bool | None)
allowed_values (str | None)
extra_data (Any)
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class GetPluginFieldsValueRow(*, extra_payload=<factory>, id=None, items_id=None, itemtype=None, plugin_fields_containers_id=None, entities_id=None, **extra_data)[source]
Bases:
GlpiModelOne
PluginFields<Itemtype><Container>row keyed by parent item.The actual field columns (
<name>from eachGetPluginFieldsField) are dynamic per container and so are collected intoGlpiModel.extra_payloadrather than declared here.- Parameters:
- id
int|None,optional Native identifier of the value row.
- items_id
int|None,optional Identifier of the parent GLPI item the row is attached to.
- itemtype
str|None,optional Itemtype of the parent GLPI item (e.g.
"Ticket").- plugin_fields_containers_id
int|None,optional Identifier of the originating
GetPluginFieldsContainer.- entities_id
int|None,optional Identifier of the entity the row belongs to.
- id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PostPluginFieldsValueRow(*, extra_payload=<factory>, items_id, itemtype, plugin_fields_containers_id, entities_id=None, **extra_data)[source]
Bases:
GlpiModelRequest body used to create a fresh plugin-fields value row.
The dynamic field columns are passed through
GlpiModel.extra_payloadso each container can supply its own column names without a tailored Pydantic model.- Parameters:
- items_id
int Identifier of the parent GLPI item the row is attached to.
- itemtype
str Itemtype of the parent GLPI item (e.g.
"Ticket").- plugin_fields_containers_id
int Identifier of the originating
GetPluginFieldsContainer.- entities_id
int|None,optional Identifier of the entity the row should be linked to. When omitted GLPI applies its default scope.
- items_id
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
- Parameters:
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Enums
- class GlpiEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
IntEnumBase enum exposing small GLPI convenience helpers.
The enums remain numeric so they can be passed directly to filters and request parameters, while the helper methods keep RSQL string generation on the public surface.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- class GlpiTicketStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI ticket status identifiers as advertised by the contract.
The contract enum on
Ticket.status.idis[1, 10, 2, 3, 4, 5, 6]where10represents the validation step that sits betweenNEWandASSIGNED.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- ASSIGNED = 2
- CLOSED = 6
- NEW = 1
- PENDING = 4
- PLANNED = 3
- SOLVED = 5
- VALIDATION = 10
- class GlpiTicketType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI ticket
typeidentifiers as advertised by the contract.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- INCIDENT = 1
- REQUEST = 2
- class GlpiPriority(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumCommon GLPI urgency, impact, and priority identifiers.
The contract advertises the same
[1, 2, 3, 4, 5]enum on theurgency,impact, andpriorityticket fields.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- HIGH = 4
- LOW = 2
- MEDIUM = 3
- VERY_HIGH = 5
- VERY_LOW = 1
- class GlpiTaskState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
TicketTask.stateenum values.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- DONE = 2
- INFORMATION = 0
- TODO = 1
- class GlpiSolutionStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
Solution.statusenum values.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- ACCEPTED = 3
- NONE = 1
- REFUSED = 4
- WAITING = 2
- class GlpiTimelinePosition(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumTimeline position values shared by Followup, Solution and TicketTask.
The contract advertises
[-1, 0, 1, 2, 3, 4]ontimeline_position.LEFTandRIGHTfollow the GLPI UI conventions.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- INVALID = -1
- LEFT = 1
- LEFT_BIG = 3
- NONE = 0
- RIGHT = 2
- RIGHT_BIG = 4
- class GlpiUserAuthType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
User.authtypeenum values.The contract advertises
[1, 2, 3, 4, 5, 6]without textual labels. Names map to the GLPI source enum order.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- CAS = 4
- EXTERNAL = 6
- LDAP = 2
- LOCAL = 1
- MAIL = 3
- X509 = 5
- class GlpiGlobalValidation(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
GlpiEnumGLPI
Ticket.global_validationenum values.- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- ACCEPTED = 3
- NONE = 1
- REFUSED = 4
- WAITING = 2
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’.