Polkadot coretime API

Coretime system information

OpenAPI Specification

polkadot-coretime-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Polkadot REST Account coretime API
  description: High-performance Rust REST API for Substrate/Polkadot blockchain data. Drop-in replacement for substrate-api-sidecar.
  contact:
    url: https://github.com/paritytech/polkadot-rest-api
  license:
    name: GPL-3.0-or-later
  version: 0.1.3
servers:
- url: http://localhost:8080/v1
  description: Localhost
tags:
- name: coretime
  description: Coretime system information
paths:
  /v1/coretime/info:
    get:
      tags:
      - coretime
      summary: Get coretime info
      description: Returns coretime chain status information including the last committed timeslice.
      operationId: coretime_info
      parameters:
      - name: at
        in: query
        description: Block identifier (number or hash)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Coretime info
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block identifier
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
  /v1/coretime/leases:
    get:
      tags:
      - coretime
      summary: Get coretime leases
      description: Returns all leases registered on a coretime chain with task IDs and validity timeslices.
      operationId: coretime_leases
      parameters:
      - name: at
        in: query
        description: Block identifier (number or hash)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Coretime leases
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block identifier
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
  /v1/coretime/overview:
    get:
      tags:
      - coretime
      summary: Get coretime overview
      description: Returns an overview of all cores with assignments, queue state, workload, workplan, and regions.
      operationId: coretime_overview
      parameters:
      - name: at
        in: query
        description: Block identifier (number or hash)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Coretime overview
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block identifier
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
  /v1/coretime/regions:
    get:
      tags:
      - coretime
      summary: Get coretime regions
      description: Returns all regions on a coretime chain including begin/end timeslices, core, owner, and mask.
      operationId: coretime_regions
      parameters:
      - name: at
        in: query
        description: Block identifier (number or hash)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Coretime regions
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block identifier
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
  /v1/coretime/renewals:
    get:
      tags:
      - coretime
      summary: Get coretime potential renewals
      description: Returns potential renewals on a coretime chain sorted by core index, including price, completion status, and task assignment.
      operationId: coretime_renewals
      parameters:
      - name: at
        in: query
        description: Block identifier (number or hash)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Coretime renewals
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block identifier
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
  /v1/coretime/reservations:
    get:
      tags:
      - coretime
      summary: Get coretime reservations
      description: Returns all reservations on a coretime chain. Reserved cores are permanently allocated and not available for sale.
      operationId: coretime_reservations
      parameters:
      - name: at
        in: query
        description: Block identifier (number or hash)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Coretime reservations
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid block identifier
        '500':
          description: Internal server error
        '503':
          description: Service unavailable
  /api/scan/broker/assigns:
    post:
      consumes:
      - application/json
      description: Returns paginated coretime assignment records filtered by paraId and core.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.assignParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.RegionAssignedJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime assignments
      tags:
      - coretime
      x-synonyms:
      - coretime
      - assignments
      - scan
      - broker
      - assigns
      - core lease
      - compute time
  /api/scan/broker/operation:
    post:
      consumes:
      - application/json
      description: Returns a paginated list of broker operation events filtered by address, core, core index, event ID, and block range.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.operationParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.OperationJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime broker operations
      tags:
      - coretime
      x-synonyms:
      - coretime
      - broker
      - operations
      - scan
      - operation
      - core lease
      - compute time
  /api/scan/broker/purchased:
    post:
      consumes:
      - application/json
      description: Returns paginated purchased coretime regions with optional cycle, core, and purchase-type filters.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.purchasedParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.RegionPurchasedJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List purchased coretime regions
      tags:
      - coretime
      x-synonyms:
      - purchased
      - coretime
      - regions
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/region:
    post:
      consumes:
      - application/json
      description: Returns detailed information for a coretime region by core_index.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.regionParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                $ref: '#/definitions/internal_pluginv2_pallets_coretime.RegionInfoJson'
              message:
                type: string
            type: object
      summary: Get coretime region information
      tags:
      - coretime
      x-synonyms:
      - coretime
      - region
      - information
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/regions:
    post:
      consumes:
      - application/json
      description: Returns paginated coretime regions filtered by owner, lifecycle status, and block boundaries.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.regionListParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.RegionInfoJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime regions
      tags:
      - coretime
      x-synonyms:
      - coretime
      - regions
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/sale:
    post:
      consumes:
      - application/json
      description: Returns coretime sale information filtered by region begin and sales cycle.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.saleParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                $ref: '#/definitions/internal_pluginv2_pallets_coretime.SaleInfoJson'
              message:
                type: string
            type: object
      summary: Get coretime sale information
      tags:
      - coretime
      x-synonyms:
      - coretime
      - sale
      - information
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/sales:
    post:
      consumes:
      - application/json
      description: Returns paginated historical coretime sale records.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.saleHistoryParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.SaleListItemJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime sale history
      tags:
      - coretime
      x-synonyms:
      - coretime
      - sale
      - history
      - scan
      - broker
      - sales
      - core lease
      - compute time
  /api/scan/broker/workload/details:
    post:
      consumes:
      - application/json
      description: Returns workload details for a region and requires either core or para_id.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.workloadDetailsParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                $ref: '#/definitions/internal_pluginv2_pallets_coretime.CoreWorkloadsPlansJson'
              message:
                type: string
            type: object
      summary: Get coretime workload details
      tags:
      - coretime
      x-synonyms:
      - coretime
      - workload
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/workload/history:
    post:
      consumes:
      - application/json
      description: Returns paginated workload history and requires either core or para_id.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.workloadHistoryParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.WorkloadHistoryJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime workload history
      tags:
      - coretime
      x-synonyms:
      - coretime
      - workload
      - history
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/workloads:
    post:
      consumes:
      - application/json
      description: Returns paginated workload summaries for the latest or specified region.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.workloadsParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.CoreWorkLoadsJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime workloads
      tags:
      - coretime
      x-synonyms:
      - coretime
      - workloads
      - scan
      - broker
      - core lease
      - compute time
  /api/scan/broker/workplans:
    post:
      consumes:
      - application/json
      description: Returns paginated coretime workplan records filtered by paraId and core.
      parameters:
      - description: params
        in: body
        name: params
        required: true
        schema:
          $ref: '#/definitions/internal_pluginv2_pallets_coretime.workplanParams'
      produces:
      - application/json
      responses:
        '200':
          description: OK
          schema:
            properties:
              code:
                type: integer
              data:
                properties:
                  count:
                    type: integer
                  list:
                    items:
                      $ref: '#/definitions/internal_pluginv2_pallets_coretime.CoreWorkplanInfoJson'
                    type: array
                type: object
              message:
                type: string
            type: object
      summary: List coretime workplans
      tags:
      - coretime
      x-synonyms:
      - coretime
      - workplans
      - scan
      - broker
      - core lease
      - compute time
  /coretime/leases:
    get:
      tags:
      - coretime
      summary: Get all the leases currently registered on coretime chain.
      description: ''
      operationId: getCoretimeLeases
      parameters:
      - name: blockId
        in: query
        description: Block identifier, as the block height or block hash.
        required: false
        schema:
          pattern: ^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoretimeLeasesResponse'
  /coretime/regions:
    get:
      tags:
      - coretime
      summary: Get all the regions currently registered on coretime chain.
      description: ''
      operationId: getCoretimeRegions
      parameters:
      - name: blockId
        in: query
        description: Block identifier, as the block height or block hash.
        required: false
        schema:
          pattern: ^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoretimeRegionsResponse'
  /coretime/renewals:
    get:
      tags:
      - coretime
      summary: Get all the potential renewals currently registered on coretime chain.
      description: ''
      operationId: getCoretimeRenewals
      parameters:
      - name: blockId
        in: query
        description: Block identifier, as the block height or block hash.
        required: false
        schema:
          pattern: ^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoretimeRenewalsResponse'
  /coretime/reservations:
    get:
      tags:
      - coretime
      summary: Get all the reservations currently registered on coretime chain.
      description: ''
      operationId: getCoretimeReservations
      parameters:
      - name: blockId
        in: query
        description: Block identifier, as the block height or block hash.
        required: false
        schema:
          pattern: ^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoretimeReservationsResponse'
  /coretime/info:
    get:
      tags:
      - coretime
      summary: Get the generic information about coretime, either on coretime chain or relay chain.
      description: ''
      parameters:
      - name: blockId
        in: query
        description: Block identifier, as the block height or block hash.
        required: false
        schema:
          pattern: ^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}
          type: string
      operationId: getCoretimeInfo
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CoretimeChainInfoResponse'
                - $ref: '#/components/schemas/CoretimeRelayInfoResponse'
  /coretime/overview:
    get:
      tags:
      - coretime
      summary: Get all the cores information either on coretime chain or relay chain.
      description: ''
      operationId: getCoretimeCores
      parameters:
      - name: blockId
        in: query
        description: Block identifier, as the block height or block hash.
        required: false
        schema:
          pattern: ^0[xX][0-9a-fA-F]{1,64}$|[0-9]{1,12}
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CoretimeChainCoresResponse'
                - $ref: '#/components/schemas/CoretimeRelayCoresResponse'
components:
  schemas:
    CoretimeWorkplanInfo:
      type: object
      properties:
        isPool:
          type: boolean
          description: Whether the workload is a pool.
        isTask:
          type: boolean
          description: Whether the workload is a task.
        mask:
          type: string
          description: The mask.
        task:
          type: string
          description: The parachain id.
    CoretimeRegion:
      type: object
      properties:
        core:
          type: string
          description: The core id.
        begin:
          type: string
          description: The begin time.
        end:
          type: string
          description: The end time.
        owner:
          type: string
          description: The owner of the region.
        paid:
          type: string
          description: The paid price.
        mask:
          type: string
          description: The mask.
    CoretimeReservationsResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        reservations:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeReservation'
    CoretimeLease:
      type: object
      properties:
        task:
          type: string
          description: The parachain id.
        until:
          type: string
          description: The lease expiry time.
        core:
          type: string
          description: The core id.
    CoretimeRelayCoresResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        cores:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRelayCoreDescriptor'
    CoretimeRenewalsResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        renewals:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRenewal'
    CoretimeUntil:
      type: string
      description: The lease expiry time.
    CoretimeLeasesResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        leases:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeLease'
    CoretimeRegionsResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        regions:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRegion'
    CoretimeRelayCoreDescriptor:
      type: object
      properties:
        paraId:
          type: string
          description: The parachain id.
        type:
          type: string
          description: The parachain type.
        info:
          type: object
          properties:
            currentWork:
              type: object
              properties:
                assignments:
                  type: array
                  items:
                    type: object
                    properties:
                      isPool:
                        type: boolean
                        description: Whether the workload is a pool.
                      isTask:
                        type: boolean
                        description: Whether the workload is a task.
                      ratio:
                        type: string
                        description: The ratio of the workload.
                      remaining:
                        type: string
                        description: The remaining workload.
                      task:
                        type: string
                        description: The parachain id.
                endHint:
                  type: string
                  description: The end hint.
                pos:
                  type: string
                  description: The position.
                step:
                  type: string
                  description: The step.
            queue:
              type: object
              properties:
                first:
                  type: string
                  description: The first assignment in queue.
                last:
                  type: string
                  description: The last assignment in queue.
    CoretimeChainCoresResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        cores:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeCore'
    CoretimeWorkplan:
      type: object
      properties:
        core:
          type: string
          description: The core id.
        timeslice:
          type: string
          description: The timeslice.
        info:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeWorkplanInfo'
    CoretimeMask:
      type: string
      description: The mask.
    BlockIdentifiers:
      type: object
      properties:
        hash:
          type: string
          description: The block's hash.
          format: hex
        height:
          type: string
          description: The block's height.
          format: unsignedInteger
    CoretimeConfig:
      type: object
      properties:
        interludeLength:
          type: string
          description: The interlude length.
        leadinLength:
          type: string
          description: The leadin length.
        regionLength:
          type: string
          description: The region length.
        relayBlocksPerTimeslice:
          type: string
          description: The number of relay chain blocks per timeslice.
    CoretimeCore:
      type: object
      properties:
        coreId:
          type: string
          description: The core id.
        paraId:
          type: string
          description: The parachain core.
        workload:
          type: object
          $ref: '#/components/schemas/CoretimeWorkload'
        workplan:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeWorkplan'
        type:
          description: The paid price.
          type: object
          properties:
            condition:
              type: string
              description: Type of assignment.
            details:
              type: object
              oneOf:
              - $ref: '#/components/schemas/CoretimeUntil'
              - $ref: '#/components/schemas/CoretimeMask'
        regions:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRegion'
    CoretimeChainInfoResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        configuration:
          $ref: '#/components/schemas/CoretimeConfig'
        currentRegion:
          type: object
          properties:
            start:
              type: string
              description: The start time.
            end:
              type: string
              description: The end time.
        cores:
          type: object
          properties:
            total:
              type: string
              description: The total number of cores.
            available:
              type: string
              description: The number of free cores.
            sold:
              type: string
              description: The number of reserved cores.
            currentCorePrice:
              type: string
              description: The current core price.
            selloutPrice:
              type: string
              description: The sellout price.
            firstCore:
              type: string
              description: The first core id.
    CoretimeWorkload:
      type: object
      properties:
        isPool:
          type: boolean
          description: Whether the workload is a pool.
        isTask:
          type: boolean
          description: Whether the workload is a task.
        mask:
          type: string
          description: The mask.
        task:
          type: string
          description: The parachain id.
    CoretimeReservation:
      type: object
      properties:
        task:
          type: string
          description: The parachain id.
        mask:
          type: string
          description: The mask.
    CoretimeRelayInfoResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        brokerId:
          type: string
          description: The broker parachain id.
        palletVersion:
          type: string
          description: The pallet version.
        maxHistoricalRevenue:
          type: string
          description: The maximum historical revenue.
    CoretimeRenewal:
      type: object
      properties:
        completion:
          type: string
          description: The completion status.
        core:
          type: string
          description: The core id.
        mask:
          type: string
          description: The mask.
        price:
          type: string
          description: The renewal price.
        task:
          type: string
          description: The parachain id.
        when:
          type: string
          description: The renewal time.
