Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Get the package request object.

    Code Block
    http://host/rds/api/package
    Code Block
    {
        "orderId": "cce1dcb8-77d3-4676-ac2d-452d89c20424",  // The packages unique order ID which can be used to check the status once the packaging request is submitted
        "options": []                                       // The array of format options, currently empty. 
    }
  2. Get and fill out any format options, see the example in the section above.  
  3. Add the filled out format options to the package request.

    Code Block
    {
        "orderId": "cce1dcb8-77d3-4676-ac2d-452d89c20424",
        "options": [
            {
                "objectId": "26ac8903-c319-4e3d-874a-08f91673e1bb",
                "type": "FIXED",
                "optionProperties": [
                    {
                        "description": "File name",
                        "enumValues": [],
                        "label": "File name",
                        "name": "fileName",
                        "type": "TEXT",
                        "value": "myfile.txt",  // the value has been populated by the user
                        "repeatable": false,
                        "required": true,
                        "readOnly": false
                    }
                ]
            },
            ...  // add any additional format options that you want.
        ]
    }
  4. Once the package request has been filled out with the desired options it can be passed back to the server through a POST at:

    Code Block
    http://host/rds/api/catalog/{collectionId}/{viewId}/package

...

  1.  

    This will send the order off to the server and start the packaging process. The packaging process will be queued and run in the background, so it may not be immediately available. After posting the packaging request, the following information should be returned:

    Code Block
    {
        "orderId": "cbe2dab8-77d3-5636-ac2d-952d95c20424",
        "message": "SUCCESSFULY QUEUED"
    }
  2. The orderId that is returned can be used to check the status of the packaging process by getting:

    Code Block
    http://host/rds/api/order/{orderId}/status


    This will return information about the status of the packaging process, along with an number indicating the percent completed. 

    Code Block
    {
        "id": "77fbdc4d-3935-4339-a5da-81605cf8208f", // back end packaging ID not to be confused with the orderId
        "status": "COMPLETED",
        "completed": 100,
        "completionDetails": {
            "details": "Package with orderId cbe2dab8-77d3-5636-ac2d-952d95c20424 is ready for download."
        }
    }
  3. When the process indicates that the package is completed and ready for download the orderId can can be used to download a compressed file containing the requested files:

    Code Block
    http://host/rds/api/order/{orderId}/download