Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Curl Examples for API Requests to the Readme #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ Repo UID is created when a new repo is created.

# list names of repos along with IDs
GET /api/repos/

Example: curl -X GET http://<your-openrepo-instance>:7376/api/repos/ -H 'Authorization: Token <your-user-token>'

# Show details for a particular repo
GET /api/<repo>/

# Create a new repo
POST /api/repos/
Example: curl -X POST http://<your-openrepo-instance>:7376/api/repos/ -H 'Authorization: Token <your-user-token>' -F "repo_uid=<repo-name>" -F "repo_type=<deb|rpm|files>" -F "signing_key=<FINGERPRINT_OF_SIGNINGKEY"
You need to create a SigningKey otherwise you can not create

# Delete a repo
DELETE /api/<repo>/
Expand All @@ -88,10 +91,12 @@ Package UID is created when a new package is uploaded or copied

# Upload a package to a repo
POST /api/<repo>/upload/

Example: curl -X POST http://<your-openrepo-instance>:7376/api/<target-repository>/upload/ -H 'Authorization: Token <your-user-token>' -F "package_file=@/path/to/your.deb"

# Delete a package
DELETE /api/<repo>/pkg/<package>/

Example: curl -X DELETE http://<your-openrepo-instance>:7376/api/<target-repository>/pkg/<package_uid> -H 'Authorization: Token <your-user-token>'

# Show details for a particular package
GET /api/<repo>/pkg/<package>/

Expand Down Expand Up @@ -166,4 +171,4 @@ Next, open four separate tabs and run the following commands:
Tab 4: nginx -c /storage/projects/openrepo/deploy/nginx/nginx.conf.dev


Next, navigate to http://localhost:5173/ to see your code updates. Both the Vue.js dev server and the Django dev server support live updates on code changes.
Next, navigate to http://localhost:5173/ to see your code updates. Both the Vue.js dev server and the Django dev server support live updates on code changes.