Введение

Документация предоставляет всю информацию, необходимую вам для работы с нашим API.

Аутентификация запросов

Этот API не аутентифицирован.

ML Results

Список

GET
https://ml-test.shiryaevser.site
/api/ml-results

Получить список экспортов результатов применения ML (с пагинацией)

Стандартный листинг Одинна с возможностью фильтрации

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

page
integer

Номер страницы.

Example:
1
page-size
integer

Количество элементов, возвращаемых на странице. По умолчанию 50.

Example:
50
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ml-results?page=1&page-size=50" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "current_page": 1,
    "data": [],
    "first_page_url": "https://ml-test.shiryaevser.site/api/ml-results?page=1",
    "from": null,
    "last_page": 1,
    "last_page_url": "https://ml-test.shiryaevser.site/api/ml-results?page=1",
    "links": [
        {
            "url": null,
            "label": "« Назад",
            "active": false
        },
        {
            "url": "https://ml-test.shiryaevser.site/api/ml-results?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Вперёд »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://ml-test.shiryaevser.site/api/ml-results",
    "per_page": 50,
    "prev_page_url": null,
    "to": null,
    "total": 0
}

Получение результатов по применению ML через API

GET
https://ml-test.shiryaevser.site
/api/ml-results/ml-data

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ml-results/ml-data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        \"4f50fb99-02a6-3590-8feb-260cda80963e\"
    ]
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Server Error"
}

Экспорт результатов по применению ML в виде файла

POST
https://ml-test.shiryaevser.site
/api/ml-results/export

Начинает выгрузку результатов по применению ML в виде файла. Метод только начинает выгрузку, скачать файл можно будет по завершении (статус completed)

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://ml-test.shiryaevser.site/api/ml-results/export" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        \"2de617ad-5526-3466-966d-e94a48073924\"
    ],
    \"with_photo\": true
}"

Получить информацию об экспорте

GET
https://ml-test.shiryaevser.site
/api/ml-results/{id}

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
cda06123-58ec-3b78-a4b6-cd6f91510714
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ml-results/cda06123-58ec-3b78-a4b6-cd6f91510714" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Ml Results Export #cda06123-58ec-3b78-a4b6-cd6f91510714 Not found"
}

Скачать файл экспорта результатов по применению ML

GET
https://ml-test.shiryaevser.site
/api/ml-results/{id}/download

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
a2ce4e1f-8ef0-3575-8350-0bd5627729ed
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ml-results/a2ce4e1f-8ef0-3575-8350-0bd5627729ed/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": ""
}

Весы моделей

Список

GET
https://ml-test.shiryaevser.site
/api/weight

Получить список весов (с пагинацией) Стандартный листинг Одинна с возможностью фильтрации

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

page
integer

Номер страницы.

Example:
1
page-size
integer

Количество элементов, возвращаемых на странице. По умолчанию 50.

Example:
50
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/weight?page=1&page-size=50" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "current_page": 1,
    "data": [],
    "first_page_url": "https://ml-test.shiryaevser.site/api/weight?page=1",
    "from": null,
    "last_page": 1,
    "last_page_url": "https://ml-test.shiryaevser.site/api/weight?page=1",
    "links": [
        {
            "url": null,
            "label": "« Назад",
            "active": false
        },
        {
            "url": "https://ml-test.shiryaevser.site/api/weight?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Вперёд »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://ml-test.shiryaevser.site/api/weight",
    "per_page": 50,
    "prev_page_url": null,
    "to": null,
    "total": 0
}

Получить информацию о весах модели

GET
https://ml-test.shiryaevser.site
/api/weight/{id}

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
95fcbe0b-fdfb-3006-abe1-d926375809d3
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/weight/95fcbe0b-fdfb-3006-abe1-d926375809d3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Weight #95fcbe0b-fdfb-3006-abe1-d926375809d3 Not found"
}

Скачать файл весов

GET
https://ml-test.shiryaevser.site
/api/weight/{id}/download

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
d84acd23-5638-3cad-a74a-d3e2d2bf5da0
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/weight/d84acd23-5638-3cad-a74a-d3e2d2bf5da0/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": ""
}

