Skip to content

Latest commit

 

History

History
82 lines (63 loc) · 2.08 KB

test.rest

File metadata and controls

82 lines (63 loc) · 2.08 KB

### Access root url get http://localhost:{{$dotenv PORT}} Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### signup w/ email and password post http://localhost:{{$dotenv PORT}}/signup Content-Type: application/json

{
"id": "email@example.com", "password": "password"

}

### signup w/ phone number and password post http://localhost:{{$dotenv PORT}}/signup Content-Type: application/json

{
"id": "+77771112233", "password": "password"

}

### signin post http://localhost:{{$dotenv PORT}}/signin Content-Type: application/json

{
"id": "email@example.com", "password": "password"

}

### refresh access token post http://localhost:{{$dotenv PORT}}/signin/new_token Content-Type: application/json

### get user info get http://localhost:{{$dotenv PORT}}/info Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### logout and invalidate both access and refresh tokens (blacklist) get http://localhost:{{$dotenv PORT}}/logout Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### file upload post http://localhost:{{$dotenv PORT}}/file/upload Content-Type: multipart/form-data; boundary=MfnBoundry Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

--MfnBoundry Content-Disposition: form-data; name="uploadedFile"; filename="test.txt" Content-Type: text/plain

< ./test.txt --MfnBoundry--

### file list get http://localhost:{{$dotenv PORT}}/file/list?list_size=5&page=1 Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### delete file delete http://localhost:{{$dotenv PORT}}/file/delete/28 Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### file info get http://localhost:{{$dotenv PORT}}/file/34 Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### file download get http://localhost:{{$dotenv PORT}}/file/download/34 Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

### file update put http://localhost:{{$dotenv PORT}}/file/update/34 Content-Type: multipart/form-data; boundary=MfnBoundry Authorization: Bearer {{$dotenv BEARER_EXAMPLE}}

--MfnBoundry Content-Disposition: form-data; name="uploadedFile"; filename="test-update.txt" Content-Type: text/plain

< ./test-update.txt --MfnBoundry--