Internal API

API Call Reference

/api/jeye

GET /api/jeye/(host)

Get Jeye statistic data for cluster host host

Query Parameters:
 
  • from – optional: start time, in seconds-since-epoch (must have from <= to)
  • to – optional: end time, in seconds-since-epoch (must have from <= to)
  • start

    optional: the UUID of the first result to return, exclusive, i.e. the result with an exact match UUID is not returned.

    If given, overrides the from parameter when asc order is selected or overrides the to parameter when desc order is selected.

  • order

    optional: If set to asc (default), objects are returned in time ascending order (i.e. starting with from or start and ending with stop).

    If set to desc, objects are returned in time descending order (i.e. starting with to or start and ending with from).

  • count – optional, default 10: limits the number of returned objects (valid range: 1...5000)

Response body example

{
    "jeye": {
        "c7c1e972-7747-11e1-85ea-0024e8f90cc0": {
            (...jeye data object...)
        },
        "d8c42a00-7747-11e1-a938-0024e8f90cc0": {
            (...jeye data object...)
        }
    }
}
Status:
  • access-denied: The current session’s user does not have jeye access permissions
  • empty-data: No statistics items were found

/api/mwi

GET /api/mwi/(phone)

Get the current message waiting indication URI (MWI) mapping for the specified phone.

Response body example

{
    "mwi_uri": "sip:04066889977@bmcag.com"
}
Status:
  • access-denied: The user does not have special permissions required for this API call
  • wrong-phone: The given phone number is not known to the system

To use this API call, the user needs to have special permissions in the cospace system.

If there is no MWI URI mapping, the mwi_uri field will not be present in the response.

POST /api/mwi

Modify the message waiting indication URI (MWI) mapping for one or more phone numbers.

Request body example

{
    "+4940382738473": "sip:04066889977@bmcag.com",
    "+4940123212328": "sip:04066889988@bmcag.com"
}
JSON Parameters:
 
  • number (phone) –

    ^\+[0-9]{3,20}$

    the phone number to modify the MWI for

  • URI (MWI) –

    sip:<user>@<host>

    the MWI URI (target for SIP NOTIFY messages)

{
    "phone-ok": [
        "+4940382738473"
    ],
    "phone-fail": [
        "+4940123212328"
    ]
}
Status:
  • access-denied: The user does not have special permissions required for this API call

To use this API call, the user needs to have special permissions in the cospace system.

The phone-ok array in the response contains phone numbers whose MWI mapping were successfully updated. The phone-fail array contains phone numbers that could not be updated because they are unknown to the system.

DELETE /api/mwi/(phone)

Delete the current message waiting indication URI (MWI) mapping for the specified phone.

Response body example

{}
Status:
  • access-denied: The user does not have special permissions required for this API call
  • wrong-phone: The given phone number is not known to the system

To use this API call, the user needs to have special permissions in the cospace system.

/api/statistics

GET /api/statistics/(date)

Get the system statistics for the given date, in format YYY-MM-DD

Response body example

{
    "result": {
        (... statistics data object...)
    }
}
Status:
  • access-denied: The current session’s user does not have jeye access permissions
  • empty-data: No statistics items were found

/api/usage

GET /api/usage/(month)

Get the monthly usage statistics, month in format YYY-MM

Response body example

{
    "result": {
        (... statistics data object...)
    }
}
Status:
  • access-denied: The current session’s user does not have jeye access permissions
  • empty-data: No statistics items were found

/api/idcardcheck

GET /api/idcardcheck

Get a list with validation jobs.

Response body example

{
    "jobs": [
        "c179ba70-e9e1-11e5-9546-c73f4b1584b3",
        "d76cc78c-e9e1-11e5-b37f-2f91a0480be5"
    ]
}
Status:
  • access-denied: The current session’s user does not have the permission for idcardcheck
GET /api/idcardcheck/(uuid)/address

Get the address data of the validation job uuid

Response body example

{
    "user": {
        "firstname": "John",
        "lastname": "Doe",
        "zip_code": "10557",
        "town": "Berlin",
        "street": "Willy-Brandt-Stra\u00dfe",
        "house_number": "15",
        "country": "de"
    }
}
Status:
  • wrong-job: The current UUID does not match a validation job
  • access-denied: The current session’s user does not have the permission for idcardcheck
GET /api/idcardcheck/(uuid)/idcard/(name).pdf

Get the PDF of the validation job uuid

Query Parameters:
 
  • inline – optional: if present, the response will include an HTTP Content-Disposition header (see RFC 2183) with a value of inline. Otherwise, the content disposition will be attachment.

Response body example

The binary data of PDF, or HTTP 404 without response body on failure.

name is a file name arbitrarily chosen by the user agent.

The content of the id card in PDF format on success, or
HTTP 404 without response body on failure.

This API is eligible for use with the session’s download id (did). In this case, the object UUID is the job uuid. For more information on file download authentication, see Authentication for file downloads.

POST /api/idcardcheck/(uuid)

Send the result of the validation process.

Request body example

{
    "validation" : "ok"
}
JSON Parameters:
 
  • validation

    ^ok|missmatch|baddocument|fail$

    The result of the validation process

    • ok the address data match
    • missmatch the address data missmatch
    • baddocument the document dosen’t match the requirements.
    • fail the document isn’t readable

Response body example

{}
Status:
  • wrong-job: The current UUID does not match a validation job
  • access-denied: The current session’s user does not have the permission for idcardcheck