Создать

POST
https://ml-test.shiryaevser.site
/api/weight

Headers

Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://ml-test.shiryaevser.site/api/weight" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=quia"\
    --form "notes=eius"\
    --form "models[]=veniam"\
    --form "file=@/tmp/phpYqZfgI" 

Обновить информацию о весах моделей

PUT
https://ml-test.shiryaevser.site
/api/weight/{id}

Headers

Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
97b5a07c-f7ff-3d29-89f5-e2dca74c525c

Body Parameters

Example request:
curl --request PUT \
    "https://ml-test.shiryaevser.site/api/weight/97b5a07c-f7ff-3d29-89f5-e2dca74c525c" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=dignissimos"\
    --form "notes=enim"\
    --form "models[]=possimus"\
    --form "file=@/tmp/phppCWm0F" 

Удалить весы модели

DELETE
https://ml-test.shiryaevser.site
/api/weight/{id}

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
6e366ac9-cfcf-3207-aaee-aee27d74c69c
Example request:
curl --request DELETE \
    "https://ml-test.shiryaevser.site/api/weight/6e366ac9-cfcf-3207-aaee-aee27d74c69c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Модели

Список

GET
https://ml-test.shiryaevser.site
/api/ai-model

Получить список весов (с пагинацией) Стандартный листинг Одинна с возможностью фильтрации

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

page
integer

Номер страницы.

Example:
1
page-size
integer

Количество элементов, возвращаемых на странице. По умолчанию 50.

Example:
50
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ai-model?page=1&page-size=50" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "current_page": 1,
    "data": [
        {
            "id": "9cc76c1a-b58e-46fa-8b04-235c40f71bfb",
            "name": "Best_Float32",
            "notes": null,
            "file_id": "9cc76c1a-10c6-43dd-a27b-674aaa555e24",
            "classes": [
                "Construct_filter",
                "Log_filling",
                "Work_with_computer"
            ],
            "created_at": "2024-08-16T10:14:21.000000Z",
            "updated_at": "2024-08-16T10:14:21.000000Z",
            "deleted_at": null,
            "weights": [],
            "file": {
                "id": "9cc76c1a-10c6-43dd-a27b-674aaa555e24",
                "name": "best_float32_metadata.tflite",
                "title": null,
                "path": "/models/ncJ973IjQX18kETGPjaIXiqaB89DEUcQiVfMhAJ8.tflite",
                "mime": "application/octet-stream",
                "size": 12291067,
                "last_accessed_at": "2024-08-16T10:14:20.000000Z",
                "created_at": "2024-08-16T10:14:20.000000Z",
                "updated_at": "2024-08-16T10:14:20.000000Z",
                "deleted_at": null
            }
        },
        {
            "id": "9cc16f6b-fb29-40ff-be94-5a415d919b9b",
            "name": "TestVideoModel",
            "notes": null,
            "file_id": "9cc16f6b-e964-4fbe-b6ac-b6722d2cd322",
            "classes": [
                "video"
            ],
            "created_at": "2024-08-13T10:48:39.000000Z",
            "updated_at": "2024-08-13T10:48:39.000000Z",
            "deleted_at": null,
            "weights": [],
            "file": {
                "id": "9cc16f6b-e964-4fbe-b6ac-b6722d2cd322",
                "name": "LRCN.tflite",
                "title": null,
                "path": "/models/Z48FT7k7oXTz1MtElviphE8WRpTyJh1y1YNndvZp.tflite",
                "mime": "application/octet-stream",
                "size": 308504,
                "last_accessed_at": "2024-08-13T10:48:39.000000Z",
                "created_at": "2024-08-13T10:48:39.000000Z",
                "updated_at": "2024-08-13T10:48:39.000000Z",
                "deleted_at": null
            }
        },
        {
            "id": "9cc15dfc-3ae5-4fed-af43-343c4e17e2b0",
            "name": "TestSensorModel",
            "notes": null,
            "file_id": "9cc15dfc-2c6b-4bb6-bba7-d676965da455",
            "classes": [
                "sensor"
            ],
            "created_at": "2024-08-13T09:59:54.000000Z",
            "updated_at": "2024-08-13T09:59:54.000000Z",
            "deleted_at": null,
            "weights": [],
            "file": {
                "id": "9cc15dfc-2c6b-4bb6-bba7-d676965da455",
                "name": "saved_model.tflite",
                "title": null,
                "path": "/models/n6CLvIOqh0kC1KR01Pq3c8hZdbVH7fZbBT8PIwnE.tflite",
                "mime": "application/octet-stream",
                "size": 56432,
                "last_accessed_at": "2024-08-13T09:59:54.000000Z",
                "created_at": "2024-08-13T09:59:54.000000Z",
                "updated_at": "2024-08-13T09:59:54.000000Z",
                "deleted_at": null
            }
        },
        {
            "id": "9cbfed10-4caa-45cf-809b-8539a0468330",
            "name": "TestNameNew",
            "notes": null,
            "file_id": "9cbfed10-3d3b-4478-8328-a3f441bd6f5c",
            "classes": null,
            "created_at": "2024-08-12T16:48:19.000000Z",
            "updated_at": "2024-08-12T16:48:19.000000Z",
            "deleted_at": null,
            "weights": [],
            "file": {
                "id": "9cbfed10-3d3b-4478-8328-a3f441bd6f5c",
                "name": "saved_model.pb",
                "title": null,
                "path": "/models/7Hkf3tlADzeEg329Yf3VehqsZdSh2skhZzmFWPyU.pb",
                "mime": "application/octet-stream",
                "size": 804190,
                "last_accessed_at": "2024-08-12T16:48:19.000000Z",
                "created_at": "2024-08-12T16:48:19.000000Z",
                "updated_at": "2024-08-12T16:48:19.000000Z",
                "deleted_at": null
            }
        }
    ],
    "first_page_url": "https://ml-test.shiryaevser.site/api/ai-model?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://ml-test.shiryaevser.site/api/ai-model?page=1",
    "links": [
        {
            "url": null,
            "label": "« Назад",
            "active": false
        },
        {
            "url": "https://ml-test.shiryaevser.site/api/ai-model?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Вперёд »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://ml-test.shiryaevser.site/api/ai-model",
    "per_page": 50,
    "prev_page_url": null,
    "to": 4,
    "total": 4
}

Получить информацию о модели

GET
https://ml-test.shiryaevser.site
/api/ai-model/{id}

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
a204f196-3991-3b5f-8797-9e2ff8bef071
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ai-model/a204f196-3991-3b5f-8797-9e2ff8bef071" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "AI Model #a204f196-3991-3b5f-8797-9e2ff8bef071 Not found"
}

