Api >

Service Portal REST API

Should DELETE Customer Lync Option for Phone Extension
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as Admin
and there is a Lync Option with id 134
and there is a Lync Softphone Device attached
When I send /api/customers/K0002/targets/phone-extensions/201/lync/134
Then I should receive HTTP/1.1 204 No Content
And there is no Lync Option with id 134 And there is no attached Lync Softphone Device
Should DELETE Customer Lync Option for Phone Extension
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as operator
and there is a Lync Option with id 134
and there is a Lync Softphone Device attached
When I send /api/customers/K0002/targets/phone-extensions/201/lync/134
Then I should receive HTTP/1.1 204 No Content
And there is no Lync Option with id 134 And there is no attached Lync Softphone Device
Should DELETE Customer Lync Option for Phone Extension
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as system initegrator
and there is a Lync Option with id 134
and there is a Lync Softphone Device attached
When I send /api/customers/K0002/targets/phone-extensions/201/lync/134
Then I should receive HTTP/1.1 204 No Content
And there is no Lync Option with id 134 And there is no attached Lync Softphone Device
Should DELETE Customer Lync Option for Phone Extension
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as K0002
and there is a Lync Option with id 134
and there is a Lync Softphone Device attached
When I send /api/customers/K0002/targets/phone-extensions/201/lync/134
Then I should receive HTTP/1.1 204 No Content
And there is no Lync Option with id 134 And there is no attached Lync Softphone Device
Fail meaningfully when removing Lync Option for not existing Customer
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as Admin
When I ask for lync sites of not existing Customer /api/customers/K0404/targets/phone-extensions/201/lync/134
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Customer not found",
  "detail": "Customer with identifier K0404 has not been found",
  "described_by": "http://api.nfon.net/probs/customer-not-found"
}
Should not remove Lync Option for not existing Phone Extension
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as Admin
When I ask for lync sites of not existing Customer /api/customers/K0002/targets/phone-extensions/345/lync/134
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Extension not found",
  "detail": "Extension with extension number 345 has not been found",
  "described_by": "http://api.nfon.net/probs/extension-not-found"
}
Should not remove not existing Lync Option
Test setup
Given there is a LyncSite with id 500 and name Lync Site
and there is a PhoneExtension with extensionNumber 201 and display name PhoneExtension
and there is a Trunk with numbers +48 (22) 33-65
and there is an Inbound Trunk Number with extension 33
and it is assigned to phone extension
Given I am authenticated as Admin
When I ask for lync sites of not existing Customer /api/customers/K0002/targets/phone-extensions/201/lync/404
Then I should receive HTTP/1.1 404 Not Found
And Content-Type header should be application/api-problem+json
with following body:
{
  "title": "Lync Option not found",
  "detail": "Lync Option with id 404 not found for Phone Extension 201",
  "described_by": "http://api.nfon.net/probs/lync-option-not-found"
}