Rule Rest API

Overview

Resource

Operation

Description

AllRule

POST /rules/

create new rule

GET /rules/

get all rules for account

MoveRule

POST /rules/(rule_id)/mode

move rule

ReduceRule

POST /rules/(rule_id)/reduce

reduce rule

ReplicaLocks

GET /rules/(rule_id)/locks

get locks by rule id

Rule

PUT /rules/(rule_id)

update rule

DELETE /rules/(rule_id)

delete rule

GET /rules/(rule_id)

get rule info

RuleAnalysis

GET /rules/(rule_id)/analysis

analyse rule,

RuleHistory

GET /rules/(rule_id)/history

get rule history by id

RuleHistoryFull

GET /rules/(scope)/(name)/history

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
Returns

List of ids for created rules

GET /rules/

Return all rules of a given account.

Response Headers
Status Codes
Query Parameters
  • scope – The scope name.

GET /rules/(rule_id)/analysis

get analysis for given rule.

Response Headers
Status Codes
Returns

JSON dict containing informations about the requested user.

GET /rules/(rule_id)/history

get history for a given rule_id.

Response Headers
Status Codes
Returns

JSON dict containing informations about the requested user.

POST /rules/(rule_id)/reduce

Reduce a replication rule.

Status Codes
Returns

List of rule ids

GET /rules/(rule_id)/locks

get locks for a given rule_id.

Status Codes
Returns

JSON dict containing informations about the requested user.

POST /rules/(rule_id)/mode

Move a replication rule.

Status Codes
Returns

List of rule ids.

GET /rules/(scope)/(name)/history

get history for a given DID.

Response Headers
Status Codes
Returns

JSON dict containing informations about the requested user.

PUT /rules/(rule_id)

Update the replication rules locked flag .

Status Codes
DELETE /rules/(rule_id)

Delete a new replication rule.

Status Codes
GET /rules/(rule_id)

get rule information for given rule id.

Returns

JSON dict containing informations about the requested user.

Status Codes