Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section

Upload file

Uploads a file to the Aspire resources repository, this endpoint needs the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/resources/file?description=:description

Body Form

NameTypeRequiredDescription
fileFilefileRequired

The file to be uploaded

Query Parameters

NameTypeRequiredDescription
descriptionStringstringRequired

The file description

Request example

Code Block
languagejs
themeRDark
POST /aspire/_api/resources/file?description=groovy --form 'file=@"/C:/Directory/file.groovy"'

Status: 200

Response example

Code Block
languagejs
themeRDark
{
	"id" : "517f161623ea3f43cc567a33914b96c31cbaa2c63d2594174d2b6230b1912ae1"
	"name" : "file.groovy",
	"description" : "groovy",
	"checksum" : "12565092083235"
}
Section

Download file

Uploads a file to the Aspire resources repository, this endpoint needs the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/resources/file/:id

Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the file to download

Request example

Code Block
languagejs
themeRDark
GET /aspire/_api/resources/file/517f161623ea3f43cc567a33914b96c31cbaa2c63d2594174d2b6230b1912ae1

Status: 200

Response example

Code Block
languagejs
themeRDark
[the file]