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

  1. Enable offline_transfer_exports for your current user
  2. Setup an object storage bucket in AWS S3 or a MinIO instance. Using the instance configured with GDK will work fine as long as the instance's region is set. AWS S3 buckets can be configured using Sandbox Cloud.
  3. 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"
    }
  ]
}'
  1. Verify that a new Import::Offline::Export and its Import::Offline::Configuration have been created and that the API response includes the created Import::Offline::Export object

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

Merge request reports

Loading