# Generated by ShowAPI OpenAPI generator # source: market/1893 # generated-at: 2026-09-04T21:50:01.403Z openapi: 3.0.3 info: title: Pika转HTTP接口 description: 使用HTTP接口调用您自己的PIKA数据库,以完成增删查改以及数据库级别的建表、建索引、维护等所有指令,大大提升开发效率。也可以预定义查询语句并埋入变量,调用时传入变量值进行调用。演示时默认使用的是公用测试库,数据不定期清理。用于生产环境时, 请绑定自己的PIKA数据源。 termsOfService: https://www.showapi.com/helpcenter/view#/4019/2 version: 1.0.0 servers: - url: https://route.showapi.com paths: /1893-26: x-pointCode: 26 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-mget description: | Strings空间进行mget操作. 返回所有指定的key的value。对于每个不对应string或者不存在的key,都返回特殊值nil。正因为此,这个操作从来不会失败。 返回值: array-reply: 指定的key对应的values的list 示例: 例子 redis> SET key1 "Hello" OK redis> SET key2 "World" OK redis> MGET key1 key2 nonexisting 1) "Hello" 2) "World" 3) (nil) responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_26_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 /1893-25: x-pointCode: 25 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-incrbyfloat description: |- Strings空间进行incrbyfloat操作。 通过指定浮点数key来增长浮点数(存放于string中)的值. 当键不存在时,先将其值设为0再操作.下面任一情况都会返回错误: key 包含非法值(不是一个string). 当前的key或者相加后的值不能解析为一个双精度的浮点值.(超出精度范围了) 如果操作命令成功, 相加后的值将替换原值存储在对应的键值上, 并以string的类型返回. string中已存的值或者相加参数可以任意选用指数符号,但相加计算的结果会以科学计数法的格式存储. 无论各计算的内部精度如何, 输出精度都固定为小数点后17位. 返回值: Bulk-string-reply: 当前key增加increment后的值。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_25_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 需要设置的key值。 increment: type: number description: 递增步长值。 ds_id: type: string description: 数据源 required: - key - increment - ds_id /1893-24: x-pointCode: 24 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-getset description: |- Strings空间进行getset操作。 自动将key对应到value并且返回原来key对应的value。如果key存在但是对应的value不是字符串,就返回错误。 GETSET可以和INCR一起使用实现支持重置的计数功能。举个例子:每当有事件发生的时候,一段程序都会调用INCR给key mycounter加1,但是有时我们需要获取计数器的值,并且自动将其重置为0。这可以通过GETSET mycounter “0”来实现,如下示例: INCR mycounter GETSET mycounter "0" GET mycounter responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_24_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 需要设置的key值。 value: type: string description: 需要设置的value值。 ds_id: type: string description: 数据源 required: - key - value - ds_id /1893-23: x-pointCode: 23 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: {} description: 业务返回体 operationId: 1893_23_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 在kv空间,需要获取的key值。 required: - ds_id - key /1893-22: x-pointCode: 22 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-incr description: |- Strings空间进行incr操作 对存储在指定key的数值执行原子的加1操作。 如果指定的key不存在,那么在执行incr操作之前,会先将它的值设定为0。 如果指定的key中存储的值不是字符串类型(fix:)或者存储的字符串类型不能表示为一个整数, 那么执行这个命令时服务器会返回一个错误(eq:(error) ERR value is not an integer or out of range)。 这个操作仅限于64位的有符号整型数据。 注意: 由于redis并没有一个明确的类型来表示整型数据,所以这个操作是一个字符串操作。 执行这个操作的时候,key对应存储的字符串被解析为10进制的64位有符号整型数据。 事实上,Redis 内部采用整数形式(Integer representation)来存储对应的整数值,所以对该类字符串值实际上是用整数保存,也就不存在存储整数的字符串表示(String representation)所带来的额外消耗。 返回值 integer-reply:执行递增操作后key对应的值。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_22_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 需要递增的的key值。 ds_id: type: string description: 数据源 required: - key - ds_id /1893-20: x-pointCode: 20 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Keys-persist description: | Keys命令组的persist指令。 移除给定key的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。 当生存时间移除成功时,返回 1 . 如果 key 不存在或 key 没有设置生存时间,返回 0 . responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_20_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 要移除过期时间的key值。 ds_id: type: string description: 数据源 required: - key - ds_id /1893-19: x-pointCode: 19 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Keys-ttl description: |- Keys命令组的ttl指令。 返回key剩余的过期时间。 这种反射能力允许Redis客户端检查指定key在数据集里面剩余的有效期。 在Redis 2.6和之前版本,如果key不存在或者已过期时返回-1。 从Redis2.8开始,错误返回值的结果有如下改变: 如果key不存在或者已过期,返回 -2 如果key存在并且没有设置过期时间(永久有效),返回 -1 。 返回值 Integer reply: key有效的秒数(TTL in seconds),或者一个负值的错误 (参考上文)。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_19_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 要查看过期时间的key值。 ds_id: type: string description: 数据源 required: - key - ds_id /1893-18: x-pointCode: 18 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Keys-keys description: |- Keys命令组的keys指令。 查找所有符合给定模式pattern(正则表达式)的 key 。 时间复杂度为O(N),N为数据库里面key的数量。 例如,Redis在一个有1百万个key的数据库里面执行一次查询需要的时间是40毫秒 。 警告: KEYS 的速度非常快,但在一个大的数据库中使用它仍然可能造成性能问题,如果你需要从一个数据集中查找特定的 KEYS, 你最好还是用 Redis 的集合结构 SETS 来代替。 支持的正则表达模式: h?llo 匹配 hello, hallo 和 hxllo h*llo 匹配 hllo 和 heeeello h[ae]llo 匹配 hello 和 hallo, 但是不匹配 hillo h[^e]llo 匹配 hallo, hbllo, … 但是不匹配 hello h[a-b]llo 匹配 hallo 和 hbllo 如果你想取消字符的特殊匹配(正则表达式,可以在它的前面加\。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_18_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: pattern: type: string description: 查找模式值。支持的正则表达模式: h?llo 匹配 hello, hallo 和 hxllo h*llo 匹配 hllo 和 heeeello h[ae]llo 匹配 hello 和 hallo, 但是不匹配 hillo h[^e]llo 匹配 hallo, hbllo, … 但是不匹配 hello h[a-b]llo 匹配 hallo 和 hbllo 如果你想取消字符的特殊匹配(正则表达式,可以在它的前面加\。 ds_id: type: string description: 数据源 required: - pattern - ds_id /1893-17: x-pointCode: 17 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Keys-exists description: | Keys命令组的exists指令。 返回key是否存在。 1 如果key存在 0 如果key不存在 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_17_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: key值。 ds_id: type: string description: 数据源 required: - key - ds_id /1893-16: x-pointCode: 16 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-set description: Strings空间进行set操作。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_16_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 需要设置的key值 value: type: string minLength: 0 maxLength: 200000 description: key对应的value值 ds_id: type: string description: 数据源 required: - key - value - ds_id /1893-15: x-pointCode: 15 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-incrby description: |- Strings空间进行incrby操作 将key对应的数字加decrement。如果key不存在,操作之前,key就会被置为0。如果key的value类型错误或者是个不能表示成数字的字符串,就返回错误。这个操作最多支持64位有符号的正型数字。 查看命令INCR了解关于增减操作的额外信息。 返回值 integer-reply: 增加之后的value值。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_15_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 在kv空间,需要获取的key值。 increment: type: number description: 递增值 ds_id: type: string description: 数据源 required: - key - increment - ds_id /1893-14: x-pointCode: 14 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-setex description: Strings空间进行setex操作,在set的基础上加上超时设置。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_14_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 ds_id: type: string description: 数据源 required: - key - value - expire - ds_id /1893-13: x-pointCode: 13 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: {} description: 业务返回体 operationId: 1893_13_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 /1893-12: x-pointCode: 12 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: {} description: 业务返回体 operationId: 1893_12_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 /1893-11: x-pointCode: 11 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: {} description: 业务返回体 operationId: 1893_11_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: mapName: type: string description: 操作命令数组,是一个jsonArray结构。 key: type: string value: type: string ds_id: type: string description: 数据源 required: - mapName - key - value - ds_id /1893-10: x-pointCode: 10 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: SortedSet-zrem description: | SortedSet命令组中的zrem指令。 删除一个set集合成员,zrem key mem1 mem2 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_10_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 集合名称 member: type: string minLength: 1 maxLength: 20000000 description: 集合中成员的名称 ds_id: type: string description: 数据源 required: - key - member - ds_id /1893-9: x-pointCode: 9 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: SortedSet-zcard description: | SortedSet命令组中的zcard指令。 获取一个set集合的成员数量,zcard key responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_9_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 集合名称 ds_id: type: string description: 数据源 required: - key - ds_id /1893-8: x-pointCode: 8 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: SortedSet-zadd description: |- SortedSet命令组中的zadd指令。 设置一个set集合成员的权重值,zadd name score key responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_8_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 集合名称 member: type: string minLength: 1 maxLength: 20000000 description: 集合中成员的名称 score: type: number description: 集合中成员的排序值(权重值) ds_id: type: string description: 数据源 required: - key - member - score - ds_id /1893-7: x-pointCode: 7 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: SortedSet-zrange description: |- 返回有序集 key 中,指定区间内的成员。 其中成员的位置按 score 值递增(从小到大)来排序。 具有相同 score 值的成员按字典序(lexicographical order )来排列。 下标参数 start 和 stop 都以 0 为底,也就是说,以 0 表示有序集第一个成员,以 1 表示有序集第二个成员,以此类推。 你也可以使用负数下标,以 -1 表示最后一个成员, -2 表示倒数第二个成员,以此类推。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_7_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: start: type: number description: 排序开始的下标 stop: type: number minLength: 1 maxLength: 20000000 description: 排序结束的下标 key: type: string description: 要返回的有序集的key ds_id: type: string description: 数据源 required: - start - stop - key - ds_id /1893-6: x-pointCode: 6 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: SortedSet-zrangebyscore description: |- SortedSet命令组中的ZRANGEBYSCORE 指令。 返回有序集 key 中,所有 score 值介于 min 和 max 之间(包括等于 min 或 max )的成员。有序集成员按 score 值递增(从小到大)次序排列。 具有相同 score 值的成员按字典序(lexicographical order)来排列(该属性是有序集提供的,不需要额外的计算)。 可选的 LIMIT 参数指定返回结果的数量及区间(就像SQL中的 SELECT LIMIT offset, count ),注意当 offset 很大时,定位 offset 的操作可能需要遍历整个有序集,此过程最坏复杂度为 O(N) 时间。 也就是说, 返回的 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: {} description: 业务返回体 operationId: 1893_6_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 有序集合名称 min: type: number minLength: 1 maxLength: 20000000 description: 匹配的最小score max: type: number description: 匹配的最大score count: type: number description: 返回数据量 offset: type: number description: 偏移量(跳过多少条数据) ds_id: type: string description: 数据源 required: - key - min - max - count - offset - ds_id /1893-5: x-pointCode: 5 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Lists-lpush description: 将一个或多个值 value 插入到列表 key 的表头 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_5_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 集合名称 value: type: string minLength: 1 maxLength: 20000000 description: 要插入的值 ds_id: type: string description: 数据源 required: - key - value - ds_id /1893-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: {} description: 业务返回体 operationId: 1893_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 /1893-3: x-pointCode: 3 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: {} description: 业务返回体 operationId: 1893_3_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 /1893-2: x-pointCode: 2 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Pika通用命令接口 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_2_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 /1893-1: x-pointCode: 1 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Strings-append description: |+ Strings空间进行append操作。 如果 key 已经存在,并且值为字符串,那么这个命令会把 value 追加到原来值(value)的结尾。 如果 key 不存在,那么它将首先创建一个空字符串的key,再执行追加操作,这种情况 APPEND 将类似于 SET 操作。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: {} description: 业务返回体 operationId: 1893_1_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: key: type: string description: 需要设置的key值 value: type: string minLength: 0 maxLength: 200000 description: 需要在key对应的value上添加的字符串。 ds_id: type: string description: 数据源 required: - key - value - 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/1893?tab=book x-apiCode: "1893" x-is-own: false x-is-op: false