Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.

API Reference Resources

vsts build edited this page Aug 29, 2017 · 45 revisions

Paths

Registers a new client

POST /v1/Clients

Parameters

Type Name Description Schema
Body Client
required
The client to register ClientApiModel

Responses

HTTP Code Description Schema
201 Created ClientApiModel
400 Client with specified id already exists or Client object in body failed validation No Content
403 Client does not have access No Content

Tags

  • Clients

Gets all registered clients

GET /v1/Clients

Responses

HTTP Code Description Schema
200 OK ClientApiModel
403 Client does not have access No Content

Tags

  • Clients

Gets a single client

GET /v1/Clients/{clientid}

Parameters

Type Name Description Schema
Path clientid
required
ClientId to use for the request integer

Responses

HTTP Code Description Schema
200 Client found ClientApiModel
403 Client does not have access No Content
404 Client with specified id was not found No Content

Tags

  • Clients

Deletes a client

DELETE /v1/Clients/{clientid}

Parameters

Type Name Description Schema
Path clientid
required
ClientId to use for the request integer

Responses

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 No Content

Tags

  • Clients

Adds a new permissions

POST /v1/Permissions

Parameters

Type Name Description Schema
Body Permission
required
The permission to add PermissionApiModel

Responses

HTTP Code Description Schema
201 Permission was created No Content
400 Permission data in body is invalid No Content
403 Client does not have access No Content

Tags

  • Permissions

Get permissions for a particular grain and securable item

GET /v1/Permissions/{grain}/{securableItem}

Parameters

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

Responses

HTTP Code Description Schema
200 OK < PermissionApiModel > array
403 Client does not have access No Content

Tags

  • Permissions

Get permissions for a particular grain, securable item, and permission name

GET /v1/Permissions/{grain}/{securableItem}/{permissionName}

Parameters

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

Responses

HTTP Code Description Schema
200 OK < PermissionApiModel > array
403 Client does not have access No Content

Tags

  • Permissions

Get a permission by permission id

GET /v1/Permissions/{permissionId}

Parameters

Type Name Description Schema
Path permissionId
required
The id of the permission string

Responses

HTTP Code Description Schema
200 Permission was found PermissionApiModel
400 Permission id must be a Guid No Content
403 Client does not have access No Content
404 Permission with the specified id was not found No Content

Tags

  • Permissions

Deletes a permission

DELETE /v1/Permissions/{permissionId}

Parameters

Type Name Description Schema
Path permissionId
required
The id of the permission string

Responses

HTTP Code Description Schema
204 Permission with the specified id was deleted No Content
400 Permission id must be a guid No Content
403 Client does not have access No Content
404 Permission with specified id was not found No Content

Tags

  • Permissions

Add a new securable item

POST /v1/SecurableItems

Parameters

Type Name Description Schema
Body Securable Item
required
The securable item to add SecurableItemApiModel

Responses

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 No Content
403 Client does not have access No Content
404 The client was not found by client id No Content

Tags

  • Securable Item

Gets the top level securable item by client id

GET /v1/SecurableItems

Responses

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

Tags

  • Securable Item

Add a new securable item by the specified securable item id

POST /v1/SecurableItems/{securableItemId}

Parameters

Type Name Description Schema
Path securableItemId
required
The id of the securable item string
Body Securable Item
required
The securable item to add SecurableItemApiModel

Responses

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 No Content
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 No Content

Tags

  • Securable Item

Gets a securable item by client id and securable item id

GET /v1/SecurableItems/{securableItemId}

Parameters

Type Name Description Schema
Path securableItemId
required
The id of the securable item string

Responses

HTTP Code Description Schema
200 OK SecurableItemApiModel
400 The securable item id must be a guid No Content
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

Tags

  • Securable Item

Adds a new group

POST /v1/groups

Parameters

Type Name Description Schema
Body Group
required
The group to add GroupRoleApiModel

Responses

HTTP Code Description Schema
201 Created GroupRoleApiModel
400 Group already exists No Content
403 Client does not have access No Content

Tags

  • Groups

Updates a list of groups

POST /v1/groups/UpdateGroups

Parameters

Type Name Description Schema
Body Group
required
The groups to update < GroupRoleApiModel > array

Responses

HTTP Code Description Schema
204 Groups updated No Content
400 Group already exists No Content
403 Client does not have access No Content

