Rule Rest API

Overview

Resource Operation Description
AllRule POST /rule/ create new rule
  GET /rule/ get all rules for account
MoveRule POST /rule/(rule_id)/mode move rule
ReduceRule POST /rule/(rule_id)/reduce reduce rule
ReplicaLocks GET /rule/(rule_id)/locks get locks by rule id
Rule PUT /rule/(rule_id) update rule
  GET /rule/(rule_id) get rule info
  DELETE /rule/(rule_id) delete rule
RuleAnalysis GET /rule/(rule_id)/analysis analyse rule,
RuleHistory GET /rule/(rule_id)/history get rule history by id
RuleHistoryFull GET /rule/(scope)/(name)/history get rule history for DID

Details

POST /rule/

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:
Returns:

List of ids for created rules

GET /rule/

Return all rules of a given account.

Response Headers:
 
Status Codes:
Query Parameters:
 
  • scope – The scope name.
GET /rule/(rule_id)/analysis

get analysis for given rule.

Response Headers:
 
Status Codes:
Returns:

JSON dict containing informations about the requested user.

GET /rule/(rule_id)/history

get history for a given rule_id.

Response Headers:
 
Status Codes:
Returns:

JSON dict containing informations about the requested user.

POST /rule/(rule_id)/reduce

Reduce a replication rule.

Status Codes:
Returns:

List of rule ids

GET /rule/(rule_id)/locks

get locks for a given rule_id.

Status Codes:
Returns:

JSON dict containing informations about the requested user.

POST /rule/(rule_id)/mode

Move a replication rule.

Status Codes:
Returns:

List of rule ids.

GET /rule/(scope)/(name)/history

get history for a given DID.

Response Headers:
 
Status Codes:
Returns:

JSON dict containing informations about the requested user.

PUT /rule/(rule_id)

Update the replication rules locked flag .

Status Codes:
GET /rule/(rule_id)

get rule information for given rule id.

Returns:

JSON dict containing informations about the requested user.

Status Codes:
DELETE /rule/(rule_id)

Delete a new replication rule.

Status Codes: