0.0.2 • Published 9 months ago

jc-cp-oss v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

jcoss-jssdk

安装

npm i @jcpp/jcoss-js-sdk

title: jcoss v1.0.0 language_tabs:

  • shell: Shell
  • http: HTTP
  • javascript: JavaScript
  • ruby: Ruby
  • python: Python
  • php: PHP
  • java: Java
  • go: Go toc_footers: [] includes: [] search: true code_clipboard: true highlight_theme: darkula headingLevel: 2 generator: "@tarslib/widdershins v4.0.17"

jcoss

v1.0.0

Base URLs:

Default

GET 根据用户ID获取信息

GET /4a-api/users/06bbf411490a45f89ccdbcdd78946809

请求参数

名称位置类型必选说明
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET 获取用户信息

GET /4a-api/applications/99c2ea8a0c2909bd02b8d98f0ca6ee46/users

请求参数

名称位置类型必选说明
per_pagequerystringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET ceph获取桶信息

GET /buckets/usage

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST 测试sdk创建对象(上传文件)

POST /object/file/upload

Body 请求参数

file: string
bucketId: 8faab16bf32270f8d9e1b787088539b5

请求参数

名称位置类型必选说明
bodybodyobjectnone
» filebodystring(binary)none
» bucketIdbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

4a用户管理

POST 管理员创建用户

POST /users

Body 请求参数

{
  "username": "chihaiz",
  "name": "池海州",
  "departmentIds": [
    "112d74285b14ea90cfecaf308c523549"
  ],
  "status": 4
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
bodybodyobjectnone
» usernamebodystringnone
» namebodystringnone
» departmentIdsbodystringnone
» statusbodyintegernone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST 管理员创建租户

POST /tenants

Body 请求参数

{
  "userId": "bcb3986513cf43bb30883a5d9b0db13a",
  "userName": "wangcs",
  "quotaByte": "1073741824",
  "maxBucket": "100"
}

请求参数

名称位置类型必选说明
Authorizationheaderstringnone
Acceptheaderstringnone
bodybodyobjectnone
» userIdbodystringnone
» userNamebodystringnone
» quotaBytebodystringnone
» maxBucketbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

PUT 修改租户(桶)配额

PUT /tenants

Body 请求参数

{
  "userId": "bcb3986513cf43bb30883a5d9b0db13a",
  "maxBucket": "100",
  "quotaByte": "2147483648"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» userIdbodystringnone
» maxBucketbodystringnone
» quotaBytebodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

分布式对象存储系统

POST 用户登录

POST /auth

Body 请求参数

{
  "username": "zhangjiwei",
  "password": "2d4a14c188108ce799d9433bf2e35953eddf0c4772fc49c5e35a6f77161d48fc",
  "appid": "99c2ea8a0c2909bd02b8d98f0ca6ee46",
  "type": "rbac"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
bodybodyobjectnone
» usernamebodystringnone
» passwordbodystringnone
» appidbodystringnone
» typebodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET 查询租户信息

GET /tenants/login-user

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

存储桶管理

GET 查询所有存储桶信息

GET /buckets

Body 请求参数

{}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST 创建存储桶

POST /buckets

Body 请求参数

{
  "bucketName": "zjw水桶1",
  "authType": 0,
  "remark": "wcs水桶1"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» bucketNamebodystringnone
» authTypebodyintegernone
» remarkbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

PUT 编辑存储桶

PUT /buckets/e8d74793a98a38ebf7a858028dc05cbc

Body 请求参数

{
  "userId": "bcb3986513cf43bb30883a5d9b0db13a"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» userIdbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

DELETE 删除桶

DELETE /buckets/82da35547c3e9cfc42aa43f6402c44f6

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

PUT 迁移桶

PUT /buckets/e8d74793a98a38ebf7a858028dc05cbc/migrate

Body 请求参数

{
  "userId": "bcb3986513cf43bb30883a5d9b0db13a"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» userIdbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

文件夹管理

GET 获取文件夹下所有数据

GET /bucket/e8d74793a98a38ebf7a858028dc05cbc/directory/e8d74793a98a38ebf7a858028dc05cbc/objects

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET 获取文件夹

GET /bucket/e8d74793a98a38ebf7a858028dc05cbc/directory/7609548e11c25baaea805fd6c796798d

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST 创建文件夹

POST /bucket/e8d74793a98a38ebf7a858028dc05cbc/directory

Body 请求参数

{
  "name": "isme",
  "parentId": "e8d74793a98a38ebf7a858028dc05cbc"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» namebodystringnone
» parentIdbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

PUT 文件夹重命名

PUT /bucket/e8d74793a98a38ebf7a858028dc05cbc/directory/352a1c70802e38fcdda7d065533257dd

Body 请求参数

{
  "name": "metoo"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» namebodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

DELETE 删除文件夹

DELETE /bucket/e8d74793a98a38ebf7a858028dc05cbc/directory/352a1c70802e38fcdda7d065533257dd

Body 请求参数

{}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

PUT 移动文件夹

PUT /bucket/e8d74793a98a38ebf7a858028dc05cbc/directory/migrate

Body 请求参数

{
  "id": "ea96b8b8cc0d68ff964ff2fa2f1a958a",
  "parentId": "8faab16bf32270f8d9e1b787088539b5"
}

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» idbodystringnone
» parentIdbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

对象管理

GET 查询所有对象信息

GET /objects

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST 创建对象(上传文件)

POST /bucket/8faab16bf32270f8d9e1b787088539b5/directory/8d83370e36fcce2e25588734030128ca/object

Body 请求参数

file: string

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone
bodybodyobjectnone
» filebodystring(binary)none

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET 获取对象(下载文件)

GET /bucket/8faab16bf32270f8d9e1b787088539b5/object/0eef186a06052972c903845e10ec604e

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

DELETE 删除对象

DELETE /bucket/8faab16bf32270f8d9e1b787088539b5/object/10135d0cd2135524ddf4f91d70c3bcbf

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

POST 分享对象

POST /bucket/8faab16bf32270f8d9e1b787088539b5/object/0eef186a06052972c903845e10ec604e/share

请求参数

名称位置类型必选说明
Acceptheaderstringnone
Authorizationheaderstringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

GET 分享对象下载

GET /share/b0f7eb1bcd8845e13be780db5cc14173

Body 请求参数

{
  "passwd": "0d52"
}

请求参数

名称位置类型必选说明
bodybodyobjectnone
» passwdbodystringnone

返回示例

200 Response

{}

返回结果

状态码状态码含义说明数据模型
200OK成功Inline

返回数据结构

数据模型