Tags

  • Groups

Gets a group by name

GET /v1/groups/{groupName}

Parameters

Type Name Description Schema
Path groupName
required
The name of the group string

Responses

HTTP Code Description Schema
200 OK GroupRoleApiModel
403 Client does not have access No Content
404 Group with specified name was not found No Content

Tags

  • Groups

Deletes a group

DELETE /v1/groups/{groupName}

Parameters

Type Name Description Schema
Path groupName
required
The name of the group string

Responses

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 No Content

Tags

  • Groups

Adds a role to a group

POST /v1/groups/{groupName}/roles

Parameters

Type Name Description Schema
Path groupName
required
The name of the group string
Body Role
required
The role to add to the group RoleApiModel

Responses

HTTP Code Description Schema
201 Created GroupRoleApiModel
400 Group already exists No Content
403 Client does not have access No Content
404 Group with specified name was not found or the role was not found No Content

Tags

  • Groups

Gets roles for a group by group name

GET /v1/groups/{groupName}/roles

Parameters

Type Name Description Schema
Path groupName
required
The name of the group string

Responses

HTTP Code Description Schema
200 OK GroupRoleApiModel
403 Client does not have access No Content
404 Group with specified name was not found No Content

Tags

  • Groups

Deletes a role from a group

DELETE /v1/groups/{groupName}/roles

Parameters

Type Name Description Schema
Path groupName
required
The name of the group string
Body Role
required
The role to delete from the group RoleApiModel

Responses

HTTP Code Description Schema
200 Role deleted from group No Content
403 Client does not have access No Content
404 Group with specified name was not found or the role was not found No Content

Tags

  • Groups

Add a new role

POST /v1/roles

Parameters

Type Name Description Schema
Body Role
required
The role to add RoleApiModel

Responses

HTTP Code Description Schema
201 Created RoleApiModel
400 Role with specified id already exists or Role object in body failed validation No Content
403 Client does not have access No Content

Tags

  • Roles

Get roles associated with a securable item

GET /v1/roles/{grain}/{securableItem}

Parameters

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

Responses

HTTP Code Description Schema
200 OK No Content
403 Client does not have access No Content

Tags

  • Roles

Get a role by role name

GET /v1/roles/{grain}/{securableItem}/{roleName}

Parameters

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

Responses

HTTP Code Description Schema
200 Role with specified name was found No Content
403 Client does not have access No Content

Tags

  • Roles

Deletes a role

DELETE /v1/roles/{roleId}

Parameters

Type Name Description Schema
Path roleId
required
The id of the role string

Responses

HTTP Code Description Schema
204 Role with the specified id was deleted No Content
400 Invalid roled id provided No Content
403 Client does not have access No Content
404 Role with specified id was not found No Content

Tags

  • Roles

Add permissions to an existing role

POST /v1/roles/{roleId}/permissions

Parameters

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

Responses

HTTP Code Description Schema
201 Permission added to role RoleApiModel
400 Invalid role id, no permissions specified to add, or incompatible permission provided No Content
403 Client does not have access No Content
404 Role not found or permission not found No Content

Tags

  • Roles

Delete permissions from an existing role

DELETE /v1/roles/{roleId}/permissions

Parameters

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

Responses

HTTP Code Description Schema
201 Permission removed from role RoleApiModel
400 Invalid role id or no permissions specified to delete from role No Content
403 Client does not have access No Content
404 Role not found or permission not found No Content

Tags

  • Roles

Gets permissions for a user

GET /v1/user/permissions

Responses

HTTP Code Description Schema
200 OK UserPermissionsApiModel
403 Client does not have access No Content

Tags

  • Users

Adds granular permissions for a user

POST /v1/user/{userId}/AdditionalPermissions

Parameters

Type Name Description Schema
Path userId
required
UserId to use for the request integer

Responses

HTTP Code Description Schema
204 N/A No Content
400 Bad Request No Content
403 Client does not have access No Content

Tags

  • Users

Adds denied permissions for a user

POST /v1/user/{userId}/DeniedPermissions

Parameters

Type Name Description Schema
Path userId
required
UserId to use for the request integer

Responses

HTTP Code Description Schema
204 N/A No Content
400 Bad Request No Content
403 Client does not have access No Content

Tags

  • Users

Clone this wiki locally