-
Notifications
You must be signed in to change notification settings - Fork 9
Create Package via REST interface locally
RafaelSche edited this page May 17, 2019
·
9 revisions
- Create a zip package of you project.
- Setup a local packager in service mode (See Local Packager Testing )
- Upload project:
sh curl -X POST -F project="@misc/5gtango_ns_a10_nginx_zipped_project_example.zip" -F callback_url="<URL>" http://127.0.0.1:5099/api/v1/projects
Return will be the following:sh {"package_process_uuid": <uuid>, "status": <process_status>, "error_msg": <error_msg>}
If callback_url is given you will get the following answer after the process is finished:sh {"package_id": <id>, "package_location": <storage_location>, "package_metadata": <metadata>, "package_process_status": <status>, "package_process_uuid": <uuid>, "package_download_link": <URL for package download>}
Then you can download the created package. - The callback_url is optional. Without it you can get the download link by:
sh curl -X GET http://127.0.0.1:5099/api/v1/projects
This will return a list of all available packages:
[{"package_name": <filename 1>, "package_download_link": <download link 1>}, ...
{"package_name": <filename n>, "package_download_link": <download link n>}]
- It also possible to download the package directly by appending the filename of the created package on to the projects endpoint:
sh curl -X GET http://127.0.0.1:5099/api/v1/projects/<filename> --output <dest>