Exchange Skype For Business (Rest API)

From Rackspace Email & Apps API
Revision as of 10:57, 13 October 2015 by Appscp (talk | contribs) (Appscp moved page Exchange Lync (Rest API) to Exchange Skype For Business (Rest API))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

v1 - Current

This resource supports enabling and disabling Skype For Business on a specified domain as well as adding and removing users to the service with both XML and JSON.

Data Model

Skype For Business Service

Field Name Data Type Verbs Description
Name String GET Domain Name
Status** String GET Status of the Skype For Business service. (ready, pending, error)

User

Field Name Data Type Verbs Description
Value String GET, PUT Domain Name
Action String GET, PUT Must be "Add" or "Remove". Only valid for PUT requests.
Status** String GET Status of the Skype For Business user. (ready, pending, error)

**A ready status means that there are no scheduled operations for the object. A pending status signifies the object is being modified. An error status is reserved for future enhancements to the Skype For Business service, but is not currently used.


List

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync/
Description Returns Skype For Business information for the specified domain.
Model Skype For Business Service

HTTP Codes

Code Condition
200 OK The information was successfully retrieved and Skype For Business is currently enabled on the domain.
400 Bad Request Skype For Business is not available for the domain.
404 Not Found The information was successfully retrieved however Skype For Business is not currently enabled on the domain.
Request:
GET https://api.emailsrvr.com/v1/domains/example.com/ex/lync

Response:
200 OK
{
  "Name" : "example.com",
  "Status" : "ready"
}

Enable

Verb POST
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync
Description Use this route to enable Skype For Business for the specified domain.
Note Enabling Skype For Business does not turn Skype For Business on for all users on the domain.

Use the Update Users route to enable Skype For Business for end users.

HTTP Codes

Code Condition
204 No Content The request has been accepted and will be processed.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFondFault for more detail.
Request:
POST https://api.emailsrvr.com/v1/domains/example.com/ex/lync

Response:
204 No Content

Disable

Verb DELETE
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync
Description Use this route to disable Skype For Business for the specified domain.

HTTP Codes

Code Condition
204 No Content The request has been accepted and will be processed.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFondFault for more detail.
Request:
DELETE https://api.emailsrvr.com/v1/domains/example.com/ex/lync

Response:
204 No Content

List Users

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync/users
Description Use this route to list users who currently have Skype For Business enabled.
Model User

HTTP Codes

Code Condition
200 OK Returns a filtered list of users who have Skype For Business enabled.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFondFault for more detail.
Request:
GET https://api.emailsrvr.com/v1/domains/example.com/ex/lync/users
{
 "Users" : [
   {
    "Value" : "user1",
    "Status" : "ready"
   },
   {
    "Value" : "user2",
    "Status" : "ready"
   },
   {
    "Value" : "user3",
    "Status" : "ready"
   },
   {
    "Value" : "user4",
    "Status" : "ready"
   },
   {
    "Value" : "user5",
    "Status" : "pending"
   }
  ],
 "Total" : "5"
} 

Response:
200 OK

Get Individual User

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync/users/{user name}
Description Use this route to get the status for an individual enabled Skype For Business user.
Model User

HTTP Codes

Code Condition
200 OK Returns an individual enabled Skype For Business user.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFoundFault for more detail.
Request:
GET https://api.emailsrvr.com/v1/domains/example.com/ex/lync/users/testuser
{
    "Value": "testuser",
    "Status": "ready"
} 

Response:
200 OK

List Available Users

Verb GET
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync/availableUsers
Description Use this route to list users on the specified domain who do not have Skype For Business currently enabled.
Model User

HTTP Codes

Code Condition
200 OK Returns a filtered list of users who do not have Skype For Business enabled.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFondFault for more detail.
Request:
GET https://api.emailsrvr.com/v1/domains/example.com/ex/lync/availableUsers
{
  "Users" : [
   {
    "Value" : "user6",
    "Status" : "ready"
   },
   {
    "Value" : "user7",
    "Status" : "ready"
   },
   {
    "Value" : "user8",
    "Status" : "ready"
   },
   {
    "Value" : "user9",
    "Status" : "ready"
   },
   {
    "Value" : "user10",
    "Status" : "ready"
   }
  ],
 "Total" : "5"
}  

Response:
200 OK

Add User

Verb POST
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync/users/{username}
Description Use this route to add a user to the Skype For Business service.
Model User

HTTP Codes

Code Condition
202 Accepted The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFoundFault for more detail.
Request:
POST https://api.emailsrvr.com/v1/domains/example.com/ex/lync/testuser

Response:
202 Accepted

Delete User

Verb DELETE
URL Format /v1/customers/{customer account number}/domains/{domain name}/ex/lync/users/{username}
Description Use this route to remove a user from the Skype For Business service.
Model User

HTTP Codes

Code Condition
202 Accepted The request has been accepted and will be processed.
400 Bad Request The request was invalid. Inspect the validationFault response for more detail.
404 Not Found The domain does not exist or the domain does not have Exchange. Inspect the itemNotFoundFault for more detail.
Request:
DELETE https://api.emailsrvr.com/v1/domains/example.com/ex/lync/testuser

Response:
202 Accepted