This repository was archived by the owner on Apr 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
API Reference Resources
vsts build edited this page Sep 25, 2017
·
45 revisions
Operations for managing clients
POST /v1/Clients
| Type | Name | Description | Schema |
|---|---|---|---|
| Body |
Client required |
The client to register | ClientApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | ClientApiModel |
| 400 | Client with specified id already exists or Client object in body failed validation | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write,fabric/authorization.manageclients |
GET /v1/Clients
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | ClientApiModel |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read,fabric/authorization.manageclients |
GET /v1/Clients/{clientid}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
clientid required |
ClientId to use for the request | integer |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Client found | ClientApiModel |
| 403 | Client does not have access | No Content |
| 404 | Client with specified id was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read,fabric/authorization.manageclients |
DELETE /v1/Clients/{clientid}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
clientid required |
ClientId to use for the request | integer |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | Client deleted | No Content |
| 403 | Client does not have access | No Content |
| 404 | Client with specified id was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write,fabric/authorization.manageclients |
Operations for searching Fabric.Identity
GET /v1/identities
| Type | Name | Description | Schema |
|---|---|---|---|
| Query |
client_id required |
Client ID | string |
| Query |
filter optional |
Text filter | string |
| Query |
page_number optional |
Page number | integer |
| Query |
page_size optional |
Page size | integer |
| Query |
sort_dir optional |
Sort direction | string |
| Query |
sort_key optional |
Sort key | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | < IdentitySearchResponse > array |
| 400 | Group already exists | Error |
| 403 | Client does not have the required scopes to read data in Fabric.Authorization (fabric/authorization.read). | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
Operations for managing groups
POST /v1/groups
GroupSource can be either "Custom" for creating custom groups in Fabric or the displayName of the 3rd party identity provider if the group is from an external Idp. If groupSource is empty, it will be defaulted to the group source defined in the appsettings.json
| Type | Name | Description | Schema |
|---|---|---|---|
| Body |
Group required |
The group to add | GroupRoleApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | GroupRoleApiModel |
| 400 | Group already exists | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read,fabric/authorization.write |
Updates a list of groups, useful for syncing 3rd party ID Provider groups with Fabric.Authorization groups.
POST /v1/groups/UpdateGroups
| Type | Name | Description | Schema |
|---|---|---|---|
| Body |
Group required |
The groups to update | < GroupRoleApiModel > array |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | Groups updated | No Content |
| 400 | Group already exists | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/groups/{groupName}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | GroupRoleApiModel |
| 403 | Client does not have access | No Content |
| 404 | Group with specified name was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
DELETE /v1/groups/{groupName}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | Group deleted | No Content |
| 403 | Client does not have access | No Content |
| 404 | Group with specified name was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
POST /v1/groups/{groupName}/roles
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| Body |
Id required |
Role ID (GUID) | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | GroupRoleApiModel |
| 403 | Client does not have access | No Content |
| 404 | Group with specified name was not found or the role was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/groups/{groupName}/roles
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| Query |
grain optional |
grain | string |
| Query |
securableItem optional |
securable item | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | GroupRoleApiModel |
| 403 | Client does not have access | No Content |
| 404 | Group with specified name was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
DELETE /v1/groups/{groupName}/roles
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| Body |
Id required |
Role ID (GUID) | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Updated group entity including any mapped roles | GroupRoleApiModel |
| 403 | Client does not have access | Error |
| 404 | Group with specified name was not found or the role was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
POST /v1/groups/{groupName}/users
- This operation is only valid for custom groups. 2) The user specified by SubjectId parameter will be added silently if not found.
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| Body |
subjectId required |
Subject ID of the user | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | GroupUserApiModel |
| 400 | Group is not a custom group | Error |
| 403 | Client does not have access | Error |
| 404 | Group with specified name was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/groups/{groupName}/users
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | GroupUserApiModel |
| 403 | Client does not have access | Error |
| 404 | Group with specified name was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
DELETE /v1/groups/{groupName}/users
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
groupName required |
The name of the group | string |
| Body |
subjectId required |
Subject ID of the user | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Updated group entity including any mapped users | GroupUserApiModel |
| 403 | Client does not have access | Error |
| 404 | Group with specified name was not found or the user was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
Operations for managing permissions
POST /v1/Permissions
| Type | Name | Description | Schema |
|---|---|---|---|
| Body |
Permission required |
The permission to add | PermissionApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Permission was created | No Content |
| 400 | Permission data in body is invalid | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/Permissions/{grain}/{securableItem}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
grain required |
The top level grain to return permissions for | string |
| Path |
securableItem required |
The specific securableItem within the grain to return permissions for | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | < PermissionApiModel > array |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
GET /v1/Permissions/{grain}/{securableItem}/{permissionName}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
grain required |
The top level grain to return permissions for | string |
| Path |
permissionName required |
The name of the permission | string |
| Path |
securableItem required |
The specific securableItem within the grain to return permissions for | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | < PermissionApiModel > array |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
GET /v1/Permissions/{permissionId}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
permissionId required |
The id of the permission | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Permission was found | PermissionApiModel |
| 400 | Permission id must be a Guid | Error |
| 403 | Client does not have access | No Content |
| 404 | Permission with the specified id was not found | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
DELETE /v1/Permissions/{permissionId}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
permissionId required |
The id of the permission | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | Permission with the specified id was deleted | No Content |
| 400 | Permission id must be a guid | Error |
| 403 | Client does not have access | No Content |
| 404 | Permission with specified id was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
Operations for managing roles
POST /v1/roles
| Type | Name | Description | Schema |
|---|---|---|---|
| Body |
Role required |
The role to add | RoleApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | RoleApiModel |
| 400 | Role with specified id already exists or Role object in body failed validation | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/roles/{grain}/{securableItem}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
grain required |
The top level grain to return permissions for | string |
| Path |
securableItem required |
The specific securableItem within the grain to return permissions for | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | No Content |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
GET /v1/roles/{grain}/{securableItem}/{roleName}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
grain required |
The top level grain to return permissions for | string |
| Path |
roleName required |
The name of the role | string |
| Path |
securableItem required |
The specific securableItem within the grain to return permissions for | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Role with specified name was found | < RoleApiModel > array |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
DELETE /v1/roles/{roleId}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
roleId required |
The id of the role | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | Role with the specified id was deleted | No Content |
| 400 | Invalid roled id provided | Error |
| 403 | Client does not have access | No Content |
| 404 | Role with specified id was not found | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
POST /v1/roles/{roleId}/permissions
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
roleId required |
The id of the role | string |
| Body |
List of permissions required |
The list of permissions to add to the role | < PermissionApiModel > array |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Permission added to role | RoleApiModel |
| 400 | Invalid role id, no permissions specified to add, or incompatible permission provided | Error |
| 403 | Client does not have access | No Content |
| 404 | Role not found or permission not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
DELETE /v1/roles/{roleId}/permissions
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
roleId required |
The id of the role | string |
| Body |
List of permissions required |
The list of permissions to add to the role | < PermissionApiModel > array |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Permission removed from role | RoleApiModel |
| 400 | Invalid role id or no permissions specified to delete from role | Error |
| 403 | Client does not have access | No Content |
| 404 | Role not found or permission not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
Operations for managing Securable Items
POST /v1/SecurableItems
| Type | Name | Description | Schema |
|---|---|---|---|
| Body |
Securable Item required |
The securable item to add | SecurableItemApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | SecurableItemApiModel |
| 400 | The securable item id is not a guid, the securable item failed validation, or it already exists | Error |
| 403 | Client does not have access | No Content |
| 404 | The client was not found by client id | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/SecurableItems
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | SecurableItemApiModel |
| 403 | Client does not have access | No Content |
| 404 | The client was not found by client id | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
POST /v1/SecurableItems/{securableItemId}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
securableItemId required |
The id of the securable item | string |
| Body |
Securable Item required |
The securable item to add | SecurableItemApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Created | SecurableItemApiModel |
| 400 | The securable item id is not a guid, the securable item failed validation, or it already exists | Error |
| 403 | Client does not have access | No Content |
| 404 | The client was not found by client id or the specified securable item by id was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.write |
GET /v1/SecurableItems/{securableItemId}
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
securableItemId required |
The id of the securable item | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | SecurableItemApiModel |
| 400 | The securable item id must be a guid | Error |
| 403 | Client does not have access | No Content |
| 404 | The client was not found by client id or the securable item was not found | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
Operations related to user permissions
GET /v1/user/permissions
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | UserPermissionsApiModel |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
GET /v1/user/{subjectId}/groups
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
subjectId required |
Subject ID (from external identity provider) | string |
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | List of strings representing group names in which the user belongs | < string > array |
| 403 | Client does not have access | No Content |
| 404 | User was not found | Error |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |
POST /v1/user/{userId}/AdditionalPermissions
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
userId required |
UserId to use for the request | integer |
| Body |
GranularPermissions required |
The permissions to explicitly allow for the user. | GranularPermissionApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | N/A | No Content |
| 400 | Bad Request | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.manageclients |
POST /v1/user/{userId}/DeniedPermissions
| Type | Name | Description | Schema |
|---|---|---|---|
| Path |
userId required |
UserId to use for the request | integer |
| Body |
GranularPermissions required |
The permissions to explicitly deny for the user. | GranularPermissionApiModel |
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | N/A | No Content |
| 400 | Bad Request | Error |
| 403 | Client does not have access | No Content |
| Type | Name | Scopes |
|---|---|---|
| Unknown | Oauth2 | fabric/authorization.read |