Skip to main content

Get the Status of Alter Offset Request

GET 

/connect/v1/environments/:environment_id/clusters/:kafka_cluster_id/connectors/:connector_name/offsets/request/status

General Availability

Get the status of the previous alter offset request.

Request

Responses

Connector Offsets Request Status.

OpenAPI definition (YAML)
paths:
  /connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors/{connector_name}/offsets/request/status:
    get:
      x-lifecycle-stage: General Availability
      operationId: getConnectv1ConnectorOffsetsRequestStatus
      description: '[![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy)


        Get the status of the previous alter offset request.'
      tags:
      - Offsets (connect/v1)
      security:
      - cloud-api-key: []
      - confluent-sts-access-token: []
      responses:
        '200':
          description: Connector Offsets Request Status.
          content:
            application/json:
              schema:
                type: object
                description: "Status of the alter offset operation. The previous offsets in the response\
                  \ \nis the offsets that the connector last processed, before the offsets were altered,\n\
                  via a patch or delete operation."
                properties:
                  request:
                    type: object
                    description: The request made to alter offsets.
                    properties:
                      id:
                        type: string
                        description: The ID of the connector.
                      name:
                        type: string
                        description: The name of the connector.
                      offsets:
                        type: array
                        description: Array of offsets which are categorised into partitions.
                        items:
                          type: object
                          properties:
                            partition:
                              type: object
                              additionalProperties: true
                              description: "The partition information. For sink connectors this is the\
                                \ kafka topic and \npartition. For source connectors this is depends on\
                                \ the partitions defined by the \nsource connector. For example, the table\
                                \ which this task is pulling data from in a\nJDBC based MySQL source connector.\n\
                                Please refer to the [documentation](https://docs.confluent.io/cloud/current/connectors/offsets.html#manage-offsets-for-fully-managed-connectors-in-ccloud)\
                                \ for \nmore information."
                            offset:
                              type: object
                              additionalProperties: true
                              description: "The offset of the partition. For sink connectors this is the\
                                \ kafka offset. For \nsource connectors this is depends on the offset\
                                \ defined by the source connector. \nFor example, the timestamp and incrementing\
                                \ column info in a table, for a JDBC based \nMySQL source connector.\n\
                                Please refer to the [documentation](https://docs.confluent.io/cloud/current/connectors/offsets.html#manage-offsets-for-fully-managed-connectors-in-ccloud)\
                                \ for \nmore information."
                        title: connect.v1.Offsets
                      requested_at:
                        type: string
                        format: date-time
                        readOnly: true
                        example: '2024-02-20 15:14:19+00:00'
                        description: The time at which the request was made. The time is in UTC, ISO 8601
                          format.
                      type:
                        type: string
                        enum:
                        - PATCH
                        - DELETE
                        description: "The type of alter operation. PATCH will update the offset to the\
                          \ provided values.\nThe update will only happen for the partitions provided\
                          \ in the request. \nDELETE will delete the offset for the provided partitions\
                          \ and reset them back to the\nbase state. It is as if, a fresh new connector\
                          \ was created.\n\nFor sink connectors PATCH/DELETE will move the offsets to\
                          \ the provided point in the \ntopic partition. If the offset provided is not\
                          \ present in the topic partition it will\nby default reset to the earliest offset\
                          \ in the topic partition.\n\nFor source connectors, post PATCH/DELETE the connector\
                          \ will attempt to read from the \nposition defined in the altered offsets."
                        title: connect.v1.AlterOffsetRequestType
                    required:
                    - id
                    - name
                    - type
                    - requested_at
                    title: connect.v1.AlterOffsetRequestInfo
                  status:
                    type: object
                    description: The response of the alter offsets operation.
                    properties:
                      phase:
                        type: string
                        description: "The phase of the alter offset operation. \n\nPENDING: The offset\
                          \ alter operation is in progress.\n\nAPPLIED: The offset alter operation has\
                          \ been applied to the connector.\n\nFAILED:  The offset alter operation has\
                          \ failed to be applied to the connector."
                        enum:
                        - PENDING
                        - PENDING_VALIDATION
                        - APPLIED
                        - FAILED
                      message:
                        type: string
                        description: An info message from the alter offset operation.
                    required:
                    - phase
                  previous_offsets:
                    type: array
                    description: Array of offsets which are categorised into partitions.
                    items:
                      type: object
                      properties:
                        partition:
                          type: object
                          additionalProperties: true
                          description: "The partition information. For sink connectors this is the kafka\
                            \ topic and \npartition. For source connectors this is depends on the partitions\
                            \ defined by the \nsource connector. For example, the table which this task\
                            \ is pulling data from in a\nJDBC based MySQL source connector.\nPlease refer\
                            \ to the [documentation](https://docs.confluent.io/cloud/current/connectors/offsets.html#manage-offsets-for-fully-managed-connectors-in-ccloud)\
                            \ for \nmore information."
                        offset:
                          type: object
                          additionalProperties: true
                          description: "The offset of the partition. For sink connectors this is the kafka\
                            \ offset. For \nsource connectors this is depends on the offset defined by\
                            \ the source connector. \nFor example, the timestamp and incrementing column\
                            \ info in a table, for a JDBC based \nMySQL source connector.\nPlease refer\
                            \ to the [documentation](https://docs.confluent.io/cloud/current/connectors/offsets.html#manage-offsets-for-fully-managed-connectors-in-ccloud)\
                            \ for \nmore information."
                    title: connect.v1.Offsets
                  applied_at:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2024-02-20 15:14:19+00:00'
                    readOnly: true
                    description: The time at which the offsets were applied. The time is in UTC, ISO 8601
                      format.
                required:
                - request
                - status
                title: connect.v1.AlterOffsetStatus
              examples:
                sink - pending patch operation:
                  value:
                    request:
                      id: lcc-sa32er
                      name: MySinkConnector
                      offsets:
                      - partition:
                          kafka_partition: 0
                          kafka_topic: topic_A
                        offset:
                          kafka_offset: 1000
                      requested_at: '2024-02-20 15:14:19+00:00'
                      type: PATCH
                    status:
                      phase: PENDING
                    applied_at: null
                source - applied patch operation:
                  value:
                    request:
                      id: lcc-x1sdfs
                      name: MySourceConnector
                      offsets:
                      - partition:
                          protocol: 1
                          table: sourcedb.sourcetable
                        offset:
                          timestamp_nanos: 0
                          incrementing: 3
                          timestamp: 1699000000000
                      requested_at: '2024-02-20 15:14:19+00:00'
                      type: PATCH
                    status:
                      phase: APPLIED
                      message: The Connect framework-managed offsets for this connector have been altered
                        successfully. However, if this connector manages offsets externally, they will
                        need to be altered manually in the system that the connector uses.
                    previous_offsets:
                    - partition:
                        protocol: 1
                        table: sourcedb.sourcetable
                      offset:
                        timestamp_nanos: 0
                        incrementing: 2
                        timestamp: 1698329479943
                    applied_at: 2024-02-20T15:14:20+0000
                delete:
                  value:
                    request:
                      id: lcc-234ds
                      name: MySourceConnector
                      offsets: []
                      requested_at: '2024-02-20 15:14:19+00:00'
                      type: DELETE
                    status:
                      phase: APPLIED
                      message: The Connect framework-managed offsets for this connector have been reset
                        successfully. However, if this connector manages offsets externally, they will
                        need to be reset manually in the system that the connector uses.
                    previous_offsets:
                    - partition:
                        protocol: 1
                        table: sourcedb.sourcetable
                      offset:
                        timestamp_nanos: 0
                        incrementing: 2
                        timestamp: 1698329479943
                    applied_at: '2024-02-20 15:14:20+00:00'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    description: Connector Error with error code and message.
                    properties:
                      code:
                        type: integer
                        description: Error code for the type of error
                      message:
                        type: string
                        description: Human readable error message
                title: connect.v1.ConnectorError
              example:
                error:
                  code: 400
                  message: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    description: Connector Error with error code and message.
                    properties:
                      code:
                        type: integer
                        description: Error code for the type of error
                      message:
                        type: string
                        description: Human readable error message
                title: connect.v1.ConnectorError
              example:
                error:
                  code: 401
                  message: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    description: Connector Error with error code and message.
                    properties:
                      code:
                        type: integer
                        description: Error code for the type of error
                      message:
                        type: string
                        description: Human readable error message
                title: connect.v1.ConnectorError
              example:
                error:
                  code: 403
                  message: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    description: Connector Error with error code and message.
                    properties:
                      code:
                        type: integer
                        description: Error code for the type of error
                      message:
                        type: string
                        description: Human readable error message
                title: connect.v1.ConnectorError
              example:
                error:
                  code: 404
                  message: resource not found
        '429':
          description: Rate Limit Exceeded
          headers:
            X-Request-Id:
              schema:
                type: string
              description: The unique identifier for the API request.
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The maximum number of requests you're permitted to make per time period.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests remaining in the current rate limit window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: "The relative time in seconds until the current rate-limit window resets. \
                \ \n  \n**Important:** This differs from Github and Twitter's same-named header which\
                \ uses UTC epoch seconds. We use relative time to avoid client/server time synchronization\
                \ issues."
            Retry-After:
              schema:
                type: integer
              description: The number of seconds to wait until the rate limit window resets. Only sent
                when the rate limit is reached.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    description: Connector Error with error code and message.
                    properties:
                      code:
                        type: integer
                        description: Error code for the type of error
                      message:
                        type: string
                        description: Human readable error message
                title: connect.v1.ConnectorError
              example:
                error:
                  code: 500
                  message: Oops, something went wrong
      parameters:
      - name: connector_name
        in: path
        schema:
          type: string
        required: true
        description: The unique name of the connector.
      - name: environment_id
        in: path
        schema:
          type: string
        required: true
        description: The unique identifier of the environment this resource belongs to.
      - name: kafka_cluster_id
        in: path
        schema:
          type: string
        required: true
        description: The unique identifier for the Kafka cluster.
      servers:
      - url: https://api.confluent.cloud
        description: Confluent Cloud API