AWS Import/Export
Developer Guide (API Version 2010-06-03)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

Sending a CreateJob Request Using the REST API

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 REST API

  1. Create a manifest file describing your job.

    For an example manifest, see Create Your First Amazon S3 Import Job or Create Your First Amazon S3 Import Job.

  2. URL encode the manifest file.

  3. Sign the request.

    For more information, go to Making Query Requests.

  4. Send a CreateJob request, specifying JobType=Import or JobType=Export.

    Following is a sample CreateJob request for an import job. 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:579
    
    Action=CreateJob&Manifest=manifestVersion%3A%202.0%0Abucket%3A%20myBucket​%0​eraseDevice%3A%20yes%0AreturnAddress%3A%0A%20%20%20%20name%3A%20Amazon.com%20ATTN%20Joe%20Random%20%0A%20%20%20%20​street1%3A%201200%2012th%20Ave%20S.%0A%20%20%20%20​city%3A%20Seattle%0A%20%20%20%20​stateOrProvince%3A%20WA%0A%20%20%20%20postalCode%3A%2098114%0A%20%20%20%20​phoneNumber%3A%20206-266-0000%0A%20%20%20%20​country%3A%20USA​JobType=Import​SignatureVersion=2&SignatureMethod=HmacSHA256&Version=2010-06-01&Signature=%2FVfkltRBOoSUi1sWxRzN8rw%3D

    For an Amazon S3 import or export job, AWS Import/Export sends a response that includes a job ID, a signature value, and information on how to print your pre-paid shipping label.

    For an AWS EBS or Amazon Glacier import job, AWS Import/Export sends a response that includes a job ID and shipping instructions. It also places a PDF file in the Amazon S3 log bucket you identified in your manifest. The PDF file contains job information, shipping instructions, and a barcode.

For more information about creating a job using the REST API, go to CreateJob. You can validate the manifest and parameter values without creating a job by setting the ValidateOnly parameter to true.