Guide to upload a new data.zip for a full load with manual assignment of the data-id.
URL
https://my.<region>.fredhopperservices.com/{sin}/data/input/{id}/data.zip
Formats
application/zip
HTTP Method(s)
PUT
Requires Authentication
Yes
Parameters
| Parameter | Required | Description |
|---|---|---|
| {sin} | Yes | Name of the service instance, for example fas:live1 or fas:test1. |
| {id} | Yes | Data id |
Response
HTTP "201 Created" response, with the required trigger contents as 'text/plain' body.
Usage example
The following uses curl to upload the input file 'data.zip' into the service instance 'fas:live1' in the 'us1' region with a data-id of '2012-05-21_12-00-00'.
The command shows the headers returned by the server (-D - parameters) for illustration purposes as well.
Request:
$ curl -s -X PUT -D - --data-binary @data.zip -H "Content-Type: application/zip" -u user:password https://my.us1.fredhopperservices.com/fas:live1/data/input/2012-05-21_12-00-00/data.zip HTTP/1.1 201 Created Location: https://my.us1.fredhopperservices.com/fas:live1/data/input/2012-05-21_12-00-00/ Content-Type: text/plain data-id=2012-05-21_12-00-00
Checksum upload
Before the new data id can be used for triggering a checksum has to be uploaded using the same approach. This checksum file must be named "data.zip.md5", utf-8 encoded, and have the following content:
<md5sum><space><space>data.zip
An example could be:
6456235eec7095cc0dcd32ee2308cc4b data.zip
| The checksum file can be generated using the md5sum(1) tool from the GNU CoreUtils package, which should be installed on most Linux systems. A Windows version of the package is available at http://gnuwin32.sourceforge.net/packages/coreutils.htm . |
Next is to upload this file, see the following code snippet for an example:
$ curl -s -X PUT -D - --data-binary @data.zip.md5 -H "Content-Type: text/plain" -u user:password https://my.us1.fredhopperservices.com/fas:live1/data/input/2012-05-21_12-00-00/data.zip.md5 HTTP/1.1 201 Created Location: https://my.us1.fredhopperservices.com/fas:live1/data/input/2012-05-21_12-00-00/ Content-Type: text/plain data-id=2012-05-21_12-00-00
Comments
0 comments
Please sign in to leave a comment.