Skip to content

Collections

Paging

Each response has next_url attribute like:

{
    "calls": [ ... ],
    "next_url": "/api/v2/calls.json?start=200"
}

next_url is set to null if there are no more pages. Otherwise the client application should use this URL to sent retrieve next portion of records.

When requesting a list of objects, by default MiaRec returns 20 records per page. The client application may request up to 1000 items per page with URI parameter limit=X, for example:

/api/v2/users.json?limit=500

Access Scope

The returned list of objects contains only those elements, which are in a scope of API user permissions.

For example, a client application requests a list of calls:

/api/v2/calls.json

If API request is made with credentials of system administrator role, then all calls will be returned to the client application.

If API request is made with credentials of group’s administrator role, then only calls in his group will be returned to the client application.

Some lists can be ordered by transmitting a sort_order=descor sort_order=asc parameter to the end point. Whether a specific list can be ordered is specified in the documentation for that specific resource.

The returned list of objects may be filtered to narrow the search results according to different attributes, like date range, user, group, search term etc.

Filtering parameters should be specified as URI parameters.

Examples:

  • Filter by data range:

    /api/v2/calls.json?daterange=2014/11/01-2014/12/01
    

    Format of daterange is YYYY/MM/DD-YYYY/MM/DD

  • Filter by user id:

    /api/v2/calls.json?user_id=546340bf-7b47-11e4-85a4-e03f497dbdff
    

    Such query will return all calls recorded for particular user. user_id is a unique ID of user created in MiaRec.

  • Filter by group id:

    /api/v2/calls.json?group_id=d1d83c40-eec7-11e4-8558-e03f497dbdff
    

    Such query will return all calls recorded for users in particular group.

  • Filter by search term:

    /api/v2/calls.json?search_term=1234
    

    Such query will return all calls which have 1234 text in phone number, phone name or call notes.

  • Filter by BroadWorks user id:

    /api/v2/calls.json?broadworks_user_id=user@broadworks.com
    

    For BroadWorks SIPREC recording method such query will return all calls recorded for particular broadworks user id.

It is possible to specify multiple filter parameters simultaneously, for example:

/api/v2/calls.json?daterange=2014/11/01-2014/12/01&search_term=12345