https://flyte.org logo
#ask-ai
Title
# ask-ai
b

Blake Jackson

02/09/2024, 5:22 AM
@Glime what fields can I filter by when getting named entities
g

Glime

02/09/2024, 5:23 AM
When retrieving named entities using Flyte's API, you can filter by the following fields: 1. Resource Type: Specifies the type of the named entity you are interested in. The resource type can be one of Task, Workflow, or LaunchPlan. This is a required field for both listing and getting specific named entities. 2. Project: The name of the project that contains the named entities. This field is used to narrow down the search to entities within a specific project. 3. Domain: Refers to the domain within the project that the named entities belong to. A domain can be considered as a subset within a specific project. 4. State: This field allows filtering based on the state of the named entity. For example, you can filter entities that are archived. This is particularly useful for workflows where you might want to list entities that are in a specific state. 5. Name: Although not explicitly mentioned in the provided context as a filter, the name of a named entity (part of the NamedEntityIdentifier) is essential for identifying specific entities. It's reasonable to infer that filtering by name could be supported, especially when retrieving metadata for a specific named entity. 6. Description: For NamedEntityMetadata, there's an optional description field that provides a common description across all versions of the entity. While the context doesn't explicitly state that you can filter by description, it's a field associated with named entities that could potentially be used for filtering, especially in custom implementations or future updates. 7. ID: The identifier for the named entity for which to fetch metadata. This is required when fetching metadata for a specific named entity and serves as a direct filter for that entity. It's important to note that while some fields like project, domain, and resource type are explicitly required for certain operations (e.g., listing or retrieving named entities), others like state and description are optional and their availability for filtering might depend on the specific implementation or API version. For the most accurate and up-to-date information on filtering named entities, refer to the official Flyte documentation and API references.