> ## 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 Results

Return functional profile results as JSON. The returned JSON has the following top-level structure:

| 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 across all functional groups and gene families, as well as taxonomic
information.
Each object in the array has the following fields:

| Property                       | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **group\_name** *string*       | The name of the functional group this result corresponds to. This will be one of the following: `pathways`, `metacyc`, `eggnog`, `go`, `ko`, `ec`, `pfam`, or `reaction`.                                                                                                                                                                                                                               |
| **id** *string*                | A group-specific unique ID, e.g., GO:0006096, PF16874, COG0148.                                                                                                                                                                                                                                                                                                                                         |
| **metric** *string*            | The quantitative metric represented by the `value` field. This field will be one of the following values: `cpm` (counts per million), `rpk` (reads per kilobase), `abundance`, `complete_abundance`, or `coverage`. The `abundance`, `complete_abundance` and `coverage` metrics will *only* be present for pathway results, while `cpm` and `rpk` metrics are present for all other functional groups. |
| **name** *string*              | The name of the function.                                                                                                                                                                                                                                                                                                                                                                               |
| **taxa\_stratified** *boolean* | A boolean indicating whether or not this result is associated with a specific organism.                                                                                                                                                                                                                                                                                                                 |
| **taxon\_id** *string*         | The NCBI taxonomy ID for the organism associated with this function.                                                                                                                                                                                                                                                                                                                                    |
| **taxon\_name** *string*       | The name of the organism.                                                                                                                                                                                                                                                                                                                                                                               |
| **value** *number*             | Gene family or pathway abundance in the unit specified by the `metric` field.                                                                                                                                                                                                                                                                                                                           |

<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}/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}/results:
    get:
      summary: GET functional_profiles results
      operationId: get_functional_profiles_results
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
components:
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````