Added REST API endpoint to begin an offline transfer export
What does this MR do and why?
Added POST /offline_exports to initiate an offline transfer export. At the moment, this endpoint only creates an Import::Offline::Export object, but the process to actually export relations has not yet been implemented.
References
How to set up and validate locally
- Enable
offline_transfer_exportsfor your current user - Setup an object storage bucket in AWS S3 or a MinIO instance. Using the
instance configured with GDKwill work fine as long as the instance's region is set. AWS S3 buckets can be configured using Sandbox Cloud. - Call
POST /offline_exports:
curl --request POST \
--url "https://gdk.test:3443/api/v4/offline_exports" \
--header "PRIVATE-TOKEN: glpat-YOUR-TOKEN" \
--header "Content-Type: application/json" \
--data '{
"bucket": "your-bucket-name",
"source_hostname": "https://gdk.test:3443",
"aws_s3_configuration": {
"aws_access_key_id": "ACCESSKEYID",
"aws_secret_access_key": "secret/access/key",
"region": "us-east-2"
},
"entities": [
{
"full_path": "gitlab-org",
"full_path": "flightjs/Flight"
}
]
}'
- Verify that a new
Import::Offline::Exportand itsImport::Offline::Configurationhave been created and that the API response includes the createdImport::Offline::Exportobject
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #576099
Edited by Sam Word