Upload Single Package
Upload Single Package
To upload a single package, the REST request should include the following information:
- Endpoint:
https://api.repoflow.io/upload/<workspace-name>/<repo-name>/single
- Method: POST
- Form Data:
packageFiles
: The file to be uploaded. This should be included as form-data in the request.packageName
(required for Universal repositories): The name of the package being uploaded.packageVersion
(required for Universal or Composer repositories): The version of the package being uploaded.debianRepositoryComponent
(required for Debian repositories): The component of the Debian repository. Allowed values aremain
,restricted
,universe
, andmultiverse
.debianDistribution
(required for Debian repositories): The distribution of the Debian package. Allowed values are:trusty
(Ubuntu 14.04 LTS),xenial
(Ubuntu 16.04 LTS),bionic
(Ubuntu 18.04 LTS),focal
(Ubuntu 20.04 LTS),jammy
(Ubuntu 22.04 LTS),noble
(Ubuntu 24.04 LTS),buster
(Debian 10),bullseye
(Debian 11),bookworm
(Debian 12)Note:
-
The
packageName
andpackageVersion
fields are mandatory for repositories of type "Universal." Providing these fields for other repository types will have no effect as they will be ignored. -
The
packageVersion
field is also mandatory for repositories of type "Composer." -
The
debianRepositoryComponent
anddebianDistribution
fields are mandatory for repositories of type "Debian." Providing these fields for other repository types will have no effect as they will be ignored.
-
Important: You can upload multiple files as long as they are part of the same package and the same version. For example, for Maven, you can upload a
pom.xml
file along with the.jar
file of the package.
Upload Response
The RepoFlow Server will always return a response with status 200, containing an array of result objects with the following structure:
[
{
"packageFileName": "string",
"isSucceeded": true,
"errorMessage": "string"
}
]
packageFileName
: The name of the uploaded package file.isSucceeded
: A boolean indicating whether the upload was successful.errorMessage
: A string containing an error message if the upload failed.