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),trixie(Debian 13),stableNote:
-
The
packageNameandpackageVersionfields are mandatory for repositories of type "Universal." Providing these fields for other repository types will have no effect as they will be ignored. -
The
packageVersionfield is also mandatory for repositories of typeComposer. -
The
debianRepositoryComponentanddebianDistributionfields 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.xmlfile along with the.jarfile 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",
"createdPackages": [
{
"packageId": "string",
"versionId": "string",
"link": "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.createdPackages: An array (may contain multiple items for multi-package files) with details of the newly created packages:packageId: The unique identifier of the created package.versionId: The unique identifier of the created package version.link: A direct link to the uploaded package version in RepoFlow.