# Generated by ShowAPI OpenAPI generator
# source: market/1888
# generated-at: 2026-06-26T01:59:44.745Z
openapi: 3.0.3
info:
  title: SSDB转HTTP接口
  description: 使用HTTP接口调用您自己的SSDB数据库，以完成增删查改以及数据库级别的建表、建索引、维护等所有指令，大大提升开发效率。也可以预定义查询语句并埋入变量，调用时传入变量值进行调用。演示时默认使用的是公用测试库，数据不定期清理。
  termsOfService: https://www.showapi.com/helpcenter/view#/4019/2
  version: 1.0.0
servers:
  - url: https://route.showapi.com
paths:
  /1888-15:
    x-pointCode: 15
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: SortedSet-zkeys
      description: |
        SortedSet命令组中的zkeys指令。
        列出 zset 中的 key 列表。
        指令格式为：zkeys name key_start score_start score_end limit

        列出 zset 中处于区间 (key_start+score_start, score_end] 的 key-score 列表. 如果 key_start 为空, 那么对应权重值大于或者等于 score_start 的 key 将被返回. 如果 key_start 不为空, 那么对应权重值大于 score_start 的 key, 或者大于 key_start 且对应权重值等于 score_start 的 key 将被返回.

        也就是说, 返回的 key 在 (key.score == score_start && key > key_start || key.score > score_start), 并且key.score <= score_end 区间。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 权重值范围内的key
                          remark:
                            type: string
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1888_15_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 集合名称
                key_start:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: 字典序的开始。
                score_start:
                  type: number
                  description: 权重开始值。
                score_end:
                  type: number
                  description: 权重结束值。
                limit:
                  type: number
                  description: 限制返回条数。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name
                - key_start
                - score_start
                - score_end
                - limit
                - ds_id
  /1888-14:
    x-pointCode: 14
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Lists-qpush-front
      description: |-
        Lists命令组中的qpush_front指令。
        往队列的首部添加一个或者多个元素。
         
        指令格式为：qpush_front name item1 item2 ...
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 向队列首部插入一条记录
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_14_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 队列名称
                key_start:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: 插入的元素
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name
                - key_start
                - ds_id
  /1888-13:
    x-pointCode: 13
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: SortedSet-zlist
      description: |
        SortedSet命令组中的zlist 指令。
        列出名字处于区间 (name_start, name_end] 的 zset , 
        指令格式为： zlist name_start name_end limit
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: set集合
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_13_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name_start:
                  type: string
                  description: 字典序的开始。
                name_end:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: 字典序的结束。
                limit:
                  type: number
                  description: 限制返回长度。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name_start
                - name_end
                - limit
                - ds_id
  /1888-12:
    x-pointCode: 12
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: SortedSet-zsize
      description: |
        SortedSet命令组中的zsize指令。
        获取一个set集合的成员数量，zsize name
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 集合中元素个数
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_12_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 集合名称
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name
                - ds_id
  /1888-11:
    x-pointCode: 11
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: SortedSet-zdel
      description: |
        SortedSet命令组中的zdel指令。
        删除一个set集合成员，zdel name key
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 删除1条记录
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_11_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 集合名称
                key:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: 集合中key的名称
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name
                - key
                - ds_id
  /1888-10:
    x-pointCode: 10
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: SortedSet-zset
      description: |-
        SortedSet命令组中的zset指令。
        设置一个set集合成员的权重值，zset name key score  
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_10_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 集合名称
                key:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: 集合中key的名称
                score:
                  type: number
                  description: 集合中key的排序值（权重值）
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name
                - key
                - score
                - ds_id
  /1888-9:
    x-pointCode: 9
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Keys-expire
      description: |-
        Keys命令组的expire指令。
        对key值设置过期时间。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: number
                            description: 修改了一条记录的存放时间
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_9_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                key:
                  type: string
                  description: key值。
                ttl:
                  type: number
                  minimum: 1
                  maximum: 100000000
                  description: 过期时间，单位秒。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - key
                - ttl
                - ds_id
  /1888-8:
    x-pointCode: 8
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: SortedSet-zget
      description: |-
        SortedSet命令组中的zget指令。
        获取一个set集合成员的权重值，zget name key
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 指定key对应的权重值
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_8_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 集合名称。
                key:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: 集合中key的名称
                ds_id:
                  type: string
                  description: 数据源
              required:
                - name
                - key
                - ds_id
  /1888-7:
    x-pointCode: 7
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Hashs-hget
      description: |-
        Hashs命令组的hget指令。
        map空间进行hget操作
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: string
                            description: 指定map中指定key对应的value
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_7_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                mapName:
                  type: string
                  description: map空间名称
                key:
                  type: string
                  description: map里的哪个key
                ds_id:
                  type: string
                  description: 数据源
              required:
                - mapName
                - key
                - ds_id
  /1888-6:
    x-pointCode: 6
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Hashs-hdel
      description: |-
        Hashs命令组的hdel指令。
        map空间进行hdel操作，可以理解为删除map的一个属性值。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: number
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_6_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                mapName:
                  type: string
                  description: map空间名称
                key:
                  type: string
                  description: 要删除map里的哪个属性
                ds_id:
                  type: string
                  description: 数据源
              required:
                - mapName
                - key
                - ds_id
  /1888-5:
    x-pointCode: 5
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Strings-get
      description: Strings空间进行get操作
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: string
                            description: 指定key对应的value
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_5_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                key:
                  type: string
                  description: 在kv空间，需要获取的key对应的值。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - key
                - ds_id
  /1888-4:
    x-pointCode: 4
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Keys-del
      description: |-
        Keys命令组的del指令。
        删除key对象，包括Strings，map ,set ,list 都可用。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: number
                            description: 删除了一个key
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_4_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                key:
                  type: string
                  description: 要删除的key值。包括kv，map ,set ,list 都可用。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - key
                - ds_id
  /1888-3:
    x-pointCode: 3
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Strings-setx
      description: Strings空间进行setx操作，在set的基础上加上超时设置。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 存入一条数据
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_3_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                key:
                  type: string
                  description: 需要设置的key值
                value:
                  type: string
                  minLength: 1
                  maxLength: 20000000
                  description: key对应的value值
                expire:
                  type: number
                  minimum: 1
                  maximum: 100000000
                  description: 保留的时间,单位秒
                ds_id:
                  type: string
                  description: 数据源
              required:
                - key
                - value
                - expire
                - ds_id
  /1888-2:
    x-pointCode: 2
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: Hashs-hset
      description: |-
        Hashs命令组的hset指令。
        对hashmap空间进行hset操作
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: number
                            description: 存入一条信息
                          remark:
                            type: string
                            description: 返回信息
                          ret_code:
                            type: number
                            description: 为0时表示成功
                        description: 业务返回体
      operationId: 1888_2_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                mapName:
                  type: string
                  description: 需要设置的hashmap
                key:
                  type: string
                  description: hashmap中的key
                value:
                  type: string
                  description: 设置key对应的value
                ds_id:
                  type: string
                  description: 数据源
              required:
                - mapName
                - key
                - value
                - ds_id
  /1888-1:
    x-pointCode: 1
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: ssdb通用命令接口
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ssdb_ret:
                            type: array
                            items:
                              type: string
                            description: 不同的命令返回结果不一致
                          remark:
                            type: string
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1888_1_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                cmdList:
                  type: string
                  description: 操作命令数组，是一个jsonArray结构。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - cmdList
                - ds_id
components:
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: appKey
      description: 从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp
  schemas:
    ShowapiResEnvelope:
      type: object
      description: ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）
      properties:
        showapi_res_code:
          type: integer
          description: API 返回的状态码
        showapi_res_error:
          type: string
          description: API 返回的错误信息
        showapi_res_id:
          type: string
          description: API 请求的唯一标识
        showapi_fee_num:
          type: integer
          description: API 调用计费次数
security:
  - AppKeyAuth: []
externalDocs:
  url: https://www.showapi.com/apiGateway/view/1888?tab=book
x-apiCode: "1888"
x-is-own: false
x-is-op: true
