v10

latestSwagger 2.0Apache 2.0raw.githubusercontent.com2023-06-129314.0 KB
access control

Create or update access rule

If the given rule id matches an existing rule then the rule will be updated. If the rule id is omitted a new id will be generated and returned.

post/{collection}/access/rules

Path parameters

collectionstring required

Name of a collection

Request body

idinteger

Unique identifier for this rule. Generated if omitted.

policyIdinteger required

Access policy to apply to captures this rule matches

publicMessagestring

Access denied message to be shown to users

privateCommentstring

Private notes for curators managing this rule

surtsstring[] required

Matches captures with URLs that fit any of the given patterns

Example request

{
  "id": 42,
  "policyId": 2,
  "publicMessage": "Access restricted",
  "privateComment": "See correspondence",
  "surts": [
    "org,example)/"
  ]
}

Response

OK