Kusama coretime API

The coretime API from Kusama — 6 operation(s) for coretime.

OpenAPI Specification

kusama-coretime-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Substrate API Sidecar accounts coretime API
  description: '> ⚠️ **Deprecation Notice** — `substrate-api-sidecar` is deprecated in favor of

    > [`polkadot-rest-api`](https://github.com/paritytech/polkadot-rest-api), a ground-up Rust rewrite

    > built on [`subxt`](https://github.com/paritytech/subxt) with 1:1 API compatibility (endpoints

    > served under `/v1/`, e.g. `/v1/blocks/head`), stable memory under sustained load, significantly

    > lower latency and higher throughput, and native SCALE decoding via `parity-scale-codec`.

    >

    > **Migrate today:** Docker `paritytech/polkadot-rest-api:v0.1.0` ·

    > [crate](https://crates.io/crates/polkadot-rest-api) ·

    > [migration guide](https://github.com/paritytech/polkadot-rest-api/blob/main/docs/guides/MIGRATION.md) ·

    > [docs](https://paritytech.github.io/polkadot-rest-api/) ·

    > [issues](https://github.com/paritytech/polkadot-rest-api/issues)


    Substrate API Sidecar is a REST service that makes it easy to interact with blockchain nodes

    built using Substrate''s FRAME framework.

    '
  contact:
    url: https://github.com/paritytech/substrate-api-sidecar
  license:
    name: GPL-3.0-or-later
    url: https://github.com/paritytech/substrate-api-sidecar/blob/master/LICENSE
  version: 20.14.1
servers:
- url: https://polkadot-public-sidecar.parity-chains.parity.io/
  description: Polkadot Parity public sidecar
- url: https://kusama-public-sidecar.parity-chains.parity.io/
  description: Kusama Parity public sidecar
- url: https://polkadot-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Polkadot Asset Hub Parity public sidecar
- url: https://kusama-asset-hub-public-sidecar.parity-chains.parity.io/
  description: Kusama Asset Hub Parity public sidecar
- url: http://localhost:8080
  description: Localhost
tags:
- name: coretime
paths:
  /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:
    CoretimeReservationsResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        reservations:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeReservation'
    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.
    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.
    CoretimeChainCoresResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        cores:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeCore'
    CoretimeReservation:
      type: object
      properties:
        task:
          type: string
          description: The parachain id.
        mask:
          type: string
          description: The mask.
    CoretimeRenewalsResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        renewals:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRenewal'
    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.
    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.
    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.
    BlockIdentifiers:
      type: object
      properties:
        hash:
          type: string
          description: The block's hash.
          format: hex
        height:
          type: string
          description: The block's height.
          format: unsignedInteger
    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.
    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.
    CoretimeRelayCoresResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        cores:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRelayCoreDescriptor'
    CoretimeLeasesResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        leases:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeLease'
    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'
    CoretimeRegionsResponse:
      type: object
      properties:
        at:
          $ref: '#/components/schemas/BlockIdentifiers'
        regions:
          type: array
          items:
            $ref: '#/components/schemas/CoretimeRegion'
    CoretimeMask:
      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.
    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'
    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.
    CoretimeUntil:
      type: string
      description: The lease expiry time.