Введение

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

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

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

ML Results

Список

GET
https://ml.stage.odinn.cloud
/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.stage.odinn.cloud/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
                                                            : *
                                                         
{
    "message": "Server Error"
}

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

GET
https://ml.stage.odinn.cloud
/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.stage.odinn.cloud/api/ml-results/ml-data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        \"987d869f-4444-3341-9534-184d045b08ea\"
    ]
}"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Server Error"
}

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

POST
https://ml.stage.odinn.cloud
/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.stage.odinn.cloud/api/ml-results/export" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        \"be7e97ef-cf64-3600-a180-b6561b8a7de0\"
    ],
    \"with_photo\": true
}"

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

GET
https://ml.stage.odinn.cloud
/api/ml-results/{id}

Headers

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

URL Parameters

id
uuid
required

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

Example:
89215061-a8da-3d29-bc69-1ade0efe9b48
Example request:
curl --request GET \
    --get "https://ml.stage.odinn.cloud/api/ml-results/89215061-a8da-3d29-bc69-1ade0efe9b48" \
    --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": "Server Error"
}

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

GET
https://ml.stage.odinn.cloud
/api/ml-results/{id}/download

Headers

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

URL Parameters

id
uuid
required

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

Example:
7f1990df-9287-3df8-aa12-fe8d2a73ae46
Example request:
curl --request GET \
    --get "https://ml.stage.odinn.cloud/api/ml-results/7f1990df-9287-3df8-aa12-fe8d2a73ae46/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": "Server Error"
}

Модели

Список

GET
https://ml.stage.odinn.cloud
/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.stage.odinn.cloud/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": "a060b47f-c4fc-4267-82f9-b94a5f45553f",
            "name": "Multimodal",
            "notes": null,
            "file_id": "a060b47f-a9aa-44c3-800f-4f0331d6c11f",
            "classes": [
                "Deconstruct_filter",
                "Construct_filter",
                "Pen",
                "Pencil",
                "Work_with_computer",
                "STAND_part_one_screw",
                "STAND_tight_second_screw"
            ],
            "created_at": "2025-11-17T09:34:15.000000Z",
            "updated_at": "2025-11-17T09:34:15.000000Z",
            "deleted_at": null,
            "file": {
                "id": "a060b47f-a9aa-44c3-800f-4f0331d6c11f",
                "name": "best_float32_metadata.tflite",
                "title": null,
                "path": "/models/xf1Kgg1NtbghgLIoZYKGAOMFAWosUDZDbqkg8Sdx.tflite",
                "mime": "application/octet-stream",
                "size": 12291067,
                "last_accessed_at": "2025-11-17T09:34:15.000000Z",
                "created_at": "2025-11-17T09:34:15.000000Z",
                "updated_at": "2025-11-17T09:34:15.000000Z",
                "deleted_at": null
            }
        },
        {
            "id": "9fd585b7-ab3e-40d8-872c-8480c8438297",
            "name": "Best_Float32",
            "notes": null,
            "file_id": "9fd585b7-9adf-4a8b-aa8a-262d80214e33",
            "classes": [
                "Construct_filter",
                "Log_filling",
                "Work_with_computer"
            ],
            "created_at": "2025-09-09T05:03:22.000000Z",
            "updated_at": "2025-09-09T05:03:22.000000Z",
            "deleted_at": null,
            "file": {
                "id": "9fd585b7-9adf-4a8b-aa8a-262d80214e33",
                "name": "best_float32_metadata.tflite",
                "title": null,
                "path": "/models/bMoKJs1gBQrkzaui6ite4MVErUKzyybVhieHeAfd.tflite",
                "mime": "application/octet-stream",
                "size": 12291067,
                "last_accessed_at": "2025-09-09T05:03:22.000000Z",
                "created_at": "2025-09-09T05:03:22.000000Z",
                "updated_at": "2025-09-09T05:03:22.000000Z",
                "deleted_at": null
            }
        }
    ],
    "first_page_url": "https://ml.stage.odinn.cloud/api/ai-model?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://ml.stage.odinn.cloud/api/ai-model?page=1",
    "links": [
        {
            "url": null,
            "label": "« Назад",
            "active": false
        },
        {
            "url": "https://ml.stage.odinn.cloud/api/ai-model?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Вперёд »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://ml.stage.odinn.cloud/api/ai-model",
    "per_page": 50,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}

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

GET
https://ml.stage.odinn.cloud
/api/ai-model/{id}

Headers

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

URL Parameters

id
uuid
required

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

Example:
2fb568c0-a6cc-3a47-86f1-afe264de212b
Example request:
curl --request GET \
    --get "https://ml.stage.odinn.cloud/api/ai-model/2fb568c0-a6cc-3a47-86f1-afe264de212b" \
    --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 #2fb568c0-a6cc-3a47-86f1-afe264de212b Not found"
}

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

GET
https://ml.stage.odinn.cloud
/api/ai-model/{id}/download

Headers

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

URL Parameters

id
uuid
required

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

Example:
d0c9af86-67db-3294-9e21-493cb7e29c38
Example request:
curl --request GET \
    --get "https://ml.stage.odinn.cloud/api/ai-model/d0c9af86-67db-3294-9e21-493cb7e29c38/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.stage.odinn.cloud
/api/ai-model

Headers

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

Body Parameters

Example request:
curl --request POST \
    "https://ml.stage.odinn.cloud/api/ai-model" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=est"\
    --form "notes=consequatur"\
    --form "classes[]=debitis"\
    --form "file=@/tmp/phpZ6ew8V" 

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

PUT
https://ml.stage.odinn.cloud
/api/ai-model/{id}

Headers

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

URL Parameters

id
uuid
required

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

Example:
bc9a3c73-d080-37ed-806f-2b510e847f7b

Body Parameters

Example request:
curl --request PUT \
    "https://ml.stage.odinn.cloud/api/ai-model/bc9a3c73-d080-37ed-806f-2b510e847f7b" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=ullam"\
    --form "notes=fugit"\
    --form "classes[]=suscipit"\
    --form "file=@/tmp/phpvCz7EA" 

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

DELETE
https://ml.stage.odinn.cloud
/api/ai-model/{id}

Headers

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

URL Parameters

id
uuid
required

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

Example:
4941c99a-8235-3313-b145-4223dcdb3efc
Example request:
curl --request DELETE \
    "https://ml.stage.odinn.cloud/api/ai-model/4941c99a-8235-3313-b145-4223dcdb3efc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"