Skip to content

Edison API :: Admin

Chalk edited this page May 24, 2017 · 8 revisions
URL Method Description Note
/auth POST 로그인 Form: username password
/places POST 위치 목록 token
/places/:id POST 위치 상세 정보 token

Function usages

POST /auth

Request
Param Description Example
username DIMIGO API 아이디 admin
password DIMIGO API 비밀번호 P@ssw0rd
Response
200
{
  "token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC..."
}
401

POST /places

DB에 존재하는 모든 위치를 보내 줍니다.

Request
Param Description Example
token 토큰 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ...
Response
200
[
    {
        "name": "EB실",
        "location": "본관 2층",
        "people": [
            {
                "serial": 1222,
                "name": "은영진"
            },
            {
                "serial": 1521,
                "name": "구영진"
            },
            {
                "serial" :1101,
                "name": "하태희"
            },
            {
                "serial": 1423,
                "name": "홍윤서"
            }
        ]
    },
    {
        "name": "디컨실",
        "location": "본관 2층",
        "people": [
            {
                "serial": 1222,
                "name": "금경춘"
            }
        ]
    }
]

/places/:id

Request
Param Description Example
token 토큰 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ...
Response
Success
{
    "name": "디컨실",
    "location": "본관 2층",
    "people": [
        {
            "serial": 1222,
            "name": "금경춘"
        }
    ]
}

Clone this wiki locally