| Did this page help you? Yes No Tell us about it... |
If your application requires programmatic access to AWS Import/Export and the AWS SDK does not meet your requirements you can program directly using the REST API.
To create a job using the API
Use a text editor to create a manifest file.
Following is an example manifest file.
manifestVersion:2.0
accessKeyId:AKIAIOSFODNN7EXAMPLE
deviceId:HD001
fileSystem:NTFS
logBucket:mybucket
operations:
- exportBucket:mybucket
returnAddress:
name:Your Name
company:Your Company
street1:Your Street
street2:Optional 2nd Line for Street
city:Your City
stateOrProvince:Your State
postalCode:Your Postal/Zip Code
phoneNumber:Your Phone Number
country:Your CountryFor more information, see Manifest File Options.
URL encode the manifest file.
Sign request.
For more information, go to Making HTTP Requests in the AWS Import/Export API Reference.
Send a CreateJob request.
Following is a sample
create job request. The request includes the URL encoded manifest file in
the body of the request as the Manifest option value.
The request also shows the other required string parameters.
POST / HTTP/1.1 content-type:application/x-www-form-urlencoded;charset=utf-8 host: https://importexport.amazonaws.com content-length:760 Action=CreateJob&Manifest=manifestVersion%3A2.0%0AaccessKeyId%AKIAIOSFODNN7EXAMPLE%0AdeviceId%3AHD001%0AfileSystem%3ANTFS%0AlogBucket%3Amybucket%0Aoperations%3A%0A%20%20-%20exportBucket%3Amybucket%0AreturnAddress%3A%0A%20%20%20%20name%3AYour%20Name%0A%20%20%20%20company%3AYour%20Company%0A%20%20%20%20street1%3AYour%20Street%0A%20%20%20%20street2%3AOptional%202nd%20Line%20for%20Street%0A%20%20%20%20city%3AYour%20City%0A%20%20%20%20stateOrProvince%3AYour%20State%0A%20%20%20%20postalCode%3AYour%20Postal%2FZip%20Code%0A%20%20%20%20phoneNumber%3AYour%20Phone%20Number%0A%20%20%20%20country%3AYour%20CountryJobType=Export&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLESignatureVersion=2&SignatureMethod=HmacSHA256&Version=2010-06-01&Signature=%2FVfkltRBOoSUi1sWxRzN8rw%3D
AWS Import/Export returns a job ID, the contents of your signature file, and the address to ship your storage device to.
Save the signature value in a file named SIGNATURE in
the root directory of your storage device.
Save the JobId value so that you can use it in
other requests regarding this job, and the
AwsShippingAddress value so you know where to
ship your device.
For more information about creating a job using the REST API, go to CreateJob in the AWS
Import/Export API Reference. You can validate the manifest and
parameter values without creating a job by setting the ValidateOnly parameter to
true.