Скачать файл модели

GET
https://ml-test.shiryaevser.site
/api/ai-model/{id}/download

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
54478eb5-fdf3-309f-8c5c-0fcdc6148c40
Example request:
curl --request GET \
    --get "https://ml-test.shiryaevser.site/api/ai-model/54478eb5-fdf3-309f-8c5c-0fcdc6148c40/download" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": ""
}

Создать

POST
https://ml-test.shiryaevser.site
/api/ai-model

Headers

Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://ml-test.shiryaevser.site/api/ai-model" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=neque"\
    --form "notes=necessitatibus"\
    --form "classes[]=quo"\
    --form "file=@/tmp/phptEJv5I" 

Обновить информацию о модели

PUT
https://ml-test.shiryaevser.site
/api/ai-model/{id}

Headers

Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
4d3a4e25-f894-3090-8bea-683820e0d148

Body Parameters

Example request:
curl --request PUT \
    "https://ml-test.shiryaevser.site/api/ai-model/4d3a4e25-f894-3090-8bea-683820e0d148" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=qui"\
    --form "notes=magnam"\
    --form "classes[]=iste"\
    --form "file=@/tmp/php7Z1spF" 

Удалить модель

DELETE
https://ml-test.shiryaevser.site
/api/ai-model/{id}

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
d8d73942-97ab-3399-a548-41ecec484459
Example request:
curl --request DELETE \
    "https://ml-test.shiryaevser.site/api/ai-model/d8d73942-97ab-3399-a548-41ecec484459" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"