> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace the set of labels applied to a dataset

> Replace the entire set of labels applied to a dataset. Labels present in the request but not currently applied are added; labels currently applied but absent from the request are removed. An empty list removes all labels.



## OpenAPI

````yaml put /v1/datasets/{dataset_identifier}/labels
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/datasets/{dataset_identifier}/labels:
    put:
      tags:
        - datasets
      summary: Replace the set of labels applied to a dataset
      description: >-
        Replace the entire set of labels applied to a dataset. Labels present in
        the request but not currently applied are added; labels currently
        applied but absent from the request are removed. An empty list removes
        all labels.
      operationId: setDatasetLabelsForDataset
      parameters:
        - name: dataset_identifier
          in: path
          required: true
          schema:
            type: string
            description: >-
              The dataset identifier: either the dataset ID (GlobalID) or its
              name.
            title: Dataset Identifier
          description: >-
            The dataset identifier: either the dataset ID (GlobalID) or its
            name.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetDatasetLabelsRequestBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetDatasetLabelsForDatasetResponseBody'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '404':
          content:
            text/plain:
              schema:
                type: string
          description: Dataset or one or more dataset labels not found
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: Invalid dataset identifier or request body
components:
  schemas:
    SetDatasetLabelsRequestBody:
      properties:
        dataset_label_ids:
          items:
            type: string
          type: array
          title: Dataset Label Ids
          description: >-
            The complete set of dataset label GlobalIDs to apply to the dataset.
            Labels not in this list are removed from the dataset; an empty list
            removes all labels.
      type: object
      title: SetDatasetLabelsRequestBody
    SetDatasetLabelsForDatasetResponseBody:
      properties:
        data:
          items:
            $ref: '#/components/schemas/DatasetLabel'
          type: array
          title: Data
      type: object
      required:
        - data
      title: SetDatasetLabelsForDatasetResponseBody
    DatasetLabel:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        color:
          type: string
          title: Color
      type: object
      required:
        - id
        - name
        - description
        - color
      title: DatasetLabel

````