pub struct GleifClient { /* private fields */ }
Expand description
The main entry point for interacting with the GLEIF API.
Wraps a reqwest_middleware::ClientWithMiddleware
and provides methods for building requests to GLEIF endpoints.
Implementations§
Source§impl GleifClient
impl GleifClient
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new GleifClient
with default configuration.
§Panics
Panics if the default configuration is invalid. This should never happen unless the default constants are changed to invalid values.
Sourcepub fn builder() -> GleifClientBuilder
pub fn builder() -> GleifClientBuilder
Returns a builder for configuring a GleifClient
.
Sourcepub fn from_middleware_client(client: ClientWithMiddleware) -> Self
pub fn from_middleware_client(client: ClientWithMiddleware) -> Self
Create a client from a reqwest_middleware::ClientWithMiddleware
.
§Panics
Panics if the default base URL is invalid. This should never happen unless the constant is changed to an invalid value.
Sourcepub fn from_reqwest_client(client: ReqwestClient) -> Self
pub fn from_reqwest_client(client: ReqwestClient) -> Self
Create a client from a reqwest::Client
.
Sourcepub fn client(&self) -> &Arc<ClientWithMiddleware>
pub fn client(&self) -> &Arc<ClientWithMiddleware>
Returns a reference to the underlying reqwest_middleware
client.
Source§impl GleifClient
impl GleifClient
Sourcepub async fn auto_completions<R>(&self, field: &str, q: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn auto_completions<R>(&self, field: &str, q: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves a list of auto-completed strings based on the supplied search term.
This method sends a request to the autocompletions
endpoint to fetch suggested search queries.
The field
and q
parameters are mandatory for this endpoint. The q
parameter, which contains the search term,
can hold a maximum of 255 characters. The response includes a list of possibly relevant strings containing the
search term, along with a highlighted version showing where the term appears in the retrieved strings.
§Parameters
field
- A string representing the field to search in. Any value other than those listed below will result in an invalid request:fulltext
- Search in all fields of the Legal Entity’s LEI Recordowns
- Search in LEI Records of “child” LEI RecordsownedBy
- Search in LEI Records of “parent” LEI Records
q
- A string slice representing the search term (maximum 255 characters).
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let auto_completion: AutoCompletionList = client.auto_completions("fulltext", "Global").send().await?; // strongly typed
let auto_completion: serde_json::Value = client.auto_completions("fulltext", "Global").send().await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn countries(&self) -> GleifRequestBuilder
pub fn countries(&self) -> GleifRequestBuilder
Retrieves all ISO 3166 Country Codes.
This method sends a request to the /countries
endpoint to fetch a list of all ISO 3166 Country Codes.
Pagination parameters can be used to manage the large number of data items.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let countries: CountryList = client.countries().send().await?; // strongly typed
let countries: serde_json::Value = client.countries().send().await?; // raw JSON
Sourcepub async fn country_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn country_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches ISO 3166 Country Code details by ISO 3166 Country Code (/countries/{id}
).
This method sends a request to retrieve details of a single country by its ISO 3166 code.
§Parameters
id
- A string slice representing the ISO 3166 Country Code.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let country: Country = client.country_by_id("US").await?; // strongly typed
let country: serde_json::Value = client.country_by_id("US").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn entity_legal_forms(&self) -> GleifRequestBuilder
pub fn entity_legal_forms(&self) -> GleifRequestBuilder
Fetches a list of all entity legal forms (/entity-legal-forms
).
This method sends a request to retrieve all available entity legal forms. Pagination parameters can be used to manage the large number of data items.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let legal_forms: EntityLegalFormList = client.entity_legal_forms().send().await?; // strongly typed
let legal_forms: serde_json::Value = client.entity_legal_forms().send().await?; // raw JSON
Sourcepub async fn entity_legal_form_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn entity_legal_form_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches details of a single entity legal form by ELF code (/entity-legal-forms/{id}
).
This method sends a request to retrieve information about a specific entity legal form by its ELF code.
§Parameters
id
- A string slice representing the unique ELF code of the entity legal form.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let legal_form: EntityLegalForm = client.entity_legal_form_by_id("10UR").await?; // strongly typed
let legal_form: serde_json::Value = client.entity_legal_form_by_id("10UR").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn fields(&self) -> GleifRequestBuilder
pub fn fields(&self) -> GleifRequestBuilder
Fetches a list of all available data fields for filtering LEI records (/fields
).
This endpoint provides detailed documentation of the data fields available in the API. Pagination parameters can be used to manage the large number of data items.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let fields: FieldList = client.fields().send().await?; // strongly typed
let fields: serde_json::Value = client.fields().send().await?; // raw JSON
Sourcepub async fn field_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn field_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches details of a single data field for filtering LEI records (/fields/{id}
).
This method sends a request to retrieve information about a specific field by its ID.
§Parameters
id
- A string slice representing the unique identifier of the field.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let field: Field = client.field_by_id("LEIREC_LEGAL_NAME").await?; // strongly typed
let field: serde_json::Value = client.field_by_id("LEIREC_LEGAL_NAME").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn field_modifications(&self, lei: &str) -> GleifRequestBuilder
pub fn field_modifications(&self, lei: &str) -> GleifRequestBuilder
Fetches field modifications for a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/field-modifications
endpoint to retrieve
details about modifications made to the fields of the specified LEI record. The response can be
filtered to include only a subset of field modifications.
Supported filters:
recordType
modificationDate
field
date
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let modifications: FieldModificationList = client.field_modifications("5493000IBP32UQZ0KL24").send().await?; // strongly typed
let modifications: serde_json::Value = client.field_modifications("5493000IBP32UQZ0KL24").send().await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub async fn fuzzy_completions<R>(&self, field: &str, q: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn fuzzy_completions<R>(&self, field: &str, q: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves a list of approximate matches based on the supplied search term, compared with the full text of LEI records.
This method sends a request to the fuzzycompletions
endpoint to fetch approximate matches. The field
and q
parameters
are mandatory for this endpoint. The q
parameter, which contains the search term, can hold a maximum of 255 characters.
The response includes references to LEI records that contain strings similar to the search term.
§Parameters
field
- A string representing the field to search in. Any value other than those listed below will result in an invalid request:entity.legalName
- Search only in the primary, official/registered legal name of the Legal Entity itselffulltext
- Search in all fields of the Legal Entity’s LEI Recordowns
- Search in LEI Records of “child” LEI RecordsownedBy
- Search in LEI Records of “parent” LEI Records.
q
- A string slice representing the search term (maximum 255 characters).
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let fuzzy_completion: FuzzyCompletionList = client.fuzzy_completions("entity.legalName", "factbook").send().await?; // strongly typed
let fuzzy_completion: serde_json::Value = client.fuzzy_completions("entity.legalName", "factbook").send().await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn isins(&self, lei: &str) -> GleifRequestBuilder
pub fn isins(&self, lei: &str) -> GleifRequestBuilder
Retrieves ISINs (International Securities Identification Numbers) reported as issued by the entity identified by this LEI (Legal Entity Identifier) registration.
This method sends a request to the /lei-records/{lei}/isins
endpoint to fetch ISINs associated
with the provided LEI identifier. The response includes all ISINs mapped to this LEI record.
Pagination parameters can be used to manage large datasets.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let isins: IsinList = client.isins("5493000IBP32UQZ0KL24").send().await?; // strongly typed
let isins: serde_json::Value = client.isins("5493000IBP32UQZ0KL24").send().await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn jurisdictions(&self) -> GleifRequestBuilder
pub fn jurisdictions(&self) -> GleifRequestBuilder
Fetches a list of all jurisdictions (/jurisdictions
).
This method sends a request to retrieve all legal jurisdictions based on the ISO 3166 Country and Sub-Region Codes. Pagination parameters can be used to manage the large number of data items.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let jurisdictions: JurisdictionList = client.jurisdictions().send().await?; // strongly typed
let jurisdictions: serde_json::Value = client.jurisdictions().send().await?; // raw JSON
Sourcepub async fn jurisdiction_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn jurisdiction_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches details of a single jurisdiction by jurisdiction code (/jurisdictions/{id}
).
This method sends a request to retrieve information about a specific jurisdiction by its code.
§Parameters
id
- A string slice representing the unique jurisdiction code.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let jurisdiction: Jurisdiction = client.jurisdiction_by_id("US").await?; // strongly typed
let jurisdiction: serde_json::Value = client.jurisdiction_by_id("US").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub async fn lei_issuer<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn lei_issuer<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves identification and descriptive data of the LEI Issuer responsible for administering a specific LEI registration.
This method sends a request to the /lei-records/{lei}/lei-issuer
endpoint to fetch the LEI issuer
associated with the provided LEI identifier. The response includes details about the LEI issuer,
such as its name, country, and other relevant attributes.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let issuer: LeiIssuer = client.lei_issuer("5493000IBP32UQZ0KL24").await?; // strongly typed
let issuer: serde_json::Value = client.lei_issuer("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub fn lei_issuers(&self) -> GleifRequestBuilder
pub fn lei_issuers(&self) -> GleifRequestBuilder
Retrieves a list of LEI Issuers (Legal Entity Identifier Issuers), optionally filtered by specific criteria.
This method sends a request to the /lei-issuers
endpoint to fetch LEI Issuers. If no filtering
parameters are provided, it will return all available LEI Issuers. Pagination parameters can be
used to manage large datasets. The response includes details about each LEI Issuer, such as its
name, country, and other relevant attributes.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let issuers: LeiIssuerList = client.lei_issuers().send().await?; // strongly typed
let issuers: serde_json::Value = client.lei_issuers().send().await?; // raw JSON
Sourcepub async fn lei_issuer_by_id<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn lei_issuer_by_id<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Fetch a single LEI issuer by LEI (/lei-issuers/{lei}
).
This method retrieves detailed information about a specific LEI issuer using its LEI identifier. The response includes attributes such as the issuer’s name, country, and other relevant details.
§Parameters
lei
- A string slice representing the LEI identifier of the issuer.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let issuer: LeiIssuer = client.lei_issuer_by_id("5493000IBP32UQZ0KL24").await?; // strongly typed
let issuer: serde_json::Value = client.lei_issuer_by_id("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub fn lei_issuer_jurisdictions(&self, lei: &str) -> GleifRequestBuilder
pub fn lei_issuer_jurisdictions(&self, lei: &str) -> GleifRequestBuilder
Retrieves all jurisdictions for which the LEI Issuer is accredited.
This method sends a request to the /lei-issuers/{lei}/jurisdictions
endpoint to fetch the
jurisdictions associated with the specified LEI issuer. The response includes details about
the jurisdictions where the issuer is accredited to operate.
§Parameters
lei
- A string slice representing the LEI identifier of the issuer.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let jurisdictions: LeiIssuerJurisdictionsList = client
.lei_issuer_jurisdictions("5493000IBP32UQZ0KL24")
.send()
.await?;
let jurisdictions: serde_json::Value = client
.lei_issuer_jurisdictions("5493000IBP32UQZ0KL24")
.send()
.await?;
Source§impl GleifClient
impl GleifClient
Sourcepub async fn lei_record_by_id<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn lei_record_by_id<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves a specific LEI (Legal Entity Identifier) record by its identifier.
This method sends a request to the /lei-records/{lei}
endpoint to fetch the LEI record
associated with the provided identifier. The response may include URLs to retrieve
associated Level 2 (relationship) data, if available, within the links
section of the response body.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let record: LeiRecord = client.lei_record_by_id("5493000IBP32UQZ0KL24").await?; // strongly typed
let record: serde_json::Value = client.lei_record_by_id("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub fn lei_records(&self) -> GleifRequestBuilder
pub fn lei_records(&self) -> GleifRequestBuilder
Retrieves a list of LEI (Legal Entity Identifier) records, optionally filtered by specific criteria.
This method sends a request to the /lei-records
endpoint to fetch LEI records. If no filtering
parameters are provided, it will return all available LEI records. Pagination parameters can be
used to manage large datasets. The response may include URLs to retrieve associated Level 2
(relationship) data, if available, within the links
section of the response body.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let records: LeiRecordList = client.lei_records().send().await?; // strongly typed
let records: serde_json::Value = client.lei_records().send().await?; // raw JSON
Sourcepub async fn ultimate_parent<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn ultimate_parent<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the LEI (Legal Entity Identifier) record for the ultimate parent of a specific entity.
This method sends a request to the /lei-records/{lei}/ultimate-parent
endpoint to fetch the LEI record
of the furthest legal entity preparing consolidated financial statements for the given entity, based on
the accounting definition of consolidation applying to that parent. The response may include URLs to
retrieve associated Level 2 (relationship) data, if available, within the links
section of the response body.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let record: LeiRecord = client.ultimate_parent("5493000IBP32UQZ0KL24").await?; // strongly typed
let record: serde_json::Value = client.ultimate_parent("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub async fn direct_parent<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn direct_parent<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the LEI (Legal Entity Identifier) record for the direct parent of a specific entity.
This method sends a request to the /lei-records/{lei}/direct-parent
endpoint to fetch the LEI record
of the closest legal entity preparing consolidated financial statements for the given entity, based on
the accounting definition of consolidation applying to that parent. The response may include URLs to
retrieve associated Level 2 (relationship) data, if available, within the links
section of the response body.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let record: LeiRecord = client.direct_parent("5493000IBP32UQZ0KL24").await?; // strongly typed
let record: serde_json::Value = client.direct_parent("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub fn ultimate_children(&self, lei: &str) -> GleifRequestBuilder
pub fn ultimate_children(&self, lei: &str) -> GleifRequestBuilder
Retrieves LEI (Legal Entity Identifier) records for the ultimate children of a specific entity.
This method sends a request to the /lei-records/{lei}/ultimate-children
endpoint to fetch LEI records
of the furthest level legal entities wholly consolidated in the consolidated financial statements for
the given entity, based on the accounting definition of consolidation applying to this parent.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let records: LeiRecordList = client.ultimate_children("5493000IBP32UQZ0KL24").send().await?; // strongly typed
let records: serde_json::Value = client.ultimate_children("5493000IBP32UQZ0KL24").send().await?; // raw JSON
Sourcepub fn direct_children(&self, lei: &str) -> GleifRequestBuilder
pub fn direct_children(&self, lei: &str) -> GleifRequestBuilder
Retrieves LEI (Legal Entity Identifier) records for the direct children of a specific entity.
This method sends a request to the /lei-records/{lei}/direct-children
endpoint to fetch LEI records
of the closest level legal entities wholly consolidated in the consolidated financial statements for
the given entity, based on the accounting definition of consolidation applying to this parent.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let records: LeiRecordList = client.direct_children("5493000IBP32UQZ0KL24").send().await?; // strongly typed
let records: serde_json::Value = client.direct_children("5493000IBP32UQZ0KL24").send().await?; // raw JSON
Sourcepub async fn associated_entity<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn associated_entity<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the LEI (Legal Entity Identifier) record for the manager of a specific legal entity (fund).
This method sends a request to the /lei-records/{lei}/associated-entity
endpoint to fetch the LEI record
of the fund management entity associated with the given LEI. If no fund management entity is reported,
the request will return a resource not found response.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let record: LeiRecord = client.associated_entity("5493000IBP32UQZ0KL24").await?; // strongly typed
let record: serde_json::Value = client.associated_entity("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub async fn successor_entity<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn successor_entity<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the LEI (Legal Entity Identifier) record for the successor entity of a specific legal entity.
This method sends a request to the /lei-records/{lei}/successor-entity
endpoint to fetch the LEI record
of the entity that continues or replaces the registration of the given entity. The response may include
URLs to retrieve associated Level 2 (relationship) data, if available, within the links
section of the response body.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let record: LeiRecord = client.successor_entity("5493000IBP32UQZ0KL24").await?; // strongly typed
let record: serde_json::Value = client.successor_entity("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub async fn managing_lou<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn managing_lou<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the LEI (Legal Entity Identifier) record for the managing Local Operating Unit (LOU) of a specific entity.
This method sends a request to the /lei-records/{lei}/managing-lou
endpoint to fetch the LEI record
of the LEI Issuer responsible for administering the given LEI registration. The response may include
URLs to retrieve associated Level 2 (relationship) data, if available, within the links
section of the response body.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let record: LeiRecord = client.managing_lou("5493000IBP32UQZ0KL24").await?; // strongly typed
let record: serde_json::Value = client.managing_lou("5493000IBP32UQZ0KL24").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn official_organizational_roles(&self) -> GleifRequestBuilder
pub fn official_organizational_roles(&self) -> GleifRequestBuilder
Retrieves all Official Organizational Roles (OOR) Code List (/official-organizational-roles
).
This method sends a request to fetch the complete list of official organizational roles. The list contains over 2100 official organizational roles (as of November 2024) for nearly 250 legal forms across 89 jurisdictions.
§Filtering Options
The following filters can be applied to narrow down the results:
- Primary Name: Filter by the primary name of the role.
- Transliterated Name: Filter by the transliterated name of the role.
- Case-insensitive Name: Filter by a case-insensitive name match.
- Matching String: Filter by a partial string match in the name.
- Country Code: Filter by the ISO 3166 country code.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
// Retrieve all roles
let roles: OfficialOrganizationalRoleList = client.official_organizational_roles().send().await?;
// Filter by primary name
let roles: OfficialOrganizationalRoleList = client
.official_organizational_roles()
.filter_eq("name", "управног")
.send()
.await?;
// Filter by country code
let roles: OfficialOrganizationalRoleList = client
.official_organizational_roles()
.filter_eq("countryCode", "CA")
.send()
.await?;
Sourcepub async fn official_organizational_role_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn official_organizational_role_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches details of a single official organizational role by OOR code (/official-organizational-roles/{id}
).
This method sends a request to retrieve information about a specific official organizational role by its ID.
§Parameters
id
- A string slice representing the unique identifier of the official organizational role.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let role: OfficialOrganizationalRole = client.official_organizational_role_by_id("0CGNG5").await?; // strongly typed
let role: serde_json::Value = client.official_organizational_role_by_id("0CGNG5").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn regions(&self) -> GleifRequestBuilder
pub fn regions(&self) -> GleifRequestBuilder
Retrieves all ISO 3166 Region Codes (/regions
).
This method sends a request to fetch a list of all ISO 3166 Region Codes. Pagination parameters can be used to manage the large number of data items.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let regions: RegionList = client.regions().send().await?; // strongly typed
let regions: serde_json::Value = client.regions().send().await?; // raw JSON
Sourcepub async fn region_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn region_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches details of a single region by ISO 3166 Region Code (/regions/{id}
).
This method sends a request to retrieve information about a specific region by its code.
§Parameters
id
- A string slice representing the unique ISO 3166 Region Code.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let region: Region = client.region_by_id("AD-03").await?; // strongly typed
let region: serde_json::Value = client.region_by_id("AD-03").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn registration_agents(&self) -> GleifRequestBuilder
pub fn registration_agents(&self) -> GleifRequestBuilder
Fetches a list of all Registration Agents (/registration-agents
).
This method sends a request to retrieve all Registration Agents that have consented to have their information published. The response can be filtered using the following parameters:
leiIssuer
: The LEI of the associated LEI Issuer.lei
: The LEI of the Registration Agent itself.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let agents: RegistrationAgentList = client.registration_agents().send().await?; // strongly typed
let agents: serde_json::Value = client.registration_agents().send().await?; // raw JSON
Sourcepub async fn registration_agent_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn registration_agent_by_id<R>(&self, id: &str) -> Result<R>where
R: DeserializeOwned,
Fetches details of a single Registration Agent by its unique ID (/registration-agents/{id}
).
This method sends a request to retrieve information about a specific registration agent by its ID.
§Parameters
id
- A string slice representing the unique identifier of the registration agent.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let agent: RegistrationAgent = client.registration_agent_by_id("5d10d4dc9f3764.95022907").await?; // strongly typed
let agent: serde_json::Value = client.registration_agent_by_id("5d10d4dc9f3764.95022907").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Retrieves all Registration Authorities (/registration-authorities
).
This method sends a request to fetch the complete list of Registration Authorities based on the GLEIF Registration Authority (RA) Code List. Pagination parameters can be used to manage the large number of data items.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let authorities: RegistrationAuthorityList = client.registration_authorities().send().await?; // strongly typed
let authorities: serde_json::Value = client.registration_authorities().send().await?; // raw JSON
Fetches details of a single Registration Authority by RA List Code (/registration-authorities/{id}
).
This method sends a request to retrieve information about a specific registration authority by its code.
§Parameters
id
- A string slice representing the unique RA List Code of the registration authority.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let authority: RegistrationAuthority = client.registration_authority_by_id("RA000001").await?; // strongly typed
let authority: serde_json::Value = client.registration_authority_by_id("RA000001").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub async fn direct_parent_relationship<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn direct_parent_relationship<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the direct parent relationship for a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/direct-parent-relationship
endpoint
to fetch the relationship record of the closest legal entity preparing consolidated financial
statements for the given “child” entity, based on the accounting definition of consolidation.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let relationship: RelationshipRecord = client.direct_parent_relationship("5493000IBP32UQZ0KL24").await?; // strongly typed
let relationship: serde_json::Value = client.direct_parent_relationship("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub async fn ultimate_parent_relationship<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn ultimate_parent_relationship<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the ultimate parent relationship for a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/ultimate-parent-relationship
endpoint
to fetch the relationship record of the furthest legal entity preparing consolidated financial
statements for the given “child” entity, based on the accounting definition of consolidation.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let relationship: RelationshipRecord = client.ultimate_parent_relationship("5493000IBP32UQZ0KL24").await?; // strongly typed
let relationship: serde_json::Value = client.ultimate_parent_relationship("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub fn ultimate_child_relationships(&self, lei: &str) -> GleifRequestBuilder
pub fn ultimate_child_relationships(&self, lei: &str) -> GleifRequestBuilder
Retrieves the ultimate child relationships for a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/ultimate-child-relationships
endpoint
to fetch relationship records indicating the furthest level legal entities wholly consolidated
in the consolidated financial statements for the given entity, based on the accounting definition
of consolidation applying to this parent.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let relationships: RelationshipRecordList = client.ultimate_child_relationships("5493000IBP32UQZ0KL24").send().await?; // strongly typed
let relationships: serde_json::Value = client.ultimate_child_relationships("5493000IBP32UQZ0KL24").send().await?; // raw JSON
Sourcepub fn direct_child_relationships(&self, lei: &str) -> GleifRequestBuilder
pub fn direct_child_relationships(&self, lei: &str) -> GleifRequestBuilder
Retrieves the direct child relationships for a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/direct-child-relationships
endpoint
to fetch relationship records indicating the closest level legal entities wholly consolidated
in the consolidated financial statements for the given entity, based on the accounting definition
of consolidation applying to this parent.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let relationships: RelationshipRecordList = client.direct_child_relationships("5493000IBP32UQZ0KL24").send().await?; // strongly typed
let relationships: serde_json::Value = client.direct_child_relationships("5493000IBP32UQZ0KL24").send().await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub async fn direct_parent_reporting_exception<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn direct_parent_reporting_exception<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Retrieves the reporting exception record for a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/direct-parent-reporting-exception
endpoint
to fetch the record indicating that the legal entity has declined to report a direct accounting
consolidation parent, based on applicable accounting standards.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let exception: ReportingException = client.direct_parent_reporting_exception("5493000IBP32UQZ0KL24").await?;
let exception: serde_json::Value = client.direct_parent_reporting_exception("5493000IBP32UQZ0KL24").await?; // raw JSON
Sourcepub async fn ultimate_parent_reporting_exception<R>(
&self,
lei: &str,
) -> Result<R>where
R: DeserializeOwned,
pub async fn ultimate_parent_reporting_exception<R>(
&self,
lei: &str,
) -> Result<R>where
R: DeserializeOwned,
Retrieves the reporting exception record for the ultimate parent of a specific LEI (Legal Entity Identifier).
This method sends a request to the /lei-records/{lei}/ultimate-parent-reporting-exception
endpoint
to fetch the record indicating that the legal entity has declined to report an ultimate accounting
consolidation parent, based on applicable accounting standards.
§Parameters
lei
- A string slice representing the LEI identifier.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let exception: ReportingException = client.ultimate_parent_reporting_exception("5493000IBP32UQZ0KL24").await?; // strongly typed
let exception: serde_json::Value = client.ultimate_parent_reporting_exception("5493000IBP32UQZ0KL24").await?; // raw JSON
Source§impl GleifClient
impl GleifClient
Sourcepub fn vlei_issuers(&self) -> GleifRequestBuilder
pub fn vlei_issuers(&self) -> GleifRequestBuilder
Retrieves a list of qualified vLEI Issuers, including their identification and descriptive data.
This method sends a request to the /vlei-issuers
endpoint to fetch all qualified vLEI Issuers.
The response includes details such as the issuer’s LEI, legal name, marketing name, website, and
the date they were officially qualified by GLEIF.
§Errors
This method does not itself return errors. However, errors may occur when sending the request or processing the response using the returned request builder (e.g., network failures or deserialization issues).
§Examples
let vlei_issuers: VLeiIssuerList = client.vlei_issuers().send().await?;
let vlei_issuers: serde_json::Value = client.vlei_issuers().send().await?;
Sourcepub async fn vlei_issuer_by_id<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
pub async fn vlei_issuer_by_id<R>(&self, lei: &str) -> Result<R>where
R: DeserializeOwned,
Fetches detailed information about a specific qualified vLEI Issuer using its LEI identifier.
This method sends a request to the /vlei-issuers/{lei}
endpoint to retrieve information about
a single vLEI Issuer. The response includes attributes such as the issuer’s LEI, legal name,
marketing name, website, and the date they were officially qualified by GLEIF.
§Parameters
lei
- A string slice representing the LEI identifier of the vLEI Issuer.
§Errors
This method returns a crate::error::GleifError
in the following cases:
- The request could not be completed due to network or server issues.
- The response body could not be deserialized into the expected type.
§Examples
let vlei_issuer: VLeiIssuer = client.vlei_issuer_by_id("5493000IBP32UQZ0KL24").await?; // strongly typed
let vlei_issuer: serde_json::Value = client.vlei_issuer_by_id("5493000IBP32UQZ0KL24").await?; // raw JSON
Trait Implementations§
Source§impl Clone for GleifClient
impl Clone for GleifClient
Source§fn clone(&self) -> GleifClient
fn clone(&self) -> GleifClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GleifClient
impl Debug for GleifClient
Source§impl Default for GleifClient
impl Default for GleifClient
Source§fn default() -> Self
fn default() -> Self
Create a new GleifClient
with default settings.