> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onecodex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Functional Profile Filtered Results

Return filtered functional profile results as JSON. The returned JSON is similar in structure to the
results returned by the [functional profile results](/api-reference/functional-profile-resource-results)
route. However, this route returns a simplified and filtered version of the results, which only includes a
specified functional group, metric, and taxa stratification option. All ambiguous results, such as
unmapped or ungrouped entries, are filtered out.

| Property                | Description                                                                    |
| ----------------------- | ------------------------------------------------------------------------------ |
| **n\_mapped** *integer* | The number of reads that were successfully mapped to a gene family or pathway. |
| **n\_reads** *integer*  | The number of reads present in the sample.                                     |
| **table** *array*       | An array of objects consisting of individual functional groups (format below). |

The `table` array contains results for a single functional group and metric, and also includes taxonomic information.
Each object in the array has the following fields:

| Property                 | Description                                                          |
| ------------------------ | -------------------------------------------------------------------- |
| **id** *string*          | A group-specific unique ID, e.g., GO:0006096, PF16874, COG0148.      |
| **name** *string*        | The name of the function.                                            |
| **value** *number*       | Gene family or pathway abundance in the specified `metric`.          |
| **taxon\_id** *string*   | The NCBI taxonomy ID for the organism associated with this function. |
| **taxon\_name** *string* | The name of the organism.                                            |

<Warning>
  **Warning**: The above JSON format is specific to the current version of the functional analysis job. This format is stable and guaranteed to remain stable for this version of the job. However, future versions of the functional analysis job may alter the format or introduce new changes. Please use caution and include fallbacks when writing non-exploratory code using the above route. Please also feel free to [reach out](mailto:support@onecodex.com) if you'd like to discuss this format and any forthcoming changes with us.
</Warning>


## OpenAPI

````yaml GET /api/v1/functional_profiles/{id}/filtered_results
openapi: 3.1.0
info:
  description: >-
    The One Codex API (v1) -- programmatic access to One Codex's suite of
    microbial genomics data storage, analysis, and query tools.
  title: One Codex API (v1)
  version: v1
servers:
  - url: https://app.onecodex.com
security:
  - apiKeyAuth: []
paths:
  /api/v1/functional_profiles/{id}/filtered_results:
    get:
      summary: GET functional_profiles filtered_results
      operationId: get_functional_profiles_filtered_results
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: functional_group
          required: true
          schema:
            enum:
              - pathways
              - metacyc
              - eggnog
              - go
              - ko
              - ec
              - pfam
              - reaction
            type: string
        - in: query
          name: metric
          required: true
          schema:
            enum:
              - rpk
              - cpm
              - abundance
              - coverage
              - complete_abundance
            type: string
        - in: query
          name: taxa_stratified
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  n_mapped:
                    minimum: 0
                    title: N Mapped
                    type: integer
                  n_reads:
                    minimum: 0
                    title: N Reads
                    type: integer
                  table:
                    items:
                      properties:
                        id:
                          title: Id
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                          default: null
                          title: Name
                        taxon_id:
                          anyOf:
                            - type: string
                            - type: 'null'
                          default: null
                          title: Taxon Id
                        taxon_name:
                          anyOf:
                            - type: string
                            - type: 'null'
                          default: null
                          title: Taxon Name
                        value:
                          title: Value
                          type: number
                      required:
                        - id
                        - value
                      title: _FunctionalFilteredResultsRow
                      type: object
                    title: Table
                    type: array
                required:
                  - n_mapped
                  - n_reads
                  - table
                title: FunctionalFilteredResultsResponse
                type: object
          description: OK
components:
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````