11.2.4.6 Create Permissions


Interface Address /hub/createPerm
Description Resource owner creates the permissions of accessing to the resource in the Hub for third parties. Permissions WRITE means store resource, UPDATE means update resource, READ means read resource. An authorization can only be accessed once, and an authorization with the same uid and the same permission cannot be created again without access. However, the permissions of UPDATE and READ from the server side will return the same result for each call.
Interface request parameter
No. Parameter Type Required Description
1 CreatePermissionReq Y Wrapper class
CreatePermissionReq
1 uid String Y ID in the Hub
2 grant String Y Permissions
3 grantUid String Y Authorized ID in the Hub
4 grantPublicKey String Y Authorized public key
5 grantEncryptKey String N Encryption key. READ/UPDATE permission is required
6 url String N The path of the stored resource. READ/UPDATE permission is required
7 sign String Y Signature
Interface response parameter
No. Parameter Type Description
1 AddPermissionResult Response data
AddPermissionResult
1 url String The path of the stored resource
2 key String Ciphertext key to encrypt the resource (encrypted using the authorized public key)
© 2019-2021 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2022-05-12 15:53:17

results matching ""

    No results matching ""

    results matching ""

      No results matching ""