Versions Compared

Key

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

...

Code Block
titleFixed File Options
{
    "objectId": "47f2a70a-158c-4524-bd85-eee8880a5067",
    "type": "FIXED",
    "optionProperties": [
        {
            "description": "File name", // A human readable description of what this option is about
            "enumValues": [],           // If this option was of type "ENUM" the enumerated values could be found here
            "label": "File name",       // A label for the option, typically what will be shown to the user
            "name": "fileName",			// The property name, this must not change
            "type": "TEXT",				// designed to help those building a UI be able to decide the best input to use. 
										// Possible types are: BOOLEAN, DATE, ENUM, FILE, NUMBER, PASSWORD, TEXT, TEXTAREA
            "value": "",				// The value specified by the user, if there is a default value to begin with this will be filled out
            "repeatable": false,		// specifies if this option can be repeated
            "required": true,			// specifies if this option must be filled out
            "readOnly": false			// specifies if the value can be changed or not
        }
    ]
}

Building a Package Request

A packaging request will provide Rich Data Services with an array of Format Options that can be used to produce the desired files. To create the packaging request the user must:

  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.csv",  // 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 using a POST.. To be continued