Details
-
Improvement
-
Status: Closed
-
Low
-
Resolution: Fixed
-
fts-rest 3.10.0
-
Security Level: Public Data (This ticket is visible to anyone on the internet and will be indexed by search engines)
-
None
Description
Starting with version 3.10, FTS-REST expects the params::job_metadata API field to be a JSON object.
However, the documentation on this is mixed, allowing both string and JSON format. [1]
Since version 3.10 appends the auth_method to the job metadata, internally, it should be treated as JSON. In case a string is received, it should be converted into a JSON object, attributing the received string to the label key.
The following submission currently fails.
Example:
{ "files": [ { "sources": [ "root://eospublic.cern.ch//eos/opstest/dteam/test_512MB" ], "destinations": [ "root://eospublic.cern.ch/eos/opstest/dteam/mipatras/file.test" ] } ], "params": { "job_metadata": "Test Job Submission" } }
However, sending a JSON object for params::job_metadata will work.
Example:
{ "files": [ { "sources": [ "root://eospublic.cern.ch//eos/opstest/dteam/test_512MB" ], "destinations": [ "root://eospublic.cern.ch/eos/opstest/dteam/mipatras/file.test" ] } ], "params": { "job_metadata": { "label": "Test Job Submission" } } }
[1] http://fts3-docs.web.cern.ch/fts3-docs/fts-rest/docs/bulk.html