openapi: 3.0.0 info: title: Recordings description: >- This API exposes a set of functions to interact with completed recordings version: 2025.Winter.1 servers: - url: "http://{host}/fw/Apps/Recorder/WebAPI/Recordings" description: UCX Suite server variables: host: default: localhost description: The UCX Suite server hostname or IP address security: - basic: [] paths: /: get: summary: Returns a collection of recordings tags: [Recordings] security: [basic: []] parameters: - name: page description: The 0-based page index you want to be returned in: query schema: type: integer example: 2 - name: pageSize description: > Number of records in a single page. **Note**: If no page size is given, all the recordings matching the filters will be returned. This could affect the performaces of the Suite. in: query schema: type: integer example: 25 - name: startTime description: Filter the returned recordings according to their start time. See [RHS-Colon:datetime](#/%20) for more details on the format. in: query schema: type: string format: RHS-Colon:datetime example: "after:2023-01-01T00:00:00Z" - name: endTime description: Filter the returned recordings according to their end time. See [RHS-Colon:datetime](#/%20) for more details on the format. in: query schema: type: string format: RHS-Colon:datetime example: "before:2023-01-02T00:00:00Z" - name: localPartyNumber description: Filter the recordings having given local party number in: query schema: type: string example: "225" - name: remoteParty description: Filter the recordings whose remote party number is or contains given value. See [RHS-Colon:string](#/%20) for more details on the format. in: query schema: type: string format: RHS-Colon:string example: "contains:+1234" - name: ownerUsername description: Filter the recordings of the given user in: query schema: type: string example: "john_doe" - name: direction description: Filter the recordings having given direction in: query schema: $ref: "#/components/schemas/Direction" responses: "200": description: Returning the filtered list of recordings, sorted by most recent first content: application/json: schema: properties: totalCount: description: The total number of recordings that match given filters type: integer example: 123 recordings: description: An array containing the requested recordings page or all the matching recordings if no paging is requested type: array items: $ref: "#/components/schemas/Recording" "400": description: One or more of the given parameters are invalid content: application/json: schema: properties: reason: type: integer description: > The reason why the request has been rejected * `0`: Some of the filtering parameters are invalid * `1`: Some of the paging parameters are invalid enum: [0, 1] message: type: string description: A human readable error description "401": $ref: "#/components/responses/401" "403": $ref: "#/components/responses/403" "500": $ref: "#/components/responses/500" "504": $ref: "#/components/responses/504" post: summary: Upload a new recording tags: [Recordings] security: [basic: []] requestBody: description: The request body is a `multipart/form-data` containing a part that describes the recording information and a part as the audio file attachment you want to upload. required: true content: multipart/form-data: schema: type: object required: - jsondata - attachment properties: jsondata: allOf: - $ref: "#/components/schemas/UploadRecordingMetadata" - description: | The first part of the multipart body, with `Content-Type` set to `application/json`. * It must contain a JSON object as described in the [UploadRecordingMetadata](#model-UploadRecordingMetadata) schema below attachment: description: | The second part of the multipart body, with `Content-Type` set according to the audio file format. * It must contain the audio file of the recording you want to upload. * The supported audio formats are: * `audio/wave` → _WAV (PCM-8, PCM-16, A-Law, u-Law)_ * `audio/mpeg` → _MP3_ * The maximum audio file size is _256 MB_ type: string format: binary encoding: jsondata: contentType: application/json attachment: contentType: audio/wave, audio/mpeg examples: WAV: summary: "Containing a WAV File" value: | Content-Type: multipart/form-data; boundary=8d0d51ed-3539-48fa-a239-fb4ee91b3b99 --8d0d51ed-3539-48fa-a239-fb4ee91b3b99 Content-Type: application/json Content-Disposition: form-data; name=jsondata { "direction": 2, "localParty": { "phoneNumber": "376", "username": "john_doe" }, "preserved": true, "duration": "PT1M30S", "notes": "text describing recording content", "startDateTime": "2018-09-25T13:00:00.0000000Z", "remoteParty": { "phoneNumber": "123456" }, "pbxInfo": { "type": "generic", "localCallId": "ab123", "remoteCallId": "xy987", "sessionId": "xy123" } } --8d0d51ed-3539-48fa-a239-fb4ee91b3b99 Content-Type: audio/wave Content-Disposition: form-data; name=attachment; filename=sample.wav; filename*=utf-8''sample.wav ♫ --8d0d51ed-3539-48fa-a239-fb4ee91b3b99-- MP3: summary: "Containing an MP3 File" value: | Content-Type: multipart/form-data; boundary=61e3a227-3050-4eb8-8ddf-e1e470ec7dd1 --61e3a227-3050-4eb8-8ddf-e1e470ec7dd1 Content-Type: application/json Content-Disposition: form-data; name=jsondata { "direction": 2, "localParty": { "phoneNumber": "1234", "username": "test" }, "preserved": true, "duration": "PT1M30S", "notes": "text describing recording content", "startDateTime": "2024-09-26T11:00:00.0000000Z", "remoteParty": { "phoneNumber": "11111" }, "pbxInfo": { "type": "generic", "localCallId": "ab123", "remoteCallId": "xy987", "sessionId": "xy123" } } --61e3a227-3050-4eb8-8ddf-e1e470ec7dd1 Content-Type: audio/mpeg Content-Disposition: form-data; name=attachment; filename=sample.mp3; filename*=utf-8''sample.mp3 ♫ --61e3a227-3050-4eb8-8ddf-e1e470ec7dd1-- responses: "201": description: Returning the ID of the newly created recording content: application/json: schema: properties: id: $ref: "#/components/parameters/id/schema" "400": description: One or more of the given parameters are invalid content: application/json: schema: properties: reason: type: integer description: > The reason why the request has been rejected * `0`: Body is null or cannot be parsed * `1`: Given recording metadata are not valid * `2`: Given recording audio file is not valid enum: [0, 1, 2] message: type: string description: A human readable error description "401": $ref: "#/components/responses/401" "403": $ref: "#/components/responses/403" "409": description: The recording start date is out of the retention period "500": $ref: "#/components/responses/500" "501": description: The Imagicle Call Recording license is invalid "504": $ref: "#/components/responses/504" /{id}: get: summary: Retrieve detailed information of a single recording tags: [Recordings] security: [basic: []] parameters: - $ref: "#/components/parameters/id" responses: "200": description: Returning an object containing detailed information of a single recording content: application/json: schema: $ref: "#/components/schemas/RecordingDetail" "400": description: Given identifier is not a valid UUID "401": $ref: "#/components/responses/401" "403": $ref: "#/components/responses/403" "404": description: No recording has been found having given identifier "500": $ref: "#/components/responses/500" "504": $ref: "#/components/responses/504" /{id}/Media: get: summary: Retrieves the unencrypted MP3 media for a single recording tags: [Recordings] security: [basic: []] parameters: - $ref: "#/components/parameters/id" responses: "200": description: The response body is a stream containing the MP3 encoded recording audio content: audio/mpeg: schema: type: string format: binary example: "♫" "400": description: Given identifier is not a valid UUID "401": $ref: "#/components/responses/401" "403": $ref: "#/components/responses/403" "404": description: No recording has been found having given identifier "500": $ref: "#/components/responses/500" "504": $ref: "#/components/responses/504" tags: - name: Recordings - name: " " description: > # Right Hand Side (RHS) Colon Some of the query parameters in this API is using the RHS Colon syntax. Here is a deeper explanation of what it looks like and how to use it. ## RHS-Colon:datetime This syntax can be used for parameters using the `RHS-Colon:datetime` format. **Note**: Date and time values must use the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format.
| Operator | Examples | Notes |
|---|---|---|
| equals | param=equals:2018-11-01T00:00:00Zparam=2018-11-01T00:00:00Z |
The operator can be omitted since it is the default one |
| before | param=before:2018-10-10T13:05:34Z |
The upper limit is excluded |
| after | param=after:2018-11-05T09:12:24Z |
The lower limit is excluded |
| between | param=between:2018-11-01T00:00:00Z;2018-11-02T00:00:00Z |
The lower limit is included and the upper one is not. The two limits are separated by a semicolon symbol ( ;) |
| Operator | Examples | Notes |
|---|---|---|
| equals | param=equals:some valueparam=somethingparam=semi\;colon-back\\slash |
The operator can be omitted since it is the default one |
| contains | param=contains:val |
Any items whose filtered parameter contains the searched sub-string will be matched |