Skip to content

Commit

Permalink
Add documentation to dirac endpoint : Closes #3971
Browse files Browse the repository at this point in the history
  • Loading branch information
cserf authored and bari12 committed Oct 26, 2020
1 parent c8d4119 commit c36dca7
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions lib/rucio/web/rest/flaskapi/v1/dirac.py
Expand Up @@ -38,17 +38,25 @@ class AddFiles(MethodView):

def post(self):
"""
Create file replicas at a given RSE.
Atomic method used by the RucioFileCatalog plugin in Dirac that :
- Creates files and their replicas
- Creates the dataset containing the files and attach the files to the dataset
- Creates a rule on the dataset with RSE expression ANY and grouping NONE
- Creates all the container hierarchy containing the dataset
HTTP Success:
201 Created
..:quickref: AddFiles; Method used by the RucioFileCatalog plugin in Dirac.
HTTP Error:
401 Unauthorized
405 Method Not Allowed
409 Conflict
500 Internal Error
503 Service Unavailable
:<json list lfns: List of lfn (dictionary {'lfn': <lfn>, 'rse': <rse>, 'bytes': <bytes>, 'adler32': <adler32>, 'guid': <guid>, 'pfn': <pfn>}.
:<json bool ignore_availability: A boolean to choose if unavailable sites need to be ignored.
:status 201: Created.
:status 400: Cannot decode json parameter list.
:status 401: Invalid auth token.
:status 404: DID not found.
:status 405: Unsupported Operation.
:status 409: Duplicate.
:status 500: Internal Error.
:status 503: Temporary error.
"""
try:
parameters = parse_response(request.data)
Expand Down

0 comments on commit c36dca7

Please sign in to comment.