Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

dzzp/argos-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 

Repository files navigation

ARGOS-API

/cases

GET

Get all cases

Request

  • /?search= : Return recent
  • /?search=query : Return search with query

Response

{
    "cases": [
        {
            "title": case_title,
            "hash": case_hash,
            "memo": case_memo,
            "datetime": case_generated_datetime
        },
        {...}
    ]
}

POST

Create new case

Request

{
    "title": case_title,
    "memo": case_memo,
    "datetime": case_generated_datetime
}

Response

{
    "title": case_title,
    "hash": case_hash,
    "memo": case_memo,
    "datetime": case_generated_datetime
}

/cases/case_hash/videos

GET

Get videos & processed data from case

Response

{
    "videos": [
        {
            "path": video_path,
            "memo": memo,
            "lat": lat,
            "lng": lng,
            "datetime": shot_datetime,
            "video_hash": video_hash,
            "is_detection_done": true|false,
            "imgs": [
                {
                    "timedelta": calculated_datetime,
                    "persons": [
                        {
                            "hash": person_hash,
                            "bbox_path": bbox_path,
                            "orig_path": orig_path
                        },
                        {...}
                    ]
                }, {...}
            ]
        }, {...}
    ]
}

POST

Upload new videos

Request

{
    "videos": [
        {
            "path": video_path,
            "memo": video_memo
        },
        {...}
    ]
}

Response

{
    "code": ok|error,
    "path": video_path,     // optional
    "detail": "File does not exist"|"Filetype error occured"    // optional
}

/cases/case_hash/videos/video_hash

GET

Get video info

Response

{
    "path": video_path,
    "memo": memo,
    "lat": lat,
    "lng": lng,
    "datetime": shot_datetime,
    "video_hash": video_hash,
    "is_detection_done": true|false,
    "imgs": [
        {
            "timedelta": calculated_datetime,
            "persons": [
                {
                    "hash": person_hash,
                    "bbox_path": bbox_path,
                    "orig_path": orig_path
                },
                {...}
            ]
        }, {...}
    ]
}

PUT

Put additional info

Request

{
    "memo": memo,
    "lat": lat,
    "lng": lng,
    "datetime": shot_datetime
}

** Response **

{
    "code": "ok"
}

/cases/case_hash/probes

GET

Get found persons

Response

{
    "persons": [
        {
            "person_hash": person_hash,
            "video_hash": video_hash,
            "bbox_path": bbox_path,
            "orig_path": orig_path
        },
        {...}
    ]
}

POST

Put new found persons

Request

{
    "negatives": [
        person_hash,
        ...
    ],
    "positives": [
        person_hash,
        ...
    ]
}

Response

{
    "code": ok|error
}

/cases/case_hash/galleries

GET

Get candidate persons based on found persons

Response

{
    "persons": [
        {
            "person_hash": person_hash,
            "video_hash": video_hash,
            "bbox_path": bbox_path,
            "orig_path": orig_path,
            "distance": distance
        },
        {...}
    ]
}

/cases/case_hash/processing/

GET

Get detection processing status

Response

{
    "total": [video_hash1, video_hash2, ...]
}