Repertoire 202x API - Managing Files In Server Repository

Overview
These API methods and curl commands provide efficient solutions for uploading and removing files in the server repository using Repertoire 2024.


1. Uploading a File to the Server Repository

curl -v -k -X POST http://localhost:1730/repository/action/upload \
-H "Authentication: elx.token YOUR_ELX_TOKEN" \
-H "Accept: application/json" \
-F "file=@/Elixir/Repertoire-2024.0.7/repository/User/admin/TestHello.txt" \
-F "json={\"path\":\"/User/admin/def\", \"overwrite\":true}"

Details:

  • Endpoint: /repository/action/upload
  • Method: POST
  • Authentication Header: Use elx.token with your specific token.
  • Parameters:
    • file: Path to the file being uploaded.
    • json: Includes destination path (path) and an overwrite flag.

2. Removing a File from the Server Repository

curl -v -k -H "Authentication: elx.token YOUR_ELX_TOKEN" \
-H "Content-Type: application/json" \
--data "{\"path\":\"/User/admin/abc/Test246.txt\"}" \
http://localhost:1730/repository/action/delete-file

Details:

  • Endpoint: /repository/action/delete-file
  • Method: POST
  • Authentication Header: Use elx.token with your specific token.
  • Parameters:
    • path: Path to the file being deleted.

Please remember to revise any values such as file paths, tokens, and server URLs to match your specific environment before executing these commands.