7 An admin API request will be done on a URI that starts with the configurable 'admin'
8 resource entry point. Authorization for the admin API duplicates the S3 authorization
9 mechanism. Some operations require that the user holds special administrative capabilities.
10 The response entity type (XML or JSON) may be specified as the 'format' option in the
11 request and defaults to JSON if not specified.
16 Get RGW cluster/endpoint information.
26 GET /{admin}/info?format=json HTTP/1.1
39 If successful, the response contains an ``info`` section.
43 :Description: A container for all returned information.
48 :Description: The (typically unique) identifier for the controlling
49 backing store for the RGW cluster. In the typical case,
50 this is value returned from librados::rados::cluster_fsid().
55 Special Error Responses
56 ~~~~~~~~~~~~~~~~~~~~~~~
64 Request bandwidth usage information.
66 Note: this feature is disabled by default, can be enabled by setting ``rgw
67 enable usage log = true`` in the appropriate section of ceph.conf. For changes
68 in ceph.conf to take effect, radosgw process restart is needed.
77 GET /{admin}/usage?format=json HTTP/1.1
87 :Description: The user for which the information is requested. If not specified will apply to all users.
89 :Example: ``foo_user``
94 :Description: Date and (optional) time that specifies the start time of the requested data.
96 :Example: ``2012-09-25 16:00:00``
101 :Description: Date and (optional) time that specifies the end time of the requested data (non-inclusive).
103 :Example: ``2012-09-25 16:00:00``
109 :Description: Specifies whether data entries should be returned.
111 :Example: True [True]
117 :Description: Specifies whether data summary should be returned.
119 :Example: True [True]
127 If successful, the response contains the requested information.
131 :Description: A container for the usage information.
136 :Description: A container for the usage entries information.
141 :Description: A container for the user data information.
146 :Description: The name of the user that owns the buckets.
151 :Description: The bucket name.
156 :Description: Time lower bound for which data is being specified (rounded to the beginning of the first relevant hour).
161 :Description: The time specified in seconds since 1/1/1970.
166 :Description: A container for stats categories.
171 :Description: A container for stats entry.
176 :Description: Name of request category for which the stats are provided.
181 :Description: Number of bytes sent by the RADOS Gateway.
186 :Description: Number of bytes received by the RADOS Gateway.
191 :Description: Number of operations.
196 :Description: Number of successful operations.
201 :Description: A container for stats summary.
206 :Description: A container for stats summary aggregated total.
209 Special Error Responses
210 ~~~~~~~~~~~~~~~~~~~~~~~
217 Remove usage information. With no dates specified, removes all usage
220 Note: this feature is disabled by default, can be enabled by setting ``rgw
221 enable usage log = true`` in the appropriate section of ceph.conf. For changes
222 in ceph.conf to take effect, radosgw process restart is needed.
231 DELETE /{admin}/usage?format=json HTTP/1.1
241 :Description: The user for which the information is requested. If not specified will apply to all users.
243 :Example: ``foo_user``
248 :Description: Date and (optional) time that specifies the start time of the requested data.
250 :Example: ``2012-09-25 16:00:00``
255 :Description: Date and (optional) time that specifies the end time of the requested data (none inclusive).
257 :Example: ``2012-09-25 16:00:00``
263 :Description: Required when uid is not specified, in order to acknowledge multi user data removal.
265 :Example: True [False]
268 Special Error Responses
269 ~~~~~~~~~~~~~~~~~~~~~~~
276 Get user information.
286 GET /{admin}/user?format=json HTTP/1.1
295 :Description: The user for which the information is requested.
297 :Example: ``foo_user``
304 If successful, the response contains the user information.
308 :Description: A container for the user data information.
313 :Description: The user id.
319 :Description: Display name for the user.
325 :Description: True if the user is suspended.
331 :Description: The maximum number of buckets to be owned by the user.
337 :Description: Subusers associated with this user account.
343 :Description: S3 keys associated with this user account.
349 :Description: Swift keys associated with this user account.
355 :Description: User capabilities.
359 Special Error Responses
360 ~~~~~~~~~~~~~~~~~~~~~~~
367 Create a new user. By default, a S3 key pair will be created automatically
368 and returned in the response. If only one of ``access-key`` or ``secret-key``
369 is provided, the omitted key will be automatically generated. By default, a
370 generated key is added to the keyring without replacing an existing key pair.
371 If ``access-key`` is specified and refers to an existing key owned by the user
372 then it will be modified.
374 .. versionadded:: Luminous
376 A ``tenant`` may either be specified as a part of uid or as an additional
386 PUT /{admin}/user?format=json HTTP/1.1
396 :Description: The user ID to be created.
398 :Example: ``foo_user``
401 A tenant name may also specified as a part of ``uid``, by following the syntax
402 ``tenant$user``, refer to :ref:`Multitenancy <rgw-multitenancy>` for more details.
406 :Description: The display name of the user to be created.
408 :Example: ``foo user``
414 :Description: The email address associated with the user.
416 :Example: ``foo@bar.com``
421 :Description: Key type to be generated, options are: swift, s3 (default).
423 :Example: ``s3`` [``s3``]
428 :Description: Specify access key.
430 :Example: ``ABCD0EF12GHIJ2K34LMN``
436 :Description: Specify secret key.
438 :Example: ``0AbCDEFg1h2i34JklM5nop6QrSTUV+WxyzaBC7D8``
443 :Description: User capabilities.
445 :Example: ``usage=read, write; users=read``
450 :Description: Generate a new key pair and add to the existing keyring.
452 :Example: True [True]
457 :Description: Specify the maximum number of buckets the user can own.
464 :Description: Specify whether the user should be suspended.
466 :Example: False [False]
469 .. versionadded:: Jewel
473 :Description: the Tenant under which a user is a part of.
481 If successful, the response contains the user information.
485 :Description: A container for the user data information.
490 :Description: The tenant which user is a part of.
496 :Description: The user id.
502 :Description: Display name for the user.
508 :Description: True if the user is suspended.
514 :Description: The maximum number of buckets to be owned by the user.
520 :Description: Subusers associated with this user account.
526 :Description: S3 keys associated with this user account.
532 :Description: Swift keys associated with this user account.
538 :Description: User capabilities.
542 Special Error Responses
543 ~~~~~~~~~~~~~~~~~~~~~~~
547 :Description: Attempt to create existing user.
552 :Description: Invalid access key specified.
553 :Code: 400 Bad Request
557 :Description: Invalid key type specified.
558 :Code: 400 Bad Request
562 :Description: Invalid secret key specified.
563 :Code: 400 Bad Request
567 :Description: Invalid key type specified.
568 :Code: 400 Bad Request
572 :Description: Provided access key exists and belongs to another user.
577 :Description: Provided email address exists.
580 ``InvalidCapability``
582 :Description: Attempt to grant invalid admin capability.
583 :Code: 400 Bad Request
598 POST /{admin}/user?format=json HTTP/1.1
607 :Description: The user ID to be modified.
609 :Example: ``foo_user``
614 :Description: The display name of the user to be modified.
616 :Example: ``foo user``
621 :Description: The email address to be associated with the user.
623 :Example: ``foo@bar.com``
628 :Description: Generate a new key pair and add to the existing keyring.
630 :Example: True [False]
635 :Description: Specify access key.
637 :Example: ``ABCD0EF12GHIJ2K34LMN``
642 :Description: Specify secret key.
644 :Example: ``0AbCDEFg1h2i34JklM5nop6QrSTUV+WxyzaBC7D8``
649 :Description: Key type to be generated, options are: swift, s3 (default).
656 :Description: Specify the maximum number of buckets the user can own.
663 :Description: Specify whether the user should be suspended.
665 :Example: False [False]
670 :Description: The op-mask of the user to be modified.
672 :Example: ``read, write, delete, *``
678 If successful, the response contains the user information.
682 :Description: A container for the user data information.
687 :Description: The user id.
693 :Description: Display name for the user.
700 :Description: True if the user is suspended.
707 :Description: The maximum number of buckets to be owned by the user.
714 :Description: Subusers associated with this user account.
721 :Description: S3 keys associated with this user account.
728 :Description: Swift keys associated with this user account.
735 :Description: User capabilities.
740 Special Error Responses
741 ~~~~~~~~~~~~~~~~~~~~~~~
745 :Description: Invalid access key specified.
746 :Code: 400 Bad Request
750 :Description: Invalid key type specified.
751 :Code: 400 Bad Request
755 :Description: Invalid secret key specified.
756 :Code: 400 Bad Request
760 :Description: Provided access key exists and belongs to another user.
765 :Description: Provided email address exists.
768 ``InvalidCapability``
770 :Description: Attempt to grant invalid admin capability.
771 :Code: 400 Bad Request
776 Remove an existing user.
785 DELETE /{admin}/user?format=json HTTP/1.1
794 :Description: The user ID to be removed.
796 :Example: ``foo_user``
801 :Description: When specified the buckets and objects belonging
802 to the user will also be removed.
812 Special Error Responses
813 ~~~~~~~~~~~~~~~~~~~~~~~
820 Create a new subuser (primarily useful for clients using the Swift API).
821 Note that in general for a subuser to be useful, it must be granted
822 permissions by specifying ``access``. As with user creation if
823 ``subuser`` is specified without ``secret``, then a secret key will
824 be automatically generated.
833 PUT /{admin}/user?subuser&format=json HTTP/1.1
842 :Description: The user ID under which a subuser is to be created.
844 :Example: ``foo_user``
850 :Description: Specify the subuser ID to be created.
852 :Example: ``sub_foo``
857 :Description: Specify secret key.
859 :Example: ``0AbCDEFg1h2i34JklM5nop6QrSTUV+WxyzaBC7D8``
864 :Description: Key type to be generated, options are: swift (default), s3.
866 :Example: ``swift`` [``swift``]
871 :Description: Set access permissions for sub-user, should be one
872 of ``read, write, readwrite, full``.
879 :Description: Generate the secret key.
881 :Example: True [False]
887 If successful, the response contains the subuser information.
892 :Description: Subusers associated with the user account.
897 :Description: Subuser id.
899 :Parent: ``subusers``
903 :Description: Subuser access to user account.
905 :Parent: ``subusers``
907 Special Error Responses
908 ~~~~~~~~~~~~~~~~~~~~~~~
912 :Description: Specified subuser exists.
917 :Description: Invalid key type specified.
918 :Code: 400 Bad Request
922 :Description: Invalid secret key specified.
923 :Code: 400 Bad Request
927 :Description: Invalid subuser access specified.
928 :Code: 400 Bad Request
933 Modify an existing subuser
942 POST /{admin}/user?subuser&format=json HTTP/1.1
951 :Description: The user ID under which the subuser is to be modified.
953 :Example: ``foo_user``
958 :Description: The subuser ID to be modified.
960 :Example: ``sub_foo``
965 :Description: Generate a new secret key for the subuser,
966 replacing the existing key.
968 :Example: True [False]
973 :Description: Specify secret key.
975 :Example: ``0AbCDEFg1h2i34JklM5nop6QrSTUV+WxyzaBC7D8``
980 :Description: Key type to be generated, options are: swift (default), s3 .
982 :Example: ``swift`` [``swift``]
987 :Description: Set access permissions for sub-user, should be one
988 of ``read, write, readwrite, full``.
997 If successful, the response contains the subuser information.
1002 :Description: Subusers associated with the user account.
1007 :Description: Subuser id.
1009 :Parent: ``subusers``
1013 :Description: Subuser access to user account.
1015 :Parent: ``subusers``
1017 Special Error Responses
1018 ~~~~~~~~~~~~~~~~~~~~~~~
1022 :Description: Invalid key type specified.
1023 :Code: 400 Bad Request
1025 ``InvalidSecretKey``
1027 :Description: Invalid secret key specified.
1028 :Code: 400 Bad Request
1032 :Description: Invalid subuser access specified.
1033 :Code: 400 Bad Request
1038 Remove an existing subuser
1047 DELETE /{admin}/user?subuser&format=json HTTP/1.1
1056 :Description: The user ID under which the subuser is to be removed.
1058 :Example: ``foo_user``
1064 :Description: The subuser ID to be removed.
1066 :Example: ``sub_foo``
1071 :Description: Remove keys belonging to the subuser.
1073 :Example: True [True]
1081 Special Error Responses
1082 ~~~~~~~~~~~~~~~~~~~~~~~
1088 Create a new key. If a ``subuser`` is specified then by default created keys
1089 will be swift type. If only one of ``access-key`` or ``secret-key`` is provided the
1090 committed key will be automatically generated, that is if only ``secret-key`` is
1091 specified then ``access-key`` will be automatically generated. By default, a
1092 generated key is added to the keyring without replacing an existing key pair.
1093 If ``access-key`` is specified and refers to an existing key owned by the user
1094 then it will be modified. The response is a container listing all keys of the same
1095 type as the key created. Note that when creating a swift key, specifying the option
1096 ``access-key`` will have no effect. Additionally, only one swift key may be held by
1097 each user or subuser.
1107 PUT /{admin}/user?key&format=json HTTP/1.1
1116 :Description: The user ID to receive the new key.
1118 :Example: ``foo_user``
1123 :Description: The subuser ID to receive the new key.
1125 :Example: ``sub_foo``
1130 :Description: Key type to be generated, options are: swift, s3 (default).
1132 :Example: ``s3`` [``s3``]
1137 :Description: Specify the access key.
1139 :Example: ``AB01C2D3EF45G6H7IJ8K``
1144 :Description: Specify the secret key.
1146 :Example: ``0ab/CdeFGhij1klmnopqRSTUv1WxyZabcDEFgHij``
1151 :Description: Generate a new key pair and add to the existing keyring.
1153 :Example: True [``True``]
1162 :Description: Keys of type created associated with this user account.
1167 :Description: The user account associated with the key.
1173 :Description: The access key.
1179 :Description: The secret key
1184 Special Error Responses
1185 ~~~~~~~~~~~~~~~~~~~~~~~
1187 ``InvalidAccessKey``
1189 :Description: Invalid access key specified.
1190 :Code: 400 Bad Request
1194 :Description: Invalid key type specified.
1195 :Code: 400 Bad Request
1197 ``InvalidSecretKey``
1199 :Description: Invalid secret key specified.
1200 :Code: 400 Bad Request
1204 :Description: Invalid key type specified.
1205 :Code: 400 Bad Request
1209 :Description: Provided access key exists and belongs to another user.
1215 Remove an existing key.
1224 DELETE /{admin}/user?key&format=json HTTP/1.1
1233 :Description: The S3 access key belonging to the S3 key pair to remove.
1235 :Example: ``AB01C2D3EF45G6H7IJ8K``
1240 :Description: The user to remove the key from.
1242 :Example: ``foo_user``
1247 :Description: The subuser to remove the key from.
1249 :Example: ``sub_foo``
1254 :Description: Key type to be removed, options are: swift, s3.
1255 NOTE: Required to remove swift key.
1260 Special Error Responses
1261 ~~~~~~~~~~~~~~~~~~~~~~~
1273 Get information about a subset of the existing buckets. If ``uid`` is specified
1274 without ``bucket`` then all buckets belonging to the user will be returned. If
1275 ``bucket`` alone is specified, information for that particular bucket will be
1285 GET /{admin}/bucket?format=json HTTP/1.1
1294 :Description: The bucket to return info on.
1296 :Example: ``foo_bucket``
1301 :Description: The user to retrieve bucket information for.
1303 :Example: ``foo_user``
1308 :Description: Return bucket statistics.
1310 :Example: True [False]
1316 If successful the request returns a buckets container containing
1317 the desired bucket information.
1321 :Description: Per bucket information.
1326 :Description: Contains a list of one or more bucket containers.
1331 :Description: Container for single bucket information.
1333 :Parent: ``buckets``
1337 :Description: The name of the bucket.
1343 :Description: The pool the bucket is stored in.
1349 :Description: The unique bucket id.
1355 :Description: Internal bucket tag.
1361 :Description: The user id of the bucket owner.
1367 :Description: Storage usage information.
1373 :Description: Status of bucket index.
1377 Special Error Responses
1378 ~~~~~~~~~~~~~~~~~~~~~~~
1380 ``IndexRepairFailed``
1382 :Description: Bucket index repair failed.
1388 Check the index of an existing bucket. NOTE: to check multipart object
1389 accounting with ``check-objects``, ``fix`` must be set to True.
1391 :caps: buckets=write
1398 GET /{admin}/bucket?index&format=json HTTP/1.1
1407 :Description: The bucket to return info on.
1409 :Example: ``foo_bucket``
1414 :Description: Check multipart object accounting.
1416 :Example: True [False]
1421 :Description: Also fix the bucket index when checking.
1423 :Example: False [False]
1431 :Description: Status of bucket index.
1434 Special Error Responses
1435 ~~~~~~~~~~~~~~~~~~~~~~~
1437 ``IndexRepairFailed``
1439 :Description: Bucket index repair failed.
1445 Delete an existing bucket.
1447 :caps: buckets=write
1454 DELETE /{admin}/bucket?format=json HTTP/1.1
1464 :Description: The bucket to remove.
1466 :Example: ``foo_bucket``
1471 :Description: Remove a buckets objects before deletion.
1473 :Example: True [False]
1481 Special Error Responses
1482 ~~~~~~~~~~~~~~~~~~~~~~~
1486 :Description: Attempted to delete non-empty bucket.
1489 ``ObjectRemovalFailed``
1491 :Description: Unable to remove objects.
1497 Unlink a bucket from a specified user. Primarily useful for changing
1500 :caps: buckets=write
1507 POST /{admin}/bucket?format=json HTTP/1.1
1516 :Description: The bucket to unlink.
1518 :Example: ``foo_bucket``
1523 :Description: The user ID to unlink the bucket from.
1525 :Example: ``foo_user``
1533 Special Error Responses
1534 ~~~~~~~~~~~~~~~~~~~~~~~
1536 ``BucketUnlinkFailed``
1538 :Description: Unable to unlink bucket from specified user.
1544 Link a bucket to a specified user, unlinking the bucket from
1547 :caps: buckets=write
1554 PUT /{admin}/bucket?format=json HTTP/1.1
1563 :Description: The bucket name to unlink.
1565 :Example: ``foo_bucket``
1570 :Description: The bucket id to unlink.
1572 :Example: ``dev.6607669.420``
1577 :Description: The user ID to link the bucket to.
1579 :Example: ``foo_user``
1587 :Description: Container for single bucket information.
1592 :Description: The name of the bucket.
1598 :Description: The pool the bucket is stored in.
1604 :Description: The unique bucket id.
1610 :Description: Internal bucket tag.
1616 :Description: The user id of the bucket owner.
1622 :Description: Storage usage information.
1628 :Description: Status of bucket index.
1632 Special Error Responses
1633 ~~~~~~~~~~~~~~~~~~~~~~~
1635 ``BucketUnlinkFailed``
1637 :Description: Unable to unlink bucket from specified user.
1640 ``BucketLinkFailed``
1642 :Description: Unable to link bucket to specified user.
1648 Remove an existing object. NOTE: Does not require owner to be non-suspended.
1650 :caps: buckets=write
1657 DELETE /{admin}/bucket?object&format=json HTTP/1.1
1665 :Description: The bucket containing the object to be removed.
1667 :Example: ``foo_bucket``
1672 :Description: The object to remove.
1674 :Example: ``foo.txt``
1682 Special Error Responses
1683 ~~~~~~~~~~~~~~~~~~~~~~~
1687 :Description: Specified object does not exist.
1688 :Code: 404 Not Found
1690 ``ObjectRemovalFailed``
1692 :Description: Unable to remove objects.
1697 Get Bucket or Object Policy
1698 ===========================
1700 Read the policy of an object or bucket.
1709 GET /{admin}/bucket?policy&format=json HTTP/1.1
1718 :Description: The bucket to read the policy from.
1720 :Example: ``foo_bucket``
1725 :Description: The object to read the policy from.
1727 :Example: ``foo.txt``
1733 If successful, returns the object or bucket policy
1737 :Description: Access control policy.
1740 Special Error Responses
1741 ~~~~~~~~~~~~~~~~~~~~~~~
1745 :Description: Either bucket was not specified for a bucket policy request or bucket
1746 and object were not specified for an object policy request.
1747 :Code: 400 Bad Request
1749 Add A User Capability
1750 =====================
1752 Add an administrative capability to a specified user.
1761 PUT /{admin}/user?caps&format=json HTTP/1.1
1769 :Description: The user ID to add an administrative capability to.
1771 :Example: ``foo_user``
1776 :Description: The administrative capability to add to the user.
1778 :Example: ``usage=read,write;user=write``
1784 If successful, the response contains the user's capabilities.
1788 :Description: A container for the user data information.
1794 :Description: The user id.
1800 :Description: User capabilities.
1805 Special Error Responses
1806 ~~~~~~~~~~~~~~~~~~~~~~~
1808 ``InvalidCapability``
1810 :Description: Attempt to grant invalid admin capability.
1811 :Code: 400 Bad Request
1818 PUT /{admin}/user?caps&user-caps=usage=read,write;user=write&format=json HTTP/1.1
1820 Content-Type: text/plain
1821 Authorization: {your-authorization-token}
1825 Remove A User Capability
1826 ========================
1828 Remove an administrative capability from a specified user.
1837 DELETE /{admin}/user?caps&format=json HTTP/1.1
1845 :Description: The user ID to remove an administrative capability from.
1847 :Example: ``foo_user``
1852 :Description: The administrative capabilities to remove from the user.
1854 :Example: ``usage=read, write``
1860 If successful, the response contains the user's capabilities.
1864 :Description: A container for the user data information.
1870 :Description: The user id.
1876 :Description: User capabilities.
1881 Special Error Responses
1882 ~~~~~~~~~~~~~~~~~~~~~~~
1884 ``InvalidCapability``
1886 :Description: Attempt to remove an invalid admin capability.
1887 :Code: 400 Bad Request
1891 :Description: User does not possess specified capability.
1892 :Code: 404 Not Found
1898 The Admin Operations API enables you to set quotas on users and on bucket owned
1899 by users. See `Quota Management`_ for additional details. Quotas include the
1900 maximum number of objects in a bucket and the maximum storage size in megabytes.
1902 To view quotas, the user must have a ``users=read`` capability. To set,
1903 modify or disable a quota, the user must have ``users=write`` capability.
1904 See the `Admin Guide`_ for details.
1906 Valid parameters for quotas include:
1908 - **Bucket:** The ``bucket`` option allows you to specify a quota for
1909 buckets owned by a user.
1911 - **Maximum Objects:** The ``max-objects`` setting allows you to specify
1912 the maximum number of objects. A negative value disables this setting.
1914 - **Maximum Size:** The ``max-size`` option allows you to specify a quota
1915 for the maximum number of bytes. The ``max-size-kb`` option allows you
1916 to specify it in KiB. A negative value disables this setting.
1918 - **Quota Type:** The ``quota-type`` option sets the scope for the quota.
1919 The options are ``bucket`` and ``user``.
1921 - **Enable/Disable Quota:** The ``enabled`` option specifies whether the
1922 quota should be enabled. The value should be either 'True' or 'False'.
1927 To get a quota, the user must have ``users`` capability set with ``read``
1930 GET /admin/user?quota&uid=<uid>"a-type=user
1936 To set a quota, the user must have ``users`` capability set with ``write``
1939 PUT /admin/user?quota&uid=<uid>"a-type=user
1942 The content must include a JSON representation of the quota settings
1943 as encoded in the corresponding read operation.
1949 To get a quota, the user must have ``users`` capability set with ``read``
1952 GET /admin/user?quota&uid=<uid>"a-type=bucket
1958 To set a quota, the user must have ``users`` capability set with ``write``
1961 PUT /admin/user?quota&uid=<uid>"a-type=bucket
1963 The content must include a JSON representation of the quota settings
1964 as encoded in the corresponding read operation.
1967 Set Quota for an Individual Bucket
1968 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1970 To set a quota, the user must have ``buckets`` capability set with ``write``
1973 PUT /admin/bucket?quota&uid=<uid>&bucket=<bucket-name>
1975 The content must include a JSON representation of the quota settings
1976 as mentioned in Set Bucket Quota section above.
1983 The Admin Operations API enables you to set and get ratelimit configurations on users and on bucket and global rate limit configurations. See `Rate Limit Management`_ for additional details.
1984 Rate Limit includes the maximum number of operations and/or bytes per minute, separated by read and/or write, to a bucket and/or by a user and the maximum storage size in megabytes.
1986 To view rate limit, the user must have a ``ratelimit=read`` capability. To set,
1987 modify or disable a ratelimit, the user must have ``ratelimit=write`` capability.
1988 See the `Admin Guide`_ for details.
1990 Valid parameters for quotas include:
1992 - **Bucket:** The ``bucket`` option allows you to specify a rate limit for
1995 - **User:** The ``uid`` option allows you to specify a rate limit for a user.
1997 - **Maximum Read Bytes:** The ``max-read-bytes`` setting allows you to specify
1998 the maximum number of read bytes per minute. A 0 value disables this setting.
2000 - **Maximum Write Bytes:** The ``max-write-bytes`` setting allows you to specify
2001 the maximum number of write bytes per minute. A 0 value disables this setting.
2003 - **Maximum Read Ops:** The ``max-read-ops`` setting allows you to specify
2004 the maximum number of read ops per minute. A 0 value disables this setting.
2006 - **Maximum Write Ops:** The ``max-write-ops`` setting allows you to specify
2007 the maximum number of write ops per minute. A 0 value disables this setting.
2009 - **Global:** The ``global`` option allows you to specify a global rate limit.
2010 The value should be either 'True' or 'False'.
2012 - **Rate Limit Scope:** The ``ratelimit-scope`` option sets the scope for the rate limit.
2013 The options are ``bucket`` , ``user`` and ``anonymous``.
2014 ``anonymous`` is only valid for setting global configuration
2016 - **Enable/Disable Rate Limit:** The ``enabled`` option specifies whether the
2017 rate limit should be enabled. The value should be either 'True' or 'False'.
2022 To get a rate limit, the user must have ``ratelimit`` capability set with ``read``
2025 GET /{admin}/ratelimit?ratelimit-scope=user&uid=<uid>
2031 To set a rate limit, the user must have ``ratelimit`` capability set with ``write``
2034 POST /{admin}/ratelimit?ratelimit-scope=user&uid=<uid><[&max-read-bytes=<bytes>][&max-write-bytes=<bytes>][&max-read-ops=<ops>][&max-write-ops=<ops>][enabled=<True|False>]>
2038 Get Bucket Rate Limit
2039 ~~~~~~~~~~~~~~~~~~~~~
2041 To get a rate limit, the user must have ``users`` capability set with ``read``
2044 GET /{admin}/ratelimit?bucket=<bucket>&ratelimit-scope=bucket
2048 Set Rate Limit for an Individual Bucket
2049 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2051 To set a rate limit, the user must have ``ratelimit`` capability set with ``write``
2054 POST /{admin}/ratelimit?bucket=<bucket-name>&ratelimit-scope=bucket<[&max-read-bytes=<bytes>][&max-write-bytes=<bytes>][&max-read-ops=<ops>][&max-write-ops=<ops>]>
2058 Get Global Rate Limit
2059 ~~~~~~~~~~~~~~~~~~~~~
2061 To get a global rate limit, the user must have ``ratelimit`` capability set with ``read``
2064 GET /{admin}/ratelimit?global=<True|False>
2068 Set Global User Rate Limit
2069 ~~~~~~~~~~~~~~~~~~~~~~~~~~
2071 To set a rate limit, the user must have ``ratelimit`` capability set with ``write``
2074 POST /{admin}/ratelimit?ratelimit-scope=user&global=<True|False><[&max-read-bytes=<bytes>][&max-write-bytes=<bytes>][&max-read-ops=<ops>][&max-write-ops=<ops>][enabled=<True|False>]>
2078 Set Global Rate Limit Bucket
2079 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2081 To set a rate limit, the user must have ``ratelimit`` capability set with ``write``
2084 POST /{admin}/ratelimit?ratelimit-scope=bucket&global=<True|False><[&max-read-bytes=<bytes>][&max-write-bytes=<bytes>][&max-read-ops=<ops>][&max-write-ops=<ops>]>
2088 Set Global Anonymous User Rate Limit
2089 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2091 To set a rate limit, the user must have ``ratelimit`` capability set with ``write``
2094 POST /{admin}/ratelimit?ratelimit-scope=anon&global=<True|False><[&max-read-bytes=<bytes>][&max-write-bytes=<bytes>][&max-read-ops=<ops>][&max-write-ops=<ops>][enabled=<True|False>]>
2098 Standard Error Responses
2099 ========================
2103 :Description: Access denied.
2104 :Code: 403 Forbidden
2108 :Description: Internal server error.
2109 :Code: 500 Internal Server Error
2113 :Description: User does not exist.
2114 :Code: 404 Not Found
2118 :Description: Bucket does not exist.
2119 :Code: 404 Not Found
2123 :Description: No such access key.
2124 :Code: 404 Not Found
2130 ========================
2134 - `IrekFasikhov/go-rgwadmin`_
2135 - `QuentinPerez/go-radosgw`_
2139 - `twonote/radosgw-admin4j`_
2143 - `UMIACS/rgwadmin`_
2144 - `valerytschopp/python-radosgw-admin`_
2148 .. _Admin Guide: ../admin
2149 .. _Quota Management: ../admin#quota-management
2150 .. _Rate Limit Management: ../admin#rate-limit-management
2151 .. _IrekFasikhov/go-rgwadmin: https://github.com/IrekFasikhov/go-rgwadmin
2152 .. _QuentinPerez/go-radosgw: https://github.com/QuentinPerez/go-radosgw
2153 .. _twonote/radosgw-admin4j: https://github.com/twonote/radosgw-admin4j
2154 .. _UMIACS/rgwadmin: https://github.com/UMIACS/rgwadmin
2155 .. _valerytschopp/python-radosgw-admin: https://github.com/valerytschopp/python-radosgw-admin