Skip to content

Persons

PersonsFilters

Bases: BaseModel

Filter model for the Persons V3 endpoint (/v3/persons).

All six filter parameters are functional in V3. (In V1/V2, givenName and lastName returned HTTP 500; both are fixed in V3.)

Attributes:

Name Type Description
search str | None

Keyword search for the person.

id str | None

OpenAIRE identifier.

originalId str | None

Original identifier (e.g. ORCID).

givenName str | None

Person's given (first) name.

lastName str | None

Person's family (last) name.

logicalOperator Literal['AND', 'OR', 'NOT'] | None

How multiple filters are combined.

Source code in src/aireloom/endpoints.py
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
class PersonsFilters(BaseModel):
    """Filter model for the Persons V3 endpoint (``/v3/persons``).

    All six filter parameters are functional in V3. (In V1/V2, ``givenName`` and
    ``lastName`` returned HTTP 500; both are fixed in V3.)

    Attributes:
        search (str | None): Keyword search for the person.
        id (str | None): OpenAIRE identifier.
        originalId (str | None): Original identifier (e.g. ORCID).
        givenName (str | None): Person's given (first) name.
        lastName (str | None): Person's family (last) name.
        logicalOperator (Literal["AND", "OR", "NOT"] | None): How multiple filters are combined.
    """

    search: str | None = None
    id: str | None = None
    originalId: str | None = None
    givenName: str | None = None
    lastName: str | None = None
    logicalOperator: Literal["AND", "OR", "NOT"] | None = None

    model_config = ConfigDict(extra="forbid")

givenName = None class-attribute instance-attribute

id = None class-attribute instance-attribute

lastName = None class-attribute instance-attribute

logicalOperator = None class-attribute instance-attribute

model_config = ConfigDict(extra='forbid') class-attribute instance-attribute

originalId = None class-attribute instance-attribute

search = None class-attribute instance-attribute

PersonsClient

Bases: StandardResourceClient

Client for the OpenAIRE Persons API endpoint.

Attributes:

Name Type Description
_entity_path str

The API path for persons.

_entity_model type[Person]

Pydantic model for a single person.

_search_response_model type[PersonResponse]

Pydantic model for the search response envelope.

Source code in src/aireloom/resources/persons_client.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class PersonsClient(StandardResourceClient):
    """Client for the OpenAIRE Persons API endpoint.

    Attributes:
        _entity_path (str): The API path for persons.
        _entity_model (type[Person]): Pydantic model for a single person.
        _search_response_model (type[PersonResponse]): Pydantic model for the
                                                        search response envelope.
    """

    _entity_path: str = PERSONS
    _entity_model: type[Person] = Person
    _search_response_model: type[PersonResponse] = PersonResponse
    _batch_fields: dict[str, str] = {
        "openaire_id": "id",
        "original_id": "originalId",
    }