public interface PermissionsApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<PermissionDetail> |
createPermission(Permission permission)
Creates a permission record.
|
retrofit2.Call<Message> |
deletePermission(String guid)
Delete a permission record, removing a user's access to an entity.
|
retrofit2.Call<PermissionDetailResourceList> |
getPermissionsForEntity(String entityType,
String entityId)
Get a set of permission records for an entity.
|
retrofit2.Call<PermissionDetailResourceList> |
getPermissionsForUser(String userId)
Get a set of permission records granted to a user.
|
retrofit2.Call<PermissionDetail> |
updatePermission(String guid,
Permission permission)
Updates a permission record.
|
@Headers(value="Content-Type:application/json") @POST(value="v1/permissions") retrofit2.Call<PermissionDetail> createPermission(@Body Permission permission)
permission
- (required)@Headers(value="Content-Type:application/json") @DELETE(value="v1/permissions/{guid}") retrofit2.Call<Message> deletePermission(@Path(value="guid") String guid)
guid
- A guid (required)@Headers(value="Content-Type:application/json") @GET(value="v1/permissions/{entityType}/{entityId}") retrofit2.Call<PermissionDetailResourceList> getPermissionsForEntity(@Path(value="entityType") String entityType, @Path(value="entityId") String entityId)
entityType
- The type of entity that a permission record is addressing. (required)entityId
- The ID of the entity that a permission record grants access to. (required)@Headers(value="Content-Type:application/json") @GET(value="v1/permissions/{userId}") retrofit2.Call<PermissionDetailResourceList> getPermissionsForUser(@Path(value="userId") String userId)
userId
- User ID (required)@Headers(value="Content-Type:application/json") @POST(value="v1/permissions/{guid}") retrofit2.Call<PermissionDetail> updatePermission(@Path(value="guid") String guid, @Body Permission permission)
guid
- A guid (required)permission
- (required)Copyright © 2023 Sage Bionetworks. All rights reserved.