Those APIs design for authorization token verification.
Note that all requests require a RequestToken field in the request header, generated from the other fields in the request + the internal rotor_token MD5.
- Desc
- Index
- Consts
- Validate User Account
- Can Access
- Can Manage
- Can ManageSpecial
- Can Modify
- Can Delete
const UNIT_TYPE_TEAM = 1 // cloud team
const UNIT_TYPE_TEAM_MEMBER = 2 // cloud team member
const UNIT_TYPE_USER = 3 // cloud user
const UNIT_TYPE_INVITE = 4 // cloud invite
const UNIT_TYPE_DOMAIN = 5 // cloud domain
const UNIT_TYPE_BILLING = 6 // cloud billing
const UNIT_TYPE_APP = 7 // builder app
const UNIT_TYPE_COMPONENTS = 8 // builder components
const UNIT_TYPE_RESOURCE = 9 // resource resource
const UNIT_TYPE_ACTION = 10 // resource action
const UNIT_TYPE_TRANSFORMER = 11 // resource transformer
const UNIT_TYPE_JOB = 12 // hub job
Check if the current user is legal.
GET /api/v1/accessControl/account/validateResult
Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoxNiwidXVpZCI6IjdlNzY0ZDBlLWM4NjAtNDNjMS04ZThjLWUwMGRkMzEyNTExMyIsInJuZCI6IjAwMDI5OSIsImlzcyI6IklMTEEiLCJleHAiOjE2NzM5NDI5Nzh9.bVAtUusjnZSipfquPKmKileXJbFfl1XoLJbRSQ-Mk2c"
RequestToken: bash64(md5(sort($Authorization)))
// none
// HTTP 200
// or
// HTTP 400
Whether the current user can have access to the resource.
GET /api/v1/accessControl/team/:teamID/unitType/:unitType/unitID/:unitID/attribute/canAccess/:attributeID
Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoxNiwidXVpZCI6IjdlNzY0ZDBlLWM4NjAtNDNjMS04ZThjLWUwMGRkMzEyNTExMyIsInJuZCI6IjAwMDI5OSIsImlzcyI6IklMTEEiLCJleHAiOjE2NzM5NDI5Nzh9.bVAtUusjnZSipfquPKmKileXJbFfl1XoLJbRSQ-Mk2c"
RequestToken: bash64(md5(sort($Authorization+$teamID+$unitType+$unitID+$attributeID)))
// none
// HTTP 200
// or
// HTTP 400
Whether the current user can manage the resource
GET /api/v1/accessControl/team/:teamID/unitType/:unitType/unitID/:unitID/attribute/canManage/:attributeID
Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoxNiwidXVpZCI6IjdlNzY0ZDBlLWM4NjAtNDNjMS04ZThjLWUwMGRkMzEyNTExMyIsInJuZCI6IjAwMDI5OSIsImlzcyI6IklMTEEiLCJleHAiOjE2NzM5NDI5Nzh9.bVAtUusjnZSipfquPKmKileXJbFfl1XoLJbRSQ-Mk2c"
RequestToken: bash64(md5(sort($Authorization+$teamID+$unitType+$unitID+$attributeID)))
// none
// HTTP 200
// or
// HTTP 400
Whether the current user can manage special attributes of the current resource.
GET /api/v1/accessControl/team/:teamID/unitType/:unitType/unitID/:unitID/attribute/canManageSpecial/:attributeID
Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoxNiwidXVpZCI6IjdlNzY0ZDBlLWM4NjAtNDNjMS04ZThjLWUwMGRkMzEyNTExMyIsInJuZCI6IjAwMDI5OSIsImlzcyI6IklMTEEiLCJleHAiOjE2NzM5NDI5Nzh9.bVAtUusjnZSipfquPKmKileXJbFfl1XoLJbRSQ-Mk2c"
RequestToken: bash64(md5(sort($Authorization+$teamID+$unitType+$unitID+$attributeID)))
// none
// HTTP 200
// or
// HTTP 400
Whether the current user can modify the resource.
GET /api/v1/accessControl/team/:teamID/unitType/:unitType/unitID/:unitID/attribute/canModify/:attributeID/from/:fromID/to/:toID
Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoxNiwidXVpZCI6IjdlNzY0ZDBlLWM4NjAtNDNjMS04ZThjLWUwMGRkMzEyNTExMyIsInJuZCI6IjAwMDI5OSIsImlzcyI6IklMTEEiLCJleHAiOjE2NzM5NDI5Nzh9.bVAtUusjnZSipfquPKmKileXJbFfl1XoLJbRSQ-Mk2c"
RequestToken: bash64(md5(sort($Authorization+$teamID+$unitType+$unitID+$attributeID+$from+$to)))
// none
// HTTP 200
// or
// HTTP 400
Whether the current user can delete the resource.
GET /api/v1/accessControl/team/:teamID/unitType/:unitType/unitID/:unitID/attribute/canDelete/:attributeID
Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoxNiwidXVpZCI6IjdlNzY0ZDBlLWM4NjAtNDNjMS04ZThjLWUwMGRkMzEyNTExMyIsInJuZCI6IjAwMDI5OSIsImlzcyI6IklMTEEiLCJleHAiOjE2NzM5NDI5Nzh9.bVAtUusjnZSipfquPKmKileXJbFfl1XoLJbRSQ-Mk2c"
RequestToken: bash64(md5(sort($Authorization+$teamID+$unitType+$unitID+$attributeID)))
// none
// HTTP 200
// or
// HTTP 400