Skip to content
emli edited this page Nov 2, 2017 · 34 revisions

/kurjun/rest/{template,apt,raw}/download

Methods:

  • GET

download endpoint allows a user to download an artifact from Gorjun.

There are 3 types of repositories:

  • template
  • apt
  • raw

Following fields can be used for filtering artifacts:

curl -k -s -Ffile=@/tmp/file.tgz -Ftoken=$TOKEN "$URL/raw/upload"

/kurjun/rest/{template,apt,raw}/upload

Methods:

  • POST

upload endpoint allows a user to upload an artifact to Gorjun.

There are 3 types of repositories:

  • template
  • apt
  • raw

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"

/kurjun/rest/{template,apt,raw}/info

Methods:

  • GET

info endpoint provides JSON formatted output about artifacts stored in Kurjun.

There are 3 types of repositories:

  • template
  • apt
  • raw

Filters for artifacts:

Auth:

  • token

Formatting:

  • page

/kurjun/rest/template/tag

Methods:

  • POST
  • DELETE

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"

/kurjun/rest/share

Methods:

  • POST
  • GET

share endpoint allows users share repositories with each other.

There are 3 types of repositories:

  • template
  • apt
  • raw

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
  • remove - repo - repository type
`Example:`
 {
  "token":"5e9f67d0ca627b581f9c9c26d301d11dae54ea2f44b9cde34c3fae50b3560fcd",
  "id":"23373ff9-10c9-4134-99a0-18c055dba39f", 
  "add": [ "alica" ],
   "remove": [],
   "repo":"raw"
 }