Rule Rest API¶
Overview
Resource |
Operation |
Description |
---|---|---|
AllRule |
create new rule |
|
get all rules for account |
||
MoveRule |
move rule |
|
ReduceRule |
reduce rule |
|
ReplicaLocks |
get locks by rule id |
|
Rule |
update rule |
|
delete rule |
||
get rule info |
||
RuleAnalysis |
analyse rule, |
|
RuleHistory |
get rule history by id |
|
RuleHistoryFull |
get rule history for DID |
Details
-
POST
/rules/
¶ Create a new replication rule.
- Request JSON Object
dids (list) – List of data identifiers.
account (string) – Account issuing the rule.
copies (int) – The number of replicas.
rse_expression (string) – RSE expression which gets resolved into a list of RSEs.
grouping (string) – ALL - All files will be replicated to the same RSE. DATASET - All files in the same dataset will be replicated to the same RSE. NONE - Files will be completely spread over all allowed RSEs without any grouping considerations at all
weight (int) – Weighting scheme to be used.
lifetime (int) – The lifetime of the replication rule in seconds.
locked (string) – If the is locked.
subscription_id (string) – The subscription_id, if the rule is created by a subscription.
source_replica_expression (string) – Only use replicas as source from these RSEs.
activity (string) – Activity to be passed to the conveyor.
notify (string) – Notification setting of the rule (‘Y’, ‘N’, ‘C’; None = ‘N’).
purge_replicas (bool) – Purge setting if a replica should be directly deleted after the rule is deleted.
ignore_availability (bool) – Option to ignore the availability of RSEs.
comments (string) – Comment about the rule.
ask_approval (bool) – Ask for approval for this rule.
asynchronous (bool) – Create replication rule asynchronously by the judge-injector.
priority (int) – Priority of the rule and the transfers which should be submitted.
split_container (bool) – Should a container rule be split into individual dataset rules.
meta (string) – Dictionary with metadata from the WFMS.
- Status Codes
201 Created – rule created
401 Unauthorized – Invalid Auth Token
404 Not Found – DID not found
409 Conflict – Invalid Replication Rule
409 Conflict – Duplicate Replication Rule
409 Conflict – Insufficient Target RSEs
409 Conflict – Insufficient Account Limit
409 Conflict – Invalid RSE Expression
409 Conflict – Replication Rule Creation Temporary Failed
409 Conflict – Invalid Rule Weight
409 Conflict – Staging Area Rule Requires Lifetime
409 Conflict – Scratch Disk Lifetime Conflict
409 Conflict – Manual Rule Approval Blocked
409 Conflict – Invalid Object
- Returns
List of ids for created rules
-
GET
/rules/
¶ Return all rules of a given account.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – Rule found
401 Unauthorized – Invalid Auth Token
404 Not Found – no rule found for id
406 Not Acceptable – Not Acceptable
- Query Parameters
scope – The scope name.
-
GET
/rules/
(rule_id)/analysis
¶ get analysis for given rule.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – Rule found
406 Not Acceptable – Not Acceptable
500 Internal Server Error – Database Exception
- Returns
JSON dict containing informations about the requested user.
-
GET
/rules/
(rule_id)/history
¶ get history for a given rule_id.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – Rule found
406 Not Acceptable – Not Acceptable
500 Internal Server Error – Database Exception
- Returns
JSON dict containing informations about the requested user.
-
POST
/rules/
(rule_id)/reduce
¶ Reduce a replication rule.
- Status Codes
200 OK – Rule found.
401 Unauthorized – Invalid Auth Token.
404 Not Found – no rule found for id.
409 Conflict – Rule replace failed.
- Returns
List of rule ids
-
GET
/rules/
(rule_id)/locks
¶ get locks for a given rule_id.
- Status Codes
200 OK – Rule found
406 Not Acceptable – Not Acceptable
500 Internal Server Error – Database Exception
- Returns
JSON dict containing informations about the requested user.
-
POST
/rules/
(rule_id)/mode
¶ Move a replication rule.
- Status Codes
200 OK – Rule found
401 Unauthorized – Invalid Auth Token
404 Not Found – no rule found for id
409 Conflict – Rule replace failed.
- Returns
List of rule ids.
-
GET
/rules/
(scope)/
(name)/history
¶ get history for a given DID.
- Response Headers
Content-Type – application/x-json-stream
- Status Codes
200 OK – Rule found
406 Not Acceptable – Not Acceptable
500 Internal Server Error – Database Exception
- Returns
JSON dict containing informations about the requested user.
-
PUT
/rules/
(rule_id)¶ Update the replication rules locked flag .
- Status Codes
200 OK – Rule found
401 Unauthorized – Invalid Auth Token
404 Not Found – no rule found for id
-
DELETE
/rules/
(rule_id)¶ Delete a new replication rule.
- Status Codes
200 OK – DIDs found
401 Unauthorized – Invalid Auth Token
404 Not Found – no rule found for id
-
GET
/rules/
(rule_id)¶ get rule information for given rule id.
- Returns
JSON dict containing informations about the requested user.
- Status Codes
200 OK – Rule found
406 Not Acceptable – Not Acceptable
410 Gone – Invalid Auth Token
404 Not Found – no rule found for id