# UCF Results

## List the ucf results

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:pid/results`

#### Path Parameters

| Name | Type   | Description        |
| ---- | ------ | ------------------ |
| pid  | number | The ucf project id |

#### Query Parameters

| Name         | Type    | Description                                                                                                                                                                                    |
| ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| page         | number  | The page number                                                                                                                                                                                |
| begin\_date  | string  | Filter the results by begin\_date. The format is "%Y-%m-%d" or "%Y-%m-%d %H:%M:%S"                                                                                                             |
| end\_date    | string  | Filter the results by end\_date. The format is "%Y-%m-%d" or "%Y-%m-%d %H:%M:%S"                                                                                                               |
| sortby       | string  | Sort the results by 'id', 'num', 'duration\_ms'. The default is sort by 'id'.                                                                                                                  |
| order        | string  | desc or asc.  Default is desc.                                                                                                                                                                 |
| status       | string  | <p>0:Pending results.<br>2: Edited results.<br>6: Reported results.<br>10: Bucketed results.<br>14: Reported & Bucketed results.<br>-1: Deleted results<br>-2: Deleted &  Reserved results</p> |
| min          | string  | Filter the results by minimum duration. (seconds)                                                                                                                                              |
| max          | string  | Filter the results by maximum duration.(seconds)                                                                                                                                               |
| streams      | string  | Filter the results by streams ids.  Separated by ,                                                                                                                                             |
| ucf\_id      | string  | Filter the results by ucf id.                                                                                                                                                                  |
| label        | string  | <p>0: Unknown<br>1: Music<br>2: Speech<br>3: Music & Speech<br>4: Advertisement</p>                                                                                                            |
| per\_page    | boolean | The item number of one page                                                                                                                                                                    |
| label\_value | string  | if the label is advertisement, then the label\_value is the advertisement name                                                                                                                 |

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "data":[
        {
            "id":340335,
            "acr_id":"d7a4ebc9685f23bdc843ed4146b35f69",
            "status":0,
            "label":2,
            "num":3,
            "duration_ms":131460,
            "metadata":null,
            "created_at":"2020-05-27 08:56:45",
            "pid":10263,
            "operators":[
                {"operator":"ACRCloud","updated_at":"2022-04-27 08:09:49"},
                {"operator":"ACRCloud","updated_at":"2022-04-27 08:10:27"}
            ],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340334,
            "acr_id":"4fc390bfb9db91e904084715c530e25d",
            "status":0,
            "label":3,
            "num":3,
            "duration_ms":157840,
            "metadata":null,
            "created_at":"2020-05-27 08:56:41",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340333,
            "acr_id":"4965aefe6b33202f9a1fb000d2a00bd6",
            "status":0,
            "label":1,
            "num":3,
            "duration_ms":136740,
            "metadata":null,
            "created_at":"2020-05-27 08:49:18",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340332,
            "acr_id":"e0e99fd9dc89da03e5081b856dcbf609",
            "status":0,
            "label":2,
            "num":2,
            "duration_ms":130900,
            "metadata":null,
            "created_at":"2020-05-27 08:49:14",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340331,
            "acr_id":"79242e7fdf8db9063b75e5406adb2985",
            "status":0,
            "label":3,
            "num":2,
            "duration_ms":158820,
            "metadata":null,
            "created_at":"2020-05-27 08:49:10",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340330,
            "acr_id":"0ea18f0ef7548f99129086bb29699e87",
            "status":0,
            "label":3,
            "num":4,
            "duration_ms":120760,
            "metadata":null,
            "created_at":"2020-05-27 08:44:06",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340328,
            "acr_id":"f3e85570e94ae78735c49c4574422bf3",
            "status":0,
            "label":3,
            "num":4,
            "duration_ms":201060,
            "metadata":null,
            "created_at":"2020-05-27 08:43:57",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340327,
            "acr_id":"6fae20c216b2b212931d0b92ac505542",
            "status":0,
            "label":1,
            "num":2,
            "duration_ms":303900,
            "metadata":null,
            "created_at":"2020-05-27 08:43:50",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340326,
            "acr_id":"0eba7a977facffeed6b15e08d47cf135",
            "status":0,
            "label":2,
            "num":2,
            "duration_ms":194400,
            "metadata":null,
            "created_at":"2020-05-27 08:38:50",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"
        },
        {
            "id":340325,
            "acr_id":"c0f1b9e0a46f417db2634f55ebbc7954",
            "status":0,
            "label":1,
            "num":2,
            "duration_ms":129000,
            "metadata":null,
            "created_at":"2020-05-27 08:33:50",
            "pid":10263,
            "operators":[],
            "updated_at":"2020-05-27 08:56:45"           
        }
    ],
    "links":{
        "first":"http://127.0.0.1:8080/api/ucf-projects/10263/results?per_page=10&status=0&page=1",
        "last":"http://127.0.0.1:8080/api/ucf-projects/10263/results?per_page=10&status=0&page=9",
        "prev":null,
        "next":"http://127.0.0.1:8080/api/ucf-projects/10263/results?per_page=10&status=0&page=2"
    },
    "meta":{
        "current_page":1,
        "from":1,
        "last_page":9,
        "path":"http://127.0.0.1:8080/api/ucf-projects/10263/results",
        "per_page":"10",
        "to":10,
        "total":90
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request GET 'https://api-v2.acrcloud.com/api/ucf-projects/10263/results?page=1&per_page=10&status=0' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
```

