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

# Get project dataset metadata

> Get the raw data metadata for this project



## OpenAPI

````yaml /.assets/openapi.yaml get /api/{projectId}/raw-data/project-metadata
openapi: 3.0.0
info:
  title: Edge Impulse API
  version: 1.0.0
servers:
  - url: https://studio.edgeimpulse.com/v1
security:
  - ApiKeyAuthentication: []
  - JWTAuthentication: []
  - JWTHttpHeaderAuthentication: []
  - OAuth2: []
paths:
  /api/{projectId}/raw-data/project-metadata:
    get:
      tags:
        - Raw data
      summary: Get project dataset metadata
      description: Get the raw data metadata for this project
      operationId: getRawDataProjectMetadata
      parameters:
        - $ref: '#/components/parameters/ProjectIdParameter'
        - name: includeDisabled
          in: query
          required: false
          description: >-
            Whether to include enabled-only samples, or both enabled and
            disabled samples (defaults to both).
          schema:
            type: string
            enum:
              - both
              - enabled
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRawDataProjectMetadataResponse'
components:
  parameters:
    ProjectIdParameter:
      name: projectId
      in: path
      required: true
      description: Project ID
      schema:
        type: integer
  schemas:
    GetRawDataProjectMetadataResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - metadata
          properties:
            metadata:
              discriminator:
                propertyName: type
                mapping:
                  classes:
                    $ref: '#/components/schemas/ProjectDatasetMetadataClasses'
                  regression:
                    $ref: '#/components/schemas/ProjectDatasetMetadataRegression'
              oneOf:
                - $ref: '#/components/schemas/ProjectDatasetMetadataClasses'
                - $ref: '#/components/schemas/ProjectDatasetMetadataRegression'
    GenericApiResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the operation succeeded
        error:
          type: string
          description: Optional error description (set if 'success' was false)
    ProjectDatasetMetadataClasses:
      allOf:
        - $ref: '#/components/schemas/ProjectDatasetMetadataCommon'
        - type: object
          required:
            - type
            - training
            - testing
            - validation
            - postProcessing
            - all
          properties:
            type:
              type: string
              enum:
                - classes
            training:
              $ref: '#/components/schemas/ProjectDatasetMetadataClassesCategory'
              description: Training dataset metadata
            testing:
              $ref: '#/components/schemas/ProjectDatasetMetadataClassesCategory'
              description: Testing dataset metadata
            validation:
              $ref: '#/components/schemas/ProjectDatasetMetadataClassesCategory'
              description: Validation dataset metadata
            postProcessing:
              $ref: '#/components/schemas/ProjectDatasetMetadataClassesCategory'
              description: Post-processing dataset metadata
            all:
              $ref: '#/components/schemas/ProjectDatasetMetadataClassesCategory'
              description: Overall dataset metadata
    ProjectDatasetMetadataRegression:
      allOf:
        - $ref: '#/components/schemas/ProjectDatasetMetadataCommon'
        - type: object
          required:
            - type
            - training
            - testing
            - validation
            - postProcessing
            - all
          properties:
            type:
              type: string
              enum:
                - regression
            training:
              $ref: '#/components/schemas/ProjectDatasetMetadataRegressionCategory'
              description: Training dataset metadata
            testing:
              $ref: '#/components/schemas/ProjectDatasetMetadataRegressionCategory'
              description: Testing dataset metadata
            validation:
              $ref: '#/components/schemas/ProjectDatasetMetadataRegressionCategory'
              description: Validation dataset metadata
            postProcessing:
              $ref: '#/components/schemas/ProjectDatasetMetadataRegressionCategory'
              description: Post-processing dataset metadata
            all:
              $ref: '#/components/schemas/ProjectDatasetMetadataRegressionCategory'
              description: Overall dataset metadata
    ProjectDatasetMetadataCommon:
      type: object
      description: Overall dataset metadata info
      required:
        - ratio
        - labelQueueCount
        - totalItemCount
      properties:
        ratio:
          discriminator:
            propertyName: type
            mapping:
              no-ratio:
                $ref: '#/components/schemas/ProjectDatasetMetadataRatioNoRatio'
              classes:
                $ref: '#/components/schemas/ProjectDatasetMetadataRatioClasses'
              regression:
                $ref: '#/components/schemas/ProjectDatasetMetadataRatioRegression'
          oneOf:
            - $ref: '#/components/schemas/ProjectDatasetMetadataRatioNoRatio'
            - $ref: '#/components/schemas/ProjectDatasetMetadataRatioClasses'
            - $ref: '#/components/schemas/ProjectDatasetMetadataRatioRegression'
        labelQueueCount:
          type: integer
        totalItemCount:
          type: integer
    ProjectDatasetMetadataClassesCategory:
      allOf:
        - $ref: '#/components/schemas/ProjectDatasetMetadataBase'
        - type: object
          required:
            - type
            - fullLabelCount
            - labels
          properties:
            type:
              type: string
              enum:
                - classes
            fullLabelCount:
              type: integer
            labels:
              type: array
              items:
                $ref: '#/components/schemas/RawDataLabelDistributionLabel'
    ProjectDatasetMetadataRegressionCategory:
      allOf:
        - $ref: '#/components/schemas/ProjectDatasetMetadataBase'
        - type: object
          required:
            - type
            - labelsCount
            - minLabel
            - maxLabel
            - valueGroups
          properties:
            type:
              type: string
              enum:
                - regression
            labelsCount:
              type: integer
            minLabel:
              type: number
            maxLabel:
              type: number
            valueGroups:
              type: array
              items:
                $ref: >-
                  #/components/schemas/RawDataLabelDistributionRegressionValueGroup
            groupsPerLabelMapKey:
              type: object
              additionalProperties:
                $ref: >-
                  #/components/schemas/RawDataLabelDistributionRegressionValueGroupsPerKey
    ProjectDatasetMetadataRatioNoRatio:
      type: object
      description: Placeholder dataset ratio info when no ratio is available
      required:
        - type
        - hasValidationCategory
        - count
      properties:
        type:
          type: string
          enum:
            - no-ratio
        hasValidationCategory:
          type: boolean
        count:
          $ref: '#/components/schemas/ProjectDatasetMetadataRatioCount'
    ProjectDatasetMetadataRatioClasses:
      type: object
      description: Dataset ratio info for classification datasets
      required:
        - type
        - hasValidationCategory
        - trainingRatio
        - testingRatio
        - validationRatio
        - showImbalanceTooltip
        - showRebalanceDataset
        - showTrainTestSplit
        - categoryData
        - count
      properties:
        type:
          type: string
          enum:
            - classes
        hasValidationCategory:
          type: boolean
        trainingRatio:
          type: number
        testingRatio:
          type: number
        validationRatio:
          type: number
        showImbalanceTooltip:
          type: boolean
        showRebalanceDataset:
          type: boolean
        showTrainTestSplit:
          type: boolean
        invalidRatioClasses:
          type: array
          items:
            $ref: '#/components/schemas/ProjectDatasetMetadataRatioClass'
        allRatioClasses:
          type: array
          items:
            $ref: '#/components/schemas/ProjectDatasetMetadataRatioClass'
        categoryData:
          type: array
          items:
            $ref: '#/components/schemas/ProjectDatasetMetadataCategoryData'
        count:
          $ref: '#/components/schemas/ProjectDatasetMetadataRatioCount'
    ProjectDatasetMetadataRatioRegression:
      type: object
      description: Dataset ratio info for regression datasets
      required:
        - type
        - hasValidationCategory
        - trainingRatio
        - testingRatio
        - validationRatio
        - categoryData
        - count
      properties:
        type:
          type: string
          enum:
            - regression
        hasValidationCategory:
          type: boolean
        trainingRatio:
          type: number
        testingRatio:
          type: number
        validationRatio:
          type: number
        categoryData:
          type: array
          items:
            $ref: '#/components/schemas/ProjectDatasetMetadataCategoryData'
        count:
          $ref: '#/components/schemas/ProjectDatasetMetadataRatioCount'
    ProjectDatasetMetadataBase:
      type: object
      description: >-
        Dataset metadata info, for a particular data category, shared between
        classification and regression data types.
      required:
        - type
        - totalLength
        - totalLengthNumber
        - maxLengthMs
        - minLengthMs
        - minFrequency
        - maxFrequency
        - itemCount
        - isTimeseries
        - isFeatures
        - metadataFilterOptions
      properties:
        type:
          type: string
          enum:
            - classes
            - regression
        totalLength:
          type: string
        totalLengthNumber:
          type: integer
        maxLengthMs:
          type: integer
        minLengthMs:
          type: integer
        minFrequency:
          type: integer
        maxFrequency:
          type: integer
        itemCount:
          type: integer
        isTimeseries:
          type: boolean
        isFeatures:
          type: boolean
        metadataFilterOptions:
          $ref: '#/components/schemas/MetadataFilterOptions'
    RawDataLabelDistributionLabel:
      type: object
      required:
        - label
        - totalLength
        - totalLengthStr
        - dataCount
      properties:
        label:
          type: string
        totalLength:
          type: integer
          description: >-
            Total sample length for the label in milliseconds. For data types
            without a duration-based total this may be 0.
          example: 189152
        totalLengthStr:
          type: string
          description: >-
            Total sample length for the label given as a UI-friendly formatted
            string.
          example: 3m 9s
        dataCount:
          type: integer
          description: Total sample data count for the label.
          example: 19
    RawDataLabelDistributionRegressionValueGroup:
      type: object
      description: >-
        Shows a single "bucket" of the data distribution for a regression
        dataset.
      required:
        - groupMin
        - groupMax
        - totalLength
        - totalLengthStr
        - dataCount
      properties:
        groupMin:
          type: number
          description: Group minimum value
        groupMax:
          type: number
          description: Group maximum value
        totalLength:
          type: integer
          description: >-
            Total sample length within this group in milliseconds. For data
            types without a duration-based total this may be 0.
        totalLengthStr:
          type: string
          description: >-
            Total sample length within this group given as a UI-friendly
            formatted string.
        dataCount:
          type: integer
          description: Total sample data count within this group.
    RawDataLabelDistributionRegressionValueGroupsPerKey:
      type: object
      description: >-
        Shows the data distribution for a regression dataset, for a particular
        label key.
      required:
        - minLabel
        - maxLabel
        - valueGroupsGlobalScale
        - valueGroupsLocalScale
      properties:
        minLabel:
          type: number
          description: Minimum overall label for this label key.
        maxLabel:
          type: number
          description: Maximum overall label for this label key.
        valueGroupsGlobalScale:
          type: array
          description: >-
            Data distribution for this label key, given on a "global" scale
            (scaled relative to all label keys).
          items:
            $ref: '#/components/schemas/RawDataLabelDistributionRegressionValueGroup'
        valueGroupsLocalScale:
          type: array
          description: >-
            Data distribution for this label key, given on a "local" scale
            (scaled only based on values for this label key).
          items:
            $ref: '#/components/schemas/RawDataLabelDistributionRegressionValueGroup'
    ProjectDatasetMetadataRatioCount:
      type: object
      description: Per-dataset data count
      required:
        - training
        - testing
        - validation
      properties:
        training:
          type: integer
        testing:
          type: integer
        validation:
          type: integer
    ProjectDatasetMetadataRatioClass:
      type: object
      description: Dataset ratio info for a single class
      required:
        - trainingRatio
        - testingRatio
        - validationRatio
        - label
        - total
        - totalTraining
        - totalTesting
        - totalValidation
        - totalTrainingStr
        - totalTestingStr
        - totalValidationStr
      properties:
        trainingRatio:
          description: Training dataset ratio
          type: number
        testingRatio:
          description: Testing dataset ratio
          type: number
        validationRatio:
          description: Validation dataset ratio
          type: number
        label:
          description: Class name or label
          type: string
        total:
          description: Total item count
          type: number
        totalTraining:
          description: Total training dataset item count
          type: number
        totalTesting:
          description: Total testing dataset item count
          type: number
        totalValidation:
          description: Total validation dataset item count
          type: number
        totalTrainingStr:
          description: Total training dataset item count, given as a UI-friendly string
          type: string
        totalTestingStr:
          description: Total testing dataset item count, given as a UI-friendly string
          type: string
        totalValidationStr:
          description: Total validation dataset item count, given as a UI-friendly string
          type: string
    ProjectDatasetMetadataCategoryData:
      type: object
      description: Dataset ratio info for a single category and label
      required:
        - length
        - category
        - label
      properties:
        length:
          description: Total length
          type: number
        category:
          $ref: '#/components/schemas/RawDataCategory'
          description: Data category
        label:
          description: Data class name or label
          type: string
    MetadataFilterOptions:
      type: object
      required:
        - totalCount
        - count
        - optionsList
      properties:
        totalCount:
          type: integer
        count:
          type: integer
        optionsList:
          type: array
          description: >-
            Available metadata filter options that can be supplied to the
            /raw-data/ endpoint to filter samples
          items:
            type: object
            required:
              - key
              - options
            properties:
              key:
                example: locationId
                type: string
              options:
                type: array
                example:
                  - buildingA
                  - buildingB
                items:
                  type: string
    RawDataCategory:
      type: string
      enum:
        - training
        - testing
        - validation
        - post-processing
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: x-api-key
    JWTAuthentication:
      type: apiKey
      in: cookie
      name: jwt
    JWTHttpHeaderAuthentication:
      type: apiKey
      in: header
      name: x-jwt-token
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /v1/oauth/authorize
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        implicit:
          authorizationUrl: /v1/oauth/authorize
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        password:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        clientCredentials:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information

````