# Platform

## 플랫폼 일 별 통계를 조회합니다.

<mark style="color:blue;">`GET`</mark> `https://service-stage.pic-origin.com/api/v2/platforms/{platform_id}/stats`

#### Path Parameters

| Name                                       | Type   | Description                       |
| ------------------------------------------ | ------ | --------------------------------- |
| user\_id<mark style="color:red;">\*</mark> | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p> |

#### Headers

| Name                                            | Type   | Description       |
| ----------------------------------------------- | ------ | ----------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Platform ${Token} |

Query Parameters

| Name                                          | Type   | Description                                                      |
| --------------------------------------------- | ------ | ---------------------------------------------------------------- |
| start\_date<mark style="color:red;">\*</mark> | String | <p>조회 기간의 시작 날짜 (YYYYMMDD).<br>(default=None)<br>ex)20240520</p> |
| end\_date<mark style="color:red;">\*</mark>   | String | <p>조회 기간의 종료 날짜 (YYYYMMDD).<br>(default=None)<br>ex)20240521</p> |
| sort\_order                                   | String | <p>정렬 방식 <br>(default=asc) <br>\[asc, desc] <br>ex)desc</p>      |

{% tabs %}
{% tab title="200: OK 일 별 통계 조회 성공" %}

```
{
    "status_code": 200,
    "message": "성공",
    "result": [
        {
            "date": 20240520,
            "stats": {
                "upload_camera": 0,
                "upload_gallery": 0,
                "upload_request": 0,
                "total_upload": 0,
                "edit_count": 0,
                "delete_count": 0,
                "total_images": 0,
                "org_filesize_mb": 0.0,
                "org_latest_filesize_mb": 0.0,
                "total_filesize_mb": 0.0
            }
        },
        {
            "date": 20240521,
            "stats": {
                "upload_camera": 0,
                "upload_gallery": 5,
                "upload_request": 0,
                "total_upload": 5,
                "edit_count": 0,
                "delete_count": 0,
                "total_images": 5,
                "org_filesize_mb": 0.34,
                "org_latest_filesize_mb": 0.34,
                "total_filesize_mb": 0.34
            }
        },
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request 일 별 통계 조회 실패" %}

{% endtab %}
{% endtabs %}

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

```bash
curl --location 'https://service-stage.pic-origin.com/api/v2/platforms/{platform_id}/stats?start_date=20240520&end_date=20240521' \
--header 'Authorization: Platform {YOUR_TOKEN}'
```

{% endtab %}
{% endtabs %}

## 플랫폼 전체 통계를 조회합니다.

<mark style="color:blue;">`GET`</mark> `https://service-stage.pic-origin.com/api/v2/platforms/{platform_id}/stats/total`

#### Path Parameters

| Name                                       | Type   | Description                       |
| ------------------------------------------ | ------ | --------------------------------- |
| user\_id<mark style="color:red;">\*</mark> | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p> |

#### Headers

| Name                                            | Type   | Description       |
| ----------------------------------------------- | ------ | ----------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Platform ${Token} |

{% tabs %}
{% tab title="200: OK 전체 통계 조회 성공" %}

```
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "upload_camera": 0,
        "upload_gallery": 40,
        "upload_request": 0,
        "total_upload": 40,
        "edit_count": 0,
        "delete_count": 0,
        "total_images": 40,
        "org_filesize_mb": 2.71,
        "org_latest_filesize_mb": 2.71,
        "total_filesize_mb": 2.71
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 전체 통계 조회 실패" %}

{% endtab %}
{% endtabs %}

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

```bash
curl --location 'https://service-stage.pic-origin.com/api/v2/platforms/{platform_id}/stats/total' \
--header 'Authorization: Platform {YOUR_TOKEN}'
```

{% endtab %}
{% endtabs %}