{% endtab %}
{% endtabs %}

## List the details of one ucf item

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:pid/results/:ucf_id/details`

#### Path Parameters

| Name    | Type   | Description    |
| ------- | ------ | -------------- |
| pid     | number | The project id |
| ucf\_id | number | The ucf id     |

#### Query Parameters

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| page        | number |             |
| per\_page   | number |             |
| begin\_date | string |             |
| end\_date   | string |             |

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

{% tabs %}
{% tab title="200 " %}

```
{
    "data":[
        {
            "id":4708635,
            "duration_ms":137520,
            "acr_id":"d7a4ebc9685f23bdc843ed4146b35f69",
            "begin_time":"2020-05-26 08:41:33",
            "pid":10263,
            "stream":{
                "id":53,
                "uid":1,
                "pid":10263,
                "bm_stream_id":"s-U3P7kHj",
                "bm_project_id":10263,
                "from":"BM-CUSTOM",
                "state":2,
                "updated_at":"2020-12-28T07:55:04.000000Z",
                "created_at":"2020-05-28T03:53:03.000000Z",
                "bm_stream_name":"RTM KL FM",
                "bm_project_name":"PPM"
            }
        },
        {
            "id":4708634,
            "duration_ms":132500,
            "acr_id":"d7a4ebc9685f23bdc843ed4146b35f69",
            "begin_time":"2020-05-25 08:43:03",
            "pid":10263,
            "stream":{
                "id":53,
                "uid":1,
                "pid":10263,
                "bm_stream_id":"s-U3P7kHj",
                "bm_project_id":10263,
                "from":"BM-CUSTOM",
                "state":2,
                "updated_at":"2020-12-28T07:55:04.000000Z",
                "created_at":"2020-05-28T03:53:03.000000Z",
                "bm_stream_name":"RTM KL FM",
                "bm_project_name":"PPM"
            }
        },
        {
            "id":4708633,
            "duration_ms":131460,
            "acr_id":"d7a4ebc9685f23bdc843ed4146b35f69",
            "begin_time":"2020-05-24 05:17:36",
            "pid":10263,
            "stream":{
                "id":53,
                "uid":1,
                "pid":10263,
                "bm_stream_id":"s-U3P7kHj",
                "bm_project_id":10263,
                "from":"BM-CUSTOM",
                "state":2,
                "updated_at":"2020-12-28T07:55:04.000000Z",
                "created_at":"2020-05-28T03:53:03.000000Z",
                "bm_stream_name":"RTM KL FM",
                "bm_project_name":"PPM"
            }
        }
    ],
    "links":{
        "first":"http://127.0.0.1:8080/api/ucf-projects/10263/results/340335/details?per_page=10&page=1",
        "last":"http://127.0.0.1:8080/api/ucf-projects/10263/results/340335/details?per_page=10&page=1",
        "prev":null,
        "next":null
    },
    "meta":{
        "current_page":1,
        "from":1,
        "last_page":1,
        "path":"http://127.0.0.1:8080/api/ucf-projects/10263/results/340335/details",
        "per_page":"10",
        "to":3,
        "total":3
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request GET 'http://127.0.0.1:8080/api/ucf-projects/10263/results/340335/details?page=1&per_page=10' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
```

{% endtab %}
{% endtabs %}

## Get the ucf record url

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:pid/results/:ucf_id/record`

#### Path Parameters

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| pid     | string |             |
| ucf\_id | string |             |

#### Query Parameters

| Name   | Type   | Description                                                                                                |
| ------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| extend | string | The extend length(seconds) at the beginning and ending. Default is 20 seconds. The max value is 60 seconds |

#### Headers

| Name          | Type   | Description  |
| ------------- | ------ | ------------ |
| Authorization | string | Bearer token |

{% tabs %}
{% tab title="200 " %}

```
{
    "stream_id":"16323",
    "begin":1590505455380,
    "end":1590505576220,
    "prefix_extend":20,
    "suffix_extend":20,
    "play_url":"https://api-v2.acrcloud.com/api/ucf-projects/10263/results/340337/play?stream_id=16323&begin=1590505455380&end=1590505576220&prefix=20&suffix=20"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request GET 'https://api-v2.acrcloud.com/api/ucf-projects/10263/results/340337/record' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
```

{% endtab %}
{% endtabs %}

## Delete a ucf item

<mark style="color:red;">`DELETE`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:pid/results/:ucf_id`

#### Path Parameters

| Name                                      | Type   | Description                                                                                                                                                                                                           |
| ----------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| pid<mark style="color:red;">\*</mark>     | number | The ucf project id                                                                                                                                                                                                    |
| ucf\_id<mark style="color:red;">\*</mark> | number | The ucf id                                                                                                                                                                                                            |
| reserved                                  | number | 0 or 1, if you set to 1, the item will got into the Ignore & Reserved queue that means If the same content is detected again in the future, it will still enter this queue and will not reappear in the pending list. |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer token |

{% tabs %}
{% tab title="204 " %}

```
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request DELETE 'https://api-v2.acrcloud.com/api/ucf-projects/results/4768035' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
```

{% endtab %}
{% endtabs %}

## make a ucf item status pending

<mark style="color:green;">`POST`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:pid/results/:ucf_id/pending`

#### Path Parameters

| Name                                      | Type   | Description        |
| ----------------------------------------- | ------ | ------------------ |
| pid<mark style="color:red;">\*</mark>     | Number | The ucf project id |
| ucf\_id<mark style="color:red;">\*</mark> | Number | The ucf id         |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "data": {
        "id": 2794388,
        "acr_id": "fb4e3147f7ed5b122266a754707b63ad",
        "status": 0,
        "label": 2,
        "num": 2,
        "duration_ms": 8300,
        "metadata": null,
        "operator": "",
        "created_at": "2022-02-18 15:02:39",
        "updated_at": "2022-02-21 04:37:48",
        "pid": 1
    }
}
```

{% endtab %}
{% endtabs %}

## Get one ucf item

<mark style="color:blue;">`GET`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:pid/results/:ucf_id`

#### Path Parameters

| Name                                      | Type          | Description              |
| ----------------------------------------- | ------------- | ------------------------ |
| pid<mark style="color:red;">\*</mark>     | Number        | The project id           |
| ucf\_id<mark style="color:red;">\*</mark> | Number/String | The UCF item id or acrid |

{% tabs %}
{% tab title="200: OK " %}

````json
```json
{
    "data": {
        "id": 325483111,
        "acr_id": "f111693a9ead2b2fda633543543f9d6a",
        "status": 0,
        "label": 4,
        "label_value": "",
        "num": 2,
        "duration_ms": 21760,
        "metadata": null,
        "begin_time": "2023-05-17 11:17:10",
        "fs_id": "668ad1b6-08cd-4313-b47e-79d9cc56e9aa",
        "created_at": "2023-05-18 09:42:49",
        "updated_at": "2023-05-22 07:56:33",
        "pid": 12345,
        "operators": [],
        "speech": [
            {
                "id": 0,
                "start": 0,
                "end": 2.16,
                "text": " Your U event is on at Dormezvous."
            },
            {
                "id": 1,
                "start": 2.16,
                "end": 5.68,
                "text": " For a limited time, get hot prices on your sleep essentials."
            },
            {
                "id": 2,
                "start": 5.68,
                "end": 7.32,
                "text": " Sleep well, stay well."
            },
            {
                "id": 3,
                "start": 7.32,
                "end": 8.32,
                "text": " Dormezvous."
            },
            {
                "id": 4,
                "start": 8.32,
                "end": 10.84,
                "text": " Are you thinking of a pool?"
            },
            {
                "id": 5,
                "start": 10.84,
                "end": 12.44,
                "text": " Above ground or in ground?"
            },
            {
                "id": 6,
                "start": 12.44,
                "end": 13.68,
                "text": " Trevi has good news for you."
            },
            {
                "id": 7,
                "start": 13.68,
                "end": 15.48,
                "text": " Book now and it'll be installed in June."
            },
            {
                "id": 8,
                "start": 15.48,
                "end": 20.240000000000002,
                "text": " And if you buy or rent a Trevi spa, it'll be delivered within 48 business hours."
            },
            {
                "id": 9,
                "start": 20.24,
                "end": 36.879999999999995,
                "text": " Starting Friday, take advantage of all Trevi's great weekend deals."
            }
        ]
    }
}
```
````

{% endtab %}
{% endtabs %}
