# Generated by ShowAPI OpenAPI generator # source: market/1892 # generated-at: 2026-07-25T21:58:35.004Z openapi: 3.0.3 info: title: Redis的HTTP接口 description: 使用HTTP接口调用您自己的Redis数据库,以完成增删查改以及数据库级别的建表、建索引、维护等所有指令,大大提升开发效率。也可以预定义查询语句并埋入变量,调用时传入变量值进行调用。演示时默认使用的是公用测试库,数据不定期清理。用于生产环境时, 请绑定自己的Redis数据源。 termsOfService: https://www.showapi.com/helpcenter/view#/4019/2 version: 1.0.0 servers: - url: https://route.showapi.com paths: /1892-26: x-pointCode: 26 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: remark: type: string redis_ret: type: string description: 如果键 key 不存在, 那么返回特殊值 nil ; 否则, 返回键 key 的值。 ret_code: type: number description: 业务返回体 operationId: 1892_26_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 在kv空间,需要获取的key值。 select_db: type: number required: - ds_id - key /1892-24: x-pointCode: 24 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: remark: type: string redis_ret: type: number description: 追加 value 之后, key 中字符串的长度。 ret_code: type: number description: 业务返回体 operationId: 1892_24_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要设置的key值 value: type: string minLength: 0 maxLength: 200000 description: 需要在key对应的value上添加的字符串。 select_db: type: number required: - ds_id - key - value /1892-23: x-pointCode: 23 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: remark: type: string redis_ret: type: string description: 操作成功完成时返回ok ret_code: type: number description: 业务返回体 operationId: 1892_23_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要设置的key值 value: type: string minLength: 0 maxLength: 200000 description: key对应的value值 select_db: type: number required: - ds_id - key - value /1892-22: x-pointCode: 22 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: remark: type: string redis_ret: type: string description: |- 设置成功时返回 OK 。 当 seconds 参数不合法时,返回一个错误。 ret_code: type: number description: 业务返回体 operationId: 1892_22_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要设置的key值 value: type: string minLength: 1 maxLength: 20000000 description: key对应的value值 seconds: type: number description: 生存时间,以秒为单位 select_db: type: number required: - ds_id - key - value - seconds /1892-21: x-pointCode: 21 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: remark: type: string redis_ret: type: number description: 执行 INCR 命令之后 key 的值。 ret_code: type: number description: 业务返回体 operationId: 1892_21_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要递增的的key值。 select_db: type: number required: - ds_id - key /1892-20: x-pointCode: 20 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: remark: type: string redis_ret: type: number description: 加上 increment 之后, key 的值。 ret_code: type: number description: 业务返回体 operationId: 1892_20_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要递增的的key值。 increment: type: number description: 递增值 select_db: type: number required: - ds_id - key - increment /1892-19: x-pointCode: 19 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: remark: type: string redis_ret: type: string description: 执行命令之后 key 的值。 ret_code: type: number description: 业务返回体 operationId: 1892_19_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要递增的的key值。 increment: type: number description: 递增值。 select_db: type: number required: - ds_id - key - increment /1892-18: x-pointCode: 18 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: remark: type: string redis_ret: type: string description: |- 返回给定 key 的旧值。 当 key 没有旧值时,也即是, key 不存在时,返回 nil 。 ret_code: type: number description: 业务返回体 operationId: 1892_18_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 需要设置的key值。 value: type: string description: 需要设置的value值。 select_db: type: number required: - ds_id - key - value /1892-17: x-pointCode: 17 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: remark: type: string redis_ret: type: string description: |- 给定域的值。 当给定域不存在或是给定 key 不存在时,返回 nil 。 ret_code: type: number description: 业务返回体 operationId: 1892_17_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 mapName: type: string description: map空间名称 key: type: string description: map里的某个key select_db: type: number required: - ds_id - mapName - key /1892-16: x-pointCode: 16 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: remark: type: string redis_ret: type: number description: 被成功移除的域的数量,不包括被忽略的域。 ret_code: type: number description: 业务返回体 operationId: 1892_16_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 mapName: type: string description: map空间名称 key: type: string description: 要删除map里的哪个属性 select_db: type: number required: - ds_id - mapName - key /1892-15: x-pointCode: 15 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: remark: type: string redis_ret: type: number description: |- 如果 field 是哈希表中的一个新建域,并且值设置成功,返回 1 。 如果哈希表中域 field 已经存在且旧值已被新值覆盖,返回 0 。 ret_code: type: number description: 业务返回体 operationId: 1892_15_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 mapName: type: string description: 操作命令数组,是一个jsonArray结构。 key: type: string description: 需要设置的key值 value: type: string description: key对应的value值 select_db: type: number required: - ds_id - mapName - key - value /1892-14: x-pointCode: 14 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: 1892_14_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 集合名称 member: type: string minLength: 1 maxLength: 20000000 description: 集合中成员的名称 score: type: number description: 集合中成员的排序值(权重值) select_db: type: number required: - ds_id - key - member - score /1892-13: x-pointCode: 13 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: 1892_13_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 集合名称 member: type: string minLength: 1 maxLength: 20000000 description: 集合中成员的名称 select_db: type: number required: - ds_id - key - member /1892-12: x-pointCode: 12 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: 1892_12_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 集合名称 select_db: type: number required: - ds_id - key /1892-11: x-pointCode: 11 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: 1892_11_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 start: type: number description: 排序开始的下标 stop: type: number minLength: 1 maxLength: 20000000 description: 排序结束的下标 key: type: string description: 要返回的有序集的key select_db: type: number required: - ds_id - start - stop - key /1892-10: x-pointCode: 10 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: 1892_10_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 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: 偏移量(跳过多少条数据) select_db: type: number required: - ds_id - key - min - max - count - offset /1892-9: x-pointCode: 9 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: remark: type: string redis_ret: type: number description: 执行 LPUSH 命令后,列表的长度。 ret_code: type: number description: 业务返回体 operationId: 1892_9_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 集合名称 value: type: string minLength: 1 maxLength: 20000000 description: 要插入的值 select_db: type: number required: - ds_id - key - value /1892-8: x-pointCode: 8 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: remark: type: string redis_ret: type: number description: 被删除 key 的数量。 ret_code: type: number description: 业务返回体 operationId: 1892_8_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 要删除的key值。包括kv,map ,set ,list 都可用。 select_db: type: number required: - ds_id - key /1892-7: x-pointCode: 7 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: remark: type: string redis_ret: type: number description: |- 设置成功返回 1 。 当 key 不存在或者不能为 key 设置生存时间时(比如在低于 2.1.3 版本的 Redis 中你尝试更新 key 的生存时间),返回 0 。 ret_code: type: number description: 业务返回体 operationId: 1892_7_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: key值。 seconds: type: number minimum: 1 maximum: 100000000 description: 过期时间,单位秒。 select_db: type: number required: - ds_id - key - seconds /1892-6: x-pointCode: 6 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: remark: type: string redis_ret: type: number description: 若 key 存在,返回 1 ,否则返回 0 。 ret_code: type: number description: 业务返回体 operationId: 1892_6_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: key值。 select_db: type: number required: - ds_id - key /1892-5: x-pointCode: 5 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: remark: type: string redis_ret: type: array items: type: string description: 符合给定模式的 key 列表。 ret_code: type: number redis_cursor: type: number description: 当前游标位置。如果需要分页查询后续记录,需要传递这个游标位置。 description: 业务返回体 operationId: 1892_5_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: 数据源 maxResult: type: number description: 每次返回的最大条数,由于redis本身特性,并不保证每次能返回此数字条数记录。最高只能到1000条记录。 cursor: type: number description: |- 当前游标值,从0开始。 游标参数被设置为 0 时, 服务器将开始一次新的迭代, 而当服务器向用户返回值为 0 的游标时, 表示迭代已结束。 select_db: type: number description: 选择哪个index数据库。通常是在第0号数据库。 required: - pattern - ds_id - maxResult - cursor /1892-4: x-pointCode: 4 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: remark: type: string redis_ret: type: number description: |- 当生存时间移除成功时,返回 1 . 如果 key 不存在或 key 没有设置生存时间,返回 0 。 ret_code: type: number description: 业务返回体 operationId: 1892_4_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 要移除过期时间的key值。 select_db: type: number required: - ds_id - key /1892-3: x-pointCode: 3 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: remark: type: string redis_ret: type: number description: |- 当 key 不存在时,返回 -2 。 当 key 存在但没有设置剩余生存时间时,返回 -1 。 否则,以秒为单位,返回 key 的剩余生存时间。 在 Redis 2.8 以前,当 key 不存在,或者 key 没有设置剩余生存时间时,命令都返回 -1 。 ret_code: type: number description: 业务返回体 operationId: 1892_3_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 key: type: string description: 要查看过期时间的key值。 select_db: type: number required: - ds_id - key /1892-1: x-pointCode: 1 x-mode: mapping x-read-timeout: 5 x-connect-timeout: 5 post: summary: Redis通用命令接口 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: remark: type: string redis_ret: type: object properties: {} description: |- 当 key 不存在时,返回 null,否则,返回 key 的值。 如果 key 不是字符串类型,那么返回一个错误。 ret_code: type: number description: 业务返回体 operationId: 1892_1_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: ds_id: type: string description: 数据源 cmdList: type: string description: 操作命令数组,是一个jsonArray结构。 select_db: type: number required: - ds_id - cmdList 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/1892?tab=book x-apiCode: "1892" x-is-own: false x-is-op: false