-
Notifications
You must be signed in to change notification settings - Fork 13
Methods:
- GET
download endpoint allows a user to download an artifact from Gorjun.
There are 3 types of repositories:
templateaptraw
Following fields can be used for filtering artifacts:
-
id- https://cdn.subut.ai:8338/kurjun/rest/template/download?id=a697e70f3fc538b4f4763588a7868388 -
name- https://cdn.subut.ai:8338/kurjun/rest/template/download?name=master -
token- user authentication token for accessing private data.
curl -k -s -Ffile=@/tmp/file.tgz -Ftoken=$TOKEN "$URL/raw/upload"
Methods:
- POST
upload endpoint allows a user to upload an artifact to Gorjun.
There are 3 types of repositories:
templateaptraw
Following fields are required:
-
file- is a data that should be uploaded; -
token- user authentication token.
curl -k -s -Ffile=@/tmp/file.tgz -Ftoken=$TOKEN "$URL/raw/upload"
Methods:
- GET
info endpoint provides JSON formatted output about artifacts stored in Kurjun.
There are 3 types of repositories:
templateaptraw
Filters for artifacts:
-
id- https://cdn.subut.ai:8338/kurjun/rest/template/info?id=a697e70f3fc538b4f4763588a7868388 -
name- https://cdn.subut.ai:8338/kurjun/rest/template/info?name=master -
owner- https://cdn.subut.ai:8338/kurjun/rest/template/info?owner=subutai -
version- https://cdn.subut.ai:8338/kurjun/rest/template/info?name=management&version=4.0.6 -
verified- https://cdn.subut.ai:8338/kurjun/rest/template/info?name=elasticsearch&verified=true
Auth:
token
Formatting:
page
Methods:
POSTDELETE
tag endpoint adds tags to the Kurjun template information.
Fields:
-
id- artifact identifier; -
token- authentication token; -
tags- list of tags.
Example:
curl -Ftags=aaa,bbb,ccc,qqq -Ftoken=$TOKEN -Fid=4ae98d783858397268f5a5c2edc1f547 "$URL/template/tag"
curl -X DELETE -Ftags=aaa,bbb,ccc,qqq -Ftoken=$TOKEN -Fid=4ae98d783858397268f5a5c2edc1f547 "$URL/template/tag"
Methods:
POSTGET
share endpoint allows users share repositories with each other.
There are 3 types of repositories:
templateaptraw
##POST
Following fields are required:
-
token- user authentication token. -
id- repository id -
add- add to list of users id's who can access the file -
remove- remove form list of users id's who can access the file -
repo- repository type
Example:
{
"token":"5e9f67d0ca627b581f9c9c26d301d11dae54ea2f44b9cde34c3fae50b3560fcd",
"id":"23373ff9-10c9-4134-99a0-18c055dba39f",
"add": [ "alica" ],
"remove": [],
"repo":"raw"
}/tmp/share.json
{
"token":"5e9f67d0ca627b581f9c9c26d301d11dae54ea2f44b9cde34c3fae50b3560fcd",
"id":"23373ff9-10c9-4134-99a0-18c055dba39f",
"add": [ "alica" ],
"remove": [],
"repo":"raw"
}
#!/bin/bash
URL=http://127.0.0.1:8080
curl -k -s -Fjson="`cat /tmp/share.json`" "$URL/kurjun/rest/share"
##GET
Returns all users id's who have access to repository.
Following fields are required:
-
token- user authentication token. -
id- repository id -
repo- repository type
#!/bin/bash
URL=http://127.0.0.1:8080
ID="23373ff9-10c9-4134-99a0-18c055dba39f"
TOKEN=fabfc86778ce1a7a04b72280eff5efc49d6165beea226b1375f8a8b0e5991bb9
REPO=raw
curl -k "$URL/kurjun/rest/share?id=$ID&token=$TOKEN&repo=$REPO" -o /tmp/share