> For the complete documentation index, see [llms.txt](https://docs.acrcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acrcloud.com/reference/console-api/ucf-projects.md).

# UCF Projects

## Create a ucf project

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

This endpoint allows you to get free cakes.

#### Headers

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

#### Request Body

| Name   | Type   | Description                                            |
| ------ | ------ | ------------------------------------------------------ |
| name   | string | The project name                                       |
| type   | string | BM or FILES, default is BM.                            |
| region | string | eu-west-1,us-west-2,ap-southeast-1                     |
| config | object | default is {"days":3,"mini\_ms":5000,"max\_ms":300000} |

{% tabs %}
{% tab title="200 Project successfully created." %}

```
{
    "data": {
        "uid": 1,
        "name": "test",
        "region": "eu-west-1",
        "type": "BM",
        "config": {
            "days": 3,
            "min_ms": 5000,
            "max_ms": 300000
        },
        "updated_at": "2020-12-28T04:57:13.000000Z",
        "created_at": "2020-12-28T04:57:13.000000Z",
        "id": 100000
    }
}
```

{% endtab %}
{% endtabs %}

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

```bash
curl --location --request POST 'http://127.0.0.1:8080/api/ucf-projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw '{"name":"test", "region":"eu-west-1", "type":"BM"}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "http://127.0.0.1:8080/api/ucf-projects"

payload={"name":"test", "region":"eu-west-1", "type":"BM"}"
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI2IiwianRpIjoiN2Y2N2NhNmE4NmMxOGZiMWZmYmVkOWM5OTQwNGQxNWI1MjU2NmE1NzVlNTdkMjFjYjBiM2Y4MWQzYTJmZjM1N2FiZjhmNjRjY2YyYWQ0NDkiLCJpYXQiOjE2MDg0NzIwODQsIm5iZiI6MTYwODQ3MjA4NCwiZXhwIjoxNjQwMDA4MDg0LCJzdWIiOiIxIiwic2NvcGVzIjpbIioiXX0.nTbfzMg2thStTmX2dy1ZEB1JSILpwzLv5DMDVaxUY5NaC9GAj_VLAKNVJyOWvY5Ti-LFFvcQ8W8rVL4NesXnJJ89jLYwMoskCcvs8ZZNIJEfo6CAj5Lzp0Thc3eqHRDbOtVhgZojmdI5BsU9nBVAowOnVbLDv_3MoqP3MGFlSuhfVKgQZwLiVavvVjLVIZkxaEczmhCZIW1Dr_sYWkYzyDFRcZ2paz1lMzFBp7zLtYEsbCa6odSyMQxzxKZ-6h3WgpRjx34vrC6THH-zpf8TTlTM7ddmq1mHr_o3JvAHzfZCjqAFs3YU3uIeVI-U_-XXXZCHusy-QW7cCmJOBSzztiUKzUpNu-UdSHStPVeobUQTv86mNBMtgAZEXyflTTs7YkC6I83N9AAIW-tXyt50VcmHBKRy3qjzC-SwgOphuOLfSNIz0sy7PSckztWsx07XNKck_M-ajSthnS7FE9TDJ5Q5WC3UPBq056CYZckqOPByCJKf3ktmiOGKBXof05Peq-Uts0A0K6V16y0vr5m_v2Honxt3F0wfEWApyqHjEHopOu3zjTN7r3SOrjJMDQgmDduZBrk_iLrX4ggu6I5P70s2HVyT5mpvJiULWamanYaYgQfDSVFLeM4X6ffihrgzlle55rzRazfdNjspU_VusZWik4DOpMjZ-iHA9oo_lEA',
  'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, json=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}

## List the ucf projects

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

#### Query Parameters

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| region | string |             |

#### Headers

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

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

```
{
    "data": [
        {
            "id": 100000,
            "uid": 1,
            "name": "test",
            "region": "eu-west-1",
            "type": "BM",
            "config": {
                "days": 3,
                "min_ms": 5000,
                "max_ms": 300000
            },
            "created_at": "2020-12-28T04:57:13.000000Z",
            "updated_at": "2020-12-28T04:57:13.000000Z"
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8080/api/ucf-projects?page=1",
        "last": "http://127.0.0.1:8080/api/ucf-projects?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",
        "per_page": 15,
        "to": 1,
        "total": 1
    }
}
```

{% endtab %}
{% endtabs %}

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

```bash
curl --location --request GET 'http://127.0.0.1:8080/api/ucf-projects' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer token'
```

{% endtab %}
{% endtabs %}

## Update a ucf project

<mark style="color:orange;">`PUT`</mark> `https://api-v2.acrcloud.com/api/ucf-projects/:id`

#### Path Parameters

| Name | Type   | Description        |
| ---- | ------ | ------------------ |
| id   | number | the ucf project id |

#### Headers

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

#### Request Body

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| config | object |             |
| name   | string |             |

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

```
{
    "data": {
        "uid": 1,
        "name": "test",
        "region": "eu-west-1",
        "type": "BM",
        "config": {
            "days": 3,
            "min_ms": 5000,
            "max_ms": 300000
        },
        "updated_at": "2020-12-28T04:57:13.000000Z",
        "created_at": "2020-12-28T04:57:13.000000Z",
        "id": 100000
    }
}
```

{% endtab %}
{% endtabs %}

## Delete a ucf project

<mark style="color:red;">`DELETE`</mark> `/api/ucf-projects/:id`

#### Path Parameters

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

#### Headers

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

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

```
```

{% endtab %}
{% endtabs %}
