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

API Reference Resources

VSTS System User edited this page Jul 17, 2018 · 19 revisions

Resources

ApiResource

Manage ApiResources

Creates an API resource.

POST /api/v1/apiresource
Parameters
Type Name Description Schema
Body apiResource
required
The Fabric.Identity.API.Models.ApiResource object to add. Fabric.Identity.API.Models.ApiResource
Responses
HTTP Code Description Schema
201 The API resource was created. Fabric.Identity.API.Models.ApiResource
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
409 A duplicate resource is attempting to be added Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Retrieve API resource by id.

GET /api/v1/apiresource/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the API resource. string
Responses
HTTP Code Description Schema
200 Success Fabric.Identity.API.Models.ApiResource
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified API resource id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Modifies the API resource by id.

PUT /api/v1/apiresource/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the API resource. string
Body apiResource
required
The Fabric.Identity.API.Models.ApiResource object to update. Fabric.Identity.API.Models.ApiResource
Responses
HTTP Code Description Schema
204 No Content No Content
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified API resource id could not be found. Fabric.Identity.API.Models.Error
409 A duplicate resource is attempting to be added Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Deletes the API resource by id.

DELETE /api/v1/apiresource/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the API resource. string
Responses
HTTP Code Description Schema
204 The specified API resource was deleted. No Content
401 Unauthorized No Content
403 Forbidden No Content
404 The specified API resource id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Reset the api secret by API resource id.

POST /api/v1/apiresource/{id}/resetPassword
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the API resource. string
Responses
HTTP Code Description Schema
200 The password was reset. Fabric.Identity.API.Models.ApiResource
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified API resource id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Client

Manage Clients

Add a client

POST /api/v1/client
Parameters
Type Name Description Schema
Body client
required
The IdentityServer4.Models.Client object to add. Fabric.Identity.API.Models.Client
Responses
HTTP Code Description Schema
201 The client was created. Fabric.Identity.API.Models.Client
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
409 A duplicate resource is attempting to be added Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Find a client by id

GET /api/v1/client/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the client. string
Responses
HTTP Code Description Schema
200 Success Fabric.Identity.API.Models.Client
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified client id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Update a client

PUT /api/v1/client/{id}
Parameters
Type Name Description Schema
Path id
required
The unique id of the client to update. string
Body client
required
The IdentityServer4.Models.Client object to update. Fabric.Identity.API.Models.Client
Responses
HTTP Code Description Schema
204 The specified client was updated. No Content
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified client id could not be found. Fabric.Identity.API.Models.Error
409 A duplicate resource is attempting to be added Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Delete a client

DELETE /api/v1/client/{id}
Parameters
Type Name Description Schema
Path id
required
The unique id of the client to delete. string
Responses
HTTP Code Description Schema
204 The specified client was deleted. No Content
401 Unauthorized No Content
403 Forbidden No Content
404 The specified client id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Reset a client secret

POST /api/v1/client/{id}/resetPassword
Parameters
Type Name Description Schema
Path id
required
The unique id of the client to reset. string
Responses
HTTP Code Description Schema
200 The secret for the client has been reset. Fabric.Identity.API.Models.Client
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified client id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

IdentityProviders

Manage IdentityProviders

Get a list of all the configured third party identity providers.

GET /api/v1/identityproviders
Responses
HTTP Code Description Schema
200 Success < Fabric.Identity.API.Models.ExternalProviderApiModel > array
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.read

IdentityResource

Manage IdentityResources

Creates an Identity resource.

POST /api/v1/identityresource
Parameters
Type Name Description Schema
Body identityResource
required
The Fabric.Identity.API.Models.IdentityResourceIdentityResource to add. Fabric.Identity.API.Models.IdentityResource
Responses
HTTP Code Description Schema
201 The identity resource was created. Fabric.Identity.API.Models.IdentityResource
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
409 A duplicate resource is attempting to be added Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Retrieve Identity resource by id.

GET /api/v1/identityresource/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the identity resource string
Responses
HTTP Code Description Schema
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified Identity resource id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Modifies the Identity resource by id.

PUT /api/v1/identityresource/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the identity resource string
Body identityResource
required
The Fabric.Identity.API.Models.IdentityResource IdenetityResource to update. Fabric.Identity.API.Models.IdentityResource
Responses
HTTP Code Description Schema
204 The identity resource was updated. No Content
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified Identity resource id could not be found. Fabric.Identity.API.Models.Error
409 A duplicate resource is attempting to be added Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Deletes the Identity resource by id.

DELETE /api/v1/identityresource/{id}
Parameters
Type Name Description Schema
Path id
required
The unique identifier of the identity resource. string
Responses
HTTP Code Description Schema
204 The specified identity resource was deleted. No Content
401 Unauthorized No Content
403 Forbidden No Content
404 The specified Identity resource id could not be found. Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.manageresources

Users

Get User Information

Find users by client id and user id

POST /api/v1/users
Parameters
Type Name Description Schema
Body searchParameters
required
The Fabric.Identity.API.Models.UserSearchParameter containing the client id and user ids in the format 'subjectid:provider' Fabric.Identity.API.Models.UserSearchParameter
Responses
HTTP Code Description Schema
200 Success < Fabric.Identity.API.Models.UserApiModel > array
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified client id could not be found Fabric.Identity.API.Models.Error
Consumes
  • application/json
  • text/json
  • application/json-patch+json
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.searchusers

Find users by client id and user id

GET /api/v1/users
Parameters
Type Name Description Schema
Query clientId
optional
The client id to find users for string
Query userIds
optional
The user ids for the users requested in the format 'subjectid:provider' < string > array(multi)
Responses
HTTP Code Description Schema
200 Success < Fabric.Identity.API.Models.UserApiModel > array
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
404 The specified client id could not be found Fabric.Identity.API.Models.Error
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.searchusers

Find users in the 3rd party identity provider (IDP), e.g. Active Directory, Azure Active Directory, etc..

GET /api/v1/users/search
Parameters
Type Name Description Schema
Query identityProvider
optional
The source identity provider to search within. string
Query searchText
optional
The portion of a user's name or username to search for in the 3rd party identity provider. We will search in the First Name, LastName, and Useranme fields as specified by the 3rd party IDP. string
Responses
HTTP Code Description Schema
200 Success < Fabric.Identity.API.Models.UserApiModel > array
400 The request has invalid or missing values. Fabric.Identity.API.Models.Error
401 Unauthorized No Content
403 Forbidden No Content
Produces
  • text/plain
  • application/json
  • text/json
Security
Type Name Scopes
oauth2 oauth2 fabric/identity.searchusers

Clone this wiki locally