Api >

Service Portal REST API

GET list of Customers as Admin
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }, {
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET list of Customers with page limit
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?_offset=1&_pagesize=1
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=1&_pagesize=1&_orderBy=externalIdentifier&_order=ASC",
  "offset": 1,
  "total": 2,
  "size": 1,
  "links": [{
    "rel": "first",
    "href": "/api/customers?_offset=0&_pagesize=1&_orderBy=externalIdentifier&_order=ASC"
  }, {
    "rel": "prev",
    "href": "/api/customers?_offset=0&_pagesize=1&_orderBy=externalIdentifier&_order=ASC"
  }, {
    "rel": "last",
    "href": "/api/customers?_offset=1&_pagesize=1&_orderBy=externalIdentifier&_order=ASC"
  }],
  "items": [{
    "href": "/api/customers/K0003"
  }]
}
GET ordered list of Customers by any attribute
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?_orderBy=systemIntegratorName&_order=DESC
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=systemIntegratorName&_order=DESC",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [],
  "items": [{
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }, {
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using full text search query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?_q=C0003
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_q=C0003&_orderBy=externalIdentifier&_order=ASC",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }]
  }]
}
GET filtered list of Customers using attribute specific equal query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=K0003
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=K0003",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }]
  }]
}
GET filtered list of Customers using attribute specific not equal query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=!K0003
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=!K0003",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using attribute specific generic like query: ~003 (equal to ~*003*)
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=~003
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=~003",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }]
  }]
}
GET filtered list of Customers using attribute specific like query: ~*3 (postfix must be 3)
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=~*3
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=~*3",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }]
  }]
}
GET filtered list of Customers using attribute specific inverse like query: !~*3 (postfix must not be 3)
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=!~*3
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=!~*3",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using attribute specific like query: ~3* (prefix must be 3)
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=~3*
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=~3*",
  "offset": 0,
  "total": 0,
  "size": 0,
  "links": [],
  "items": []
}
GET filtered list of Customers using attribute specific like query: !~3* (prefix must not be 3)
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=!~3*
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=!~3*",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }, {
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using attribute specific relational greater-than search query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=:gt:K0002
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=:gt:K0002",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }]
  }]
}
GET filtered list of Customers using attribute specific relational greater-equal search query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=:ge:K0002
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=:ge:K0002",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }, {
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using attribute specific relational lower-than search query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=:lt:K0002
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=:lt:K0002",
  "offset": 0,
  "total": 0,
  "size": 0,
  "links": [],
  "items": []
}
GET filtered list of Customers using attribute specific relational lower-equal search query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?externalIdentifier=:le:K0002
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&externalIdentifier=:le:K0002",
  "offset": 0,
  "total": 1,
  "size": 1,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using attribute specific equal NULL query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?blockedAt=:NULL:
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&blockedAt=:NULL:",
  "offset": 0,
  "total": 2,
  "size": 2,
  "links": [],
  "items": [{
    "href": "/api/customers/K0002",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0002"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0002"
    }, {
      "name": "systemIntegrator",
      "value": "S0002"
    }, {
      "name": "operatorName",
      "value": "C0002"
    }, {
      "name": "operator",
      "value": "C0002"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 1"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }, {
    "href": "/api/customers/K0003",
    "links": [],
    "data": [{
      "name": "externalIdentifier",
      "value": "K0003"
    }, {
      "name": "name",
      "value": "customer"
    }, {
      "name": "systemIntegratorName",
      "value": "S0003"
    }, {
      "name": "systemIntegrator",
      "value": "S0003"
    }, {
      "name": "operatorName",
      "value": "C0003"
    }, {
      "name": "operator",
      "value": "C0003"
    }, {
      "name": "pbxGroup",
      "value": "pbx name 2"
    }, {
      "name": "sipServer",
      "value": "127.0.0.1"
    }, {
      "name": "blockedAt",
      "value": null
    }, {
      "name": "trialPeriod",
      "value": false
    }, {
      "name": "trialPermanent",
      "value": false
    }, {
      "name": "contractType",
      "value": "ncomplete"
    }, {
      "name": "contractTypeId",
      "value": 4
    }, {
      "name": "state",
      "value": "activeWithElements"
    }]
  }]
}
GET filtered list of Customers using attribute specific equal NOT NULL query
Filtering is done on fields :
  • externalIdentifier
  • name
  • systemIntegratorName
  • systemIntegrator (external identifier)
  • operatorName
  • operator (external identifier)
  • pbxGroup
  • sipServer
  • contractType
  • contractTypeId
  • state
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?blockedAt=!:NULL:
Then I should receive HTTP/1.1 200 OK
with following body
{
  "href": "/api/customers?_offset=0&_pagesize=16&_orderBy=externalIdentifier&_order=ASC&blockedAt=!:NULL:",
  "offset": 0,
  "total": 0,
  "size": 0,
  "links": [],
  "items": []
}
Cannot get list of Customers with invalid offset value
Given I am authenticated as admin
and there is a Customer with ID K0002
and there is another Customer with ID K0003
When I send /api/customers?_offset=df
Then I should receive HTTP/1.1 400 Bad Request
with following body
{
  "title": "Bad paging parameter value",
  "detail": "The offset parameter has wrong value.",
  "described_by": "http://api.nfon.net/probs/paging-param-malformed"
}
Customer cannot get list of Customers
Given I am authenticated as K0003
When I send /api/customers
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Required role is missing",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
System Integrator cannot access list of Customers
Given I am authenticated as System Integrator S0002
When I send /api/customers
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Required role is missing",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}
Operator cannot access list of Customers
Given I am authenticated as Operator C0002
When I send /api/customers
Then I should receive HTTP/1.1 403 Forbidden
with following body
{
  "title": "Access forbidden",
  "detail": "Required role is missing",
  "described_by": "http://api.nfon.net/probs/invalid-authorization"
}