Function asana::apis::tasks_api::search_tasks_for_workspace[][src]

pub async fn search_tasks_for_workspace(
    configuration: &Configuration,
    workspace_gid: &str,
    opt_pretty: Option<bool>,
    opt_fields: Option<Vec<String>>,
    text: Option<&str>,
    resource_subtype: Option<&str>,
    assignee_any: Option<&str>,
    assignee_not: Option<&str>,
    portfolios_any: Option<&str>,
    projects_any: Option<&str>,
    projects_not: Option<&str>,
    projects_all: Option<&str>,
    sections_any: Option<&str>,
    sections_not: Option<&str>,
    sections_all: Option<&str>,
    tags_any: Option<&str>,
    tags_not: Option<&str>,
    tags_all: Option<&str>,
    teams_any: Option<&str>,
    followers_any: Option<&str>,
    followers_not: Option<&str>,
    created_by_any: Option<&str>,
    created_by_not: Option<&str>,
    assigned_by_any: Option<&str>,
    assigned_by_not: Option<&str>,
    liked_by_any: Option<&str>,
    liked_by_not: Option<&str>,
    commented_on_by_any: Option<&str>,
    commented_on_by_not: Option<&str>,
    due_on_before: Option<String>,
    due_on_after: Option<String>,
    due_on: Option<String>,
    due_at_before: Option<String>,
    due_at_after: Option<String>,
    start_on_before: Option<String>,
    start_on_after: Option<String>,
    start_on: Option<String>,
    created_on_before: Option<String>,
    created_on_after: Option<String>,
    created_on: Option<String>,
    created_at_before: Option<String>,
    created_at_after: Option<String>,
    completed_on_before: Option<String>,
    completed_on_after: Option<String>,
    completed_on: Option<String>,
    completed_at_before: Option<String>,
    completed_at_after: Option<String>,
    modified_on_before: Option<String>,
    modified_on_after: Option<String>,
    modified_on: Option<String>,
    modified_at_before: Option<String>,
    modified_at_after: Option<String>,
    is_blocking: Option<bool>,
    is_blocked: Option<bool>,
    has_attachment: Option<bool>,
    completed: Option<bool>,
    is_subtask: Option<bool>,
    sort_by: Option<&str>,
    sort_ascending: Option<bool>
) -> Result<InlineResponse20023, Error<SearchTasksForWorkspaceError>>

To mirror the functionality of the Asana web app’s advanced search feature, the Asana API has a task search endpoint that allows you to build complex filters to find and retrieve the exact data you need. #### Premium access Like the Asana web product’s advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true: - The workspace in which the search is being performed is a premium workspace - The user is a member of a premium team inside the workspace Even if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a 402 Payment Required error. #### Pagination Search results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional pagination available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the limit query parameter. #### Eventual consistency Changes in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a task that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product. #### Rate limits You may receive a 429 Too Many Requests response if you hit any of our rate limits. #### Custom field parameters | Parameter name | Custom field type | Accepted type | |—|—|—| | custom_fields.{gid}.is_set | All | Boolean | | custom_fields.{gid}.value | Text | String | | custom_fields.{gid}.value | Number | Number | | custom_fields.{gid}.value | Enum | Enum option ID | | custom_fields.{gid}.starts_with | Text only | String | | custom_fields.{gid}.ends_with | Text only | String | | custom_fields.{gid}.contains | Text only | String | | custom_fields.{gid}.less_than | Number only | Number | | custom_fields.{gid}.greater_than | Number only | Number | For example, if the gid of the custom field is 12345, these query parameter to find tasks where it is set would be custom_fields.12345.is_set=true. To match an exact value for an enum custom field, use the gid of the desired enum option and not the name of the enum option: custom_fields.12345.value=67890. Searching for multiple exact matches of a custom field is not supported. Note: If you specify projects.any and sections.any, you will receive tasks for the project and tasks for the section. If you’re looking for only tasks in a section, omit the projects.any from the request.