Skip to content

Leabago/archiveFiles29072025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archive Service API 📦

App for creating and managing file archives from URLs.

Run

go run ./cmd/app/

Swagger

http://localhost:8080/doc/

Config

config/config.yaml

🌟 API Examples

1. Send a set of links. Zip created in runtime.

Request:

curl -X 'POST' \
  'http://localhost:8080/api/v1/upload' \
  -H 'accept: application/zip' \
  -H 'Content-Type: application/json' \
  -d '{
  "links": [
    "https://www.sample-videos.com/img/Sample-jpg-image-50kb.jpg",
    "https://s24.q4cdn.com/216390268/files/doc_downloads/test.pdf"
  ]
}'

2. Create a new task

Request:

curl -X 'POST' \
  'http://localhost:8080/api/v1/task' \
  -H 'accept: application/json' \
  -d ''

3. Adds a new link to the task's links array

Request:

curl -X 'PATCH' \
  'http://localhost:8080/api/v1/task/1' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "link": "https://sample-videos.com/img/Sample-jpg-image-50kb.jpg"
}'

4. Download archive by link.

Request:

curl -X 'GET' \
  'http://localhost:8080/api/v1/arch/2' \
  -H 'accept: application/zip'
}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages