account.py — Rucio 0.3.8 documentation

# account.py

`GET` `/accounts/<account>/attr/`

  list all attributes for an account.

  Example request:

      GET /accounts/<account>/attr/ HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/json'

  Status Codes: | 404 Not Found – ‘AccountNotFound’: e.args[0][0] 500 Internal Server Error – e.__class__.__name__: e.args[0][0]

`POST` `/accounts/<account>/attr/<key>`

  Add attributes to an account.

  Example request:

      POST /accounts/<account>/attr/<key> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 400 Bad Request – ‘ValueError’: ‘cannot decode json parameter dictionary’ 400 Bad Request – ‘KeyError’: ‘%s not defined’ % str(e 400 Bad Request – ‘TypeError’: ‘body must be a json dictionary’ 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 409 Conflict – ‘Duplicate’: e.args[0][0] 404 Not Found – ‘AccountNotFound’: e.args[0][0]

`DELETE` `/accounts/<account>/attr/<key>`

  disable account with given account name.

  Example request:

      DELETE /accounts/<account>/attr/<key> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 404 Not Found – ‘AccountNotFound’: e.args[0][0]

`GET` `/accounts/<account>/scopes/`

  list all scopes for an account.

  Example request:

      GET /accounts/<account>/scopes/ HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/json'

  Status Codes: | 404 Not Found – ‘AccountNotFound’: e.args[0][0] 500 Internal Server Error – e.__class__.__name__: e.args[0][0] 404 Not Found – ‘ScopeNotFound’: ‘no scopes found for account ID ‘%s’’ % account

`POST` `/accounts/<account>/scopes/<scope>`

  create scope with given scope name.

  Example request:

      POST /accounts/<account>/scopes/<scope> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 409 Conflict – ‘Duplicate’: e.args[0][0] 404 Not Found – ‘AccountNotFound’: e.args[0][0] 500 Internal Server Error – e.__class__.__name__: e.args[0][0]

`GET` `/accounts/<account>`

  get account information for given account name.

  Example request:

      GET /accounts/<account> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/json'

  Status Codes: | 404 Not Found – ‘AccountNotFound’: e.args[0][0] 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 500 Internal Server Error – e.__class__.__name__: e.args[0][0]

`POST` `/accounts/<account>`

  create account with given account name.

  Example request:

      POST /accounts/<account> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 400 Bad Request – ‘ValueError’: ‘cannot decode json parameter dictionary’ 400 Bad Request – ‘KeyError’: ‘%s not defined’ % str(e 400 Bad Request – ‘TypeError’: ‘body must be a json dictionary’ 409 Conflict – ‘Duplicate’: e.args[0][0] 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 500 Internal Server Error – e.__class__.__name__: e.args[0][0]

`DELETE` `/accounts/<account>`

  disable account with given account name.

  Example request:

      DELETE /accounts/<account> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 404 Not Found – ‘AccountNotFound’: e.args[0][0]

`GET` `/accounts/?$/?$`

  list all rucio accounts.

  Example request:

      GET /accounts/?$/?$ HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/x-json-stream'

`GET` `/accounts/<account>/limits/<rse=None>`

  get the current limits for an account on a specific RSE

  Example request:

      GET /accounts/<account>/limits/<rse=None> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/json'

  Status Codes: | 404 Not Found – ‘RSENotFound’: e.args[0][0]

`POST` `/accounts/<account>/identities`

  Grant an identity access to an account.

  Example request:

      POST /accounts/<account>/identities HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 400 Bad Request – ‘ValueError’: ‘cannot decode json parameter dictionary’ 400 Bad Request – ‘KeyError’: ‘%s not defined’ % str(e 400 Bad Request – ‘TypeError’: ‘body must be a json dictionary’ 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 409 Conflict – ‘Duplicate’: e.args[0][0] 404 Not Found – ‘AccountNotFound’: e.args[0][0]

`GET` `/accounts/<account>/identities`

  > No doc string

  Example request:

      GET /accounts/<account>/identities HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/x-json-stream'

`DELETE` `/accounts/<account>/identities`

  Delete an account’s identity mapping.

  Example request:

      DELETE /accounts/<account>/identities HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type:

  Status Codes: | 400 Bad Request – ‘ValueError’: ‘cannot decode json parameter dictionary’ 400 Bad Request – ‘KeyError’: ‘%s not defined’ % str(e 400 Bad Request – ‘TypeError’: ‘body must be a json dictionary’ 401 Unauthorized – ‘AccessDenied’: e.args[0][0] 404 Not Found – ‘AccountNotFound’: e.args[0][0] 404 Not Found – ‘IdentityError’: e.args[0][0]

`GET` `/accounts/<account>/rules`

  > Return all rules of a given account.

  Example request:

      GET /accounts/<account>/rules HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/x-json-stream'

  Status Codes: | 404 Not Found – ‘RuleNotFound’: e.args[0][0]

`GET` `/accounts/<account>/usage/`

  > Return the account usage of the account.

  Example request:

      GET /accounts/<account>/usage/ HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/x-json-stream'

  Status Codes: | 404 Not Found – ‘AccountNotFound’: e.args[0][0] 401 Unauthorized – ‘AccessDenied’: e.args[0][0]

`GET` `/accounts/<account>/usage/<rse>`

  > Return the account usage of the account.

  Example request:

      GET /accounts/<account>/usage/<rse> HTTP/1.1

  Example response:

      HTTP/1.1 200 OK
      Vary: Accept
      Content-Type: 'application/x-json-stream'

  Status Codes: | 404 Not Found – ‘AccountNotFound’: e.args[0][0] 404 Not Found – ‘RSENotFound’: e.args[0][0] 401 Unauthorized – ‘AccessDenied’: e.args[0][0]