definitions:
  subscan_internal_model.AccountParentJson:
    properties:
      address:
        type: string
      display:
        type: string
      identity:
        type: boolean
      sub_symbol:
        type: string
    type: object
  internal_pluginv2_pallets_coretime.regionParams:
    properties:
      core_index:
        example: 12345-1260-20-12333121323217721
        maxLength: 80
        minLength: 0
        type: string
    required:
    - core_index
    type: object
  internal_pluginv2_pallets_coretime.assignParams:
    properties:
      core:
        example: 10
        type: integer
      order:
        enum:
        - asc
        - desc
        type: string
      page:
        description: Page number, starting from 0
        example: 0
        minimum: 0
        type: integer
      paraId:
        example: 1000
        type: integer
      row:
        description: Data size per page
        example: 10
        maximum: 500
        minimum: 1
        type: integer
    type: object
  internal_pluginv2_pallets_coretime.purchasedParams:
    properties:
      core:
        example: 10
        minimum: 0
        type: integer
      page:
        description: Page number, starting from 0
        example: 0
        minimum: 0
        type: integer
      purchased_type:
        enum:
        - bulk
        - renewed
        type: string
      region_begin:
        description: Address       string `json:"address" form:"address" binding:"omitempty,addr"`
        example: 10
        minimum: 1
        type: integer
      row:
        description: Data size per page
        example: 10
        maximum: 1000
        minimum: 1
        type: integer
      sales_cycle:
        example: 10
        minimum: 1
        type: integer
    type: object
  subscan_internal_model.Accoun

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/polkadot/refs/heads/main/openapi/polkadot-coretime-api-openapi.yml