Storage API

스토리지(파일/디렉토리) 관련 API Wiki

Basic Storage Control API

Upload File

POST http(s)://[server-host]:[server-port]/server/storage/data/file/:user/:root

파일 업로드 하기

Path Parameters

NameTypeDescription

root

string

target directory that file will be uploaded

user

string

target user static id

Headers

NameTypeDescription

Set-Cookie

string

token

Request Body

NameTypeDescription

file

string

uploaded file

{ code: [integer] }

Get File Info

GET http(s)://[server-host]:[server-port]/server/storage/data/file/:user/:root

파일 정보 갖고오기 (Raw Data 제외)

Path Parameters

NameTypeDescription

user

string

target user

root

string

target file root

Headers

NameTypeDescription

Set-Cookie

string

token

{
    code: 0,
    data: {
        create-date: YYYY/MM/DD HH:MM:SS,
        modify-date: YYYY/MM/DD HH:MM:SS,
        file-name: [file name],
        file-type: [TEXT, IMAGE, AUDIO, ETC...],
        size: {
            size-type: [KB, MB, ETC...],
            size-volume: [float]
        }
    }
}

Modify File Info

PATCH http(s)://[server-host]:[server-port]/server/storage/data/file/:user/:root

파일 정보 수정 수정 내역 1. 파일 이름

Path Parameters

NameTypeDescription

user

string

target user

root

string

target file root

Headers

NameTypeDescription

Set-Cookie

string

token

Request Body

NameTypeDescription

filename

string

new filename

{ code: [integer] {

Delete File

DELETE http(s)://[server-host]:[server-port]/server/storage/data/file/:user/:root

파일 삭제

Path Parameters

NameTypeDescription

user

string

target user

root

string

target directory that file will be uploaded

Headers

NameTypeDescription

Set-Cookie

string

token

{ code: [integer] }

Generate Directory

POST http(s)://[server-host]:[server-port]/server/storage/data/dir/:user/:root

디렉토리 생성

Path Parameters

NameTypeDescription

root

string

new directory root

user

string

target user

Headers

NameTypeDescription

Set-Cookie

string

token

{ code: [integer] }

Modify Directory

PATCH http(s)://[server-host]:[server-port]/server/storage/data/dir/:user/:root

디렉토리 정보 수정

Path Parameters

NameTypeDescription

user

string

target user

root

string

target directory

Headers

NameTypeDescription

Set-Cookie

string

token

Request Body

NameTypeDescription

dir-name

string

new directory name

{ code: [integer] }

Get Directory Info

GET http(s)://[server-host]:[server-port]/server/storage/data/dir/:user/:root

디렉토리 정보 갖고오기(Raw Data 제외)

Path Parameters

NameTypeDescription

user

string

target user

root

string

target directory root

Headers

NameTypeDescription

Set-Cookie

string

token

{
    code: 0,
    data: {
        info: {
            create-date: YYYY/MM/DD HH:MM:SS,
            modify-date: YYYY/MM/DD HH:MM:SS,
            dir-name: [directory name],
            file-size: [size of file]
        },
        list: {
            file: [
                {fileinfo}, {}, ...
            ],
            dir: [
                {dirinfo}, {}, ...
            ]
        }
    }
}

Delete Directory (Recursive)

DELETE http(s)://[server-host]:[server-port]/server/storage/data/dir/:user/:root

디렉토리 삭제하기

Path Parameters

NameTypeDescription

user

string

target user

root

string

target directory root

Headers

NameTypeDescription

Set-Cookie

string

token

{ code: 0 }

Shared Function API

해당 File이 공유되어있는 지 확인하고 공유되어 있으면 shared-id 받기

GET http(s)://[server-host]:[server-port]/server/storage/shared/file/:file-root

Share

Path Parameters

NameTypeDescription

file-root*

String

Target File Root

Cookies

NameTypeDescription

token*

String

Auth token

{
    "code": 0,
    "data": {
        "shared-id": [shared-id]
    }
}

File 공유 등록 하기

POST http(s)://[server-host]:[server-port]/server/storage/shared/file

Cookies

NameTypeDescription

token*

String

Auth token

Request Body

NameTypeDescription

file-root*

String

Target File Root

{
    "code": [x > 0],
    "data": {
        "shared-id": "xxxxxxxxxxxxxxxxx"
    }
}

공유된 파일 다운로드 하기

GET http(s)://[server-host]:[server-port]/server/storage/shared/file/:shared-id

Path Parameters

NameTypeDescription

shared-id*

String

target file shared id

{
    // Response
}

공유 파일 해제

DELETE http(s)://[server-host]:[server-port]/server/storage/shared/file/:shared-id

Path Parameters

NameTypeDescription

shared-id

String

Target Shared id for unshare

Cookies

NameTypeDescription

token*

String

Auth token

{
    "code": int
}

Last updated