Versions Compared

Key

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

...

B.    For XSLT topology:

    • Submit a list of files:

       The required fields are:

       FILE_URLS as a data entry. And the following parameters:
      • XSLT_URL: a URL for XSLT file which will be used to transform  XML documents.
      • TASK_SUBMITTER_NAME: The owner of the transformed files. 

        Code Block
        curl -X POST --user topology_user_test:topology_user_test -H "Content-Type: application/json" -d '{"inputData":{"entry":[{"key":"FILE_URLS","value":"http://cloud.europeana.eu/api/records/CLOUD_ID/representations/REPRSENTATION_NAME/versions/VERSION/files/FILENAME1 http://cloud.europeana.eu/api/records/CLOUD_ID/representations/REPRSENTATION_NAME/versions/VERSION/files/FILENAME2 http://cloud.europeana.eu/api/records/CLOUD_ID/representations/REPRSENTATION_NAME/versions/VERSION/files/FILENAME3"}]},"parameters":{"entry":[{"key":"TASK_SUBMITTER_NAME","value":"topology_user_test"},{"key":"XSLT_URL","value":"http://cloud.europeana.eu/api/records/CLOUD_ID/representations/REPRSENTATION_NAME/versions/VERSION/files/XSLT_FILE_NAME"}]}}' -i http://cloud.europeana.eu/services/xslt_transform/tasks

         

         

         

       

    • Submit a list of datasets:

       DATASET_URLS as a data entry. And the following parameters: 

      • XSLT_URL: a URL for XSLT file which will be used to transform  XML documents.
      • TASK_SUBMITTER_NAME: The owner of the transformed files.  

         

Code Block
curl -X POST --user topology_user_test:topology_user_test -H "Content-Type: application/json" -d '{"inputData":{"entry":[{"key":"DATASET_URLS","value":"http://cloud.europeana.eu/api/data-providers/DATA_PROVIDER1/data-sets/dDATASET_NAME1 http://cloud.europeana.eu/api/data-providers/DATA_PROVIDER2/data-sets/dDATASET_NAME2 http://cloud.europeana.eu/api/data-providers/DATA_PROVIDER3/data-sets/dDATASET_NAME3"}]},"parameters":{"entry":[{"key":"TASK_SUBMITTER_NAME","value":"topology_user_test"},{"key":"XSLT_URL","value":"http://cloud.europeana.eu/api/records/CLOUD_ID/representations/REPRSENTATION_NAME/versions/VERSION/files/XSLT_FILE_NAME"}]}}' -i http://cloud.europeana.eu/services/xslt_transform/tasks

 

Notes:

  •  If a task was submitted successfully the sender should recieve a response confirming the creation of the task, like this:  

     

    Code Block
    201 Created
    Server: Apache-Coyote/1.1
    Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    Pragma: no-cache
    Expires: 0
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-XSS-Protection: 1; mode=block
    Location: http://cloud.europeana.eu/services/image_convert/tasks/TASK_ID
    Content-Length: 0
    Date: creation Date

         The location filed should have a url to the newely created task and at the end of this url a TASK_ID should exist. This taskID should be used to follow the progress of this task.

     

  •       There is a list of optional parameters which could be used in a DPS task :          
    • REPRESENTATION_NAME: If a task designed to process specific representation inside a dataset.
    • NEW_REPRESENTATION_NAMEThe name of the representation used to store the processed files.        

...