{"id":24835746,"url":"https://github.com/tobilg/ceph-admin-ops-client","last_synced_at":"2025-06-21T09:06:37.117Z","repository":{"id":57195935,"uuid":"53972543","full_name":"tobilg/ceph-admin-ops-client","owner":"tobilg","description":"A Node.js wrapper for Ceph Object Gateway's Admin Ops API","archived":false,"fork":false,"pushed_at":"2016-09-15T12:19:25.000Z","size":13,"stargazers_count":6,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T09:06:19.706Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobilg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-15T19:29:28.000Z","updated_at":"2022-04-28T08:37:26.000Z","dependencies_parsed_at":"2022-09-16T12:12:41.634Z","dependency_job_id":null,"html_url":"https://github.com/tobilg/ceph-admin-ops-client","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tobilg/ceph-admin-ops-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fceph-admin-ops-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fceph-admin-ops-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fceph-admin-ops-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fceph-admin-ops-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobilg","download_url":"https://codeload.github.com/tobilg/ceph-admin-ops-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fceph-admin-ops-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261095311,"owners_count":23108784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-31T04:51:34.753Z","updated_at":"2025-06-21T09:06:32.105Z","avatar_url":"https://github.com/tobilg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ceph Object Gateway AdminOps API client\nThis module contains a Node.js wrapper around the HTTP API of [Ceph Object Gateway's](http://docs.ceph.com/docs/master/radosgw/) [Admin Ops API](http://docs.ceph.com/docs/master/radosgw/adminops/). \n\n## Installation\nThe module can be installed via\n\n```bash\nnpm install ceph-admin-ops-client --save\n```\n\n## Basic usage\nAs a minimum, the `accessKey`, `secretKey`, `host` and `port` properties need to be set when using this module. Each method returns a promise.\n\n**Setup**\n```javascript\nvar AdminOpsAPI = require(\"ceph-admin-ops-client\");\n\nvar api = new AdminOpsAPI({\n    accessKey: \"\u003c\u003cACCESS_KEY\u003e\u003e\",\n    secretKey: \"\u003c\u003cSECRET_KEY\u003e\u003e\",\n    host: \"192.168.0.100\",\n    port: 10000\n});\n```\n\n**Sample method call:**\n```javascript\napi.getUserInfo({ uid: \"myUser\" }).then(function(userInfo){\n    console.log(JSON.stringify(userInfo));\n}).catch(function(error) {\n    console.log(JSON.stringify(error));\n});\n```\n\n### Configuration properties\n\n* `accessKey`: The access key with which the API shall be used.\n* `secretKey`: The secret key with which the API shall be used.\n* `host`: Either the IP address or the hostname of the Ceph Object Gateway endpoint (default is `s3.amazonaws.com`).\n* `port`: The port of the Ceph Object Gateway endpoint (default is `80`).\n* `protocol`: Either `http` or `https` (default is `http`).\n* `useSubdomain`: If a subdomain shall be used (boolean). Ddefault is `false`.\n* `adminBucket`: The name of the \"admin bucket\" (the URI which is configured for the base admin endpoint). Default is `admin`.\n* `expiresInMinutes`: The time in minutes until the request expires (default is `10`).\n\n## Methods\nThe `parameters` argument for the methods (see below) is an object containing a property map, for example\n\n```javascript\n{\n    \"uid\": \"myUser\",\n    \"bucket\": \"myBucket\"\n}\n```\n\n\n### getUsage(parameters)\nRequest bandwidth usage information.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | No |\n| start | date | No |\n| end | date | No |\n| show-entries | boolean | No |\n| show-summary | boolean | No |\n\n\n### trimUsage(parameters)\nRemove usage information. With no dates specified, removes all usage information.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | No |\n| start | date | No |\n| end | date | No |\n| remove-all | boolean | No |\n| show-summary | boolean | No |\n\n\n### getUserInfo(parameters)\nGet user information. If no user is specified returns the list of all users along with suspension information.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n\n\n### createUser(parameters)\nCreate a new user. By Default, a S3 key pair will be created automatically and returned in the response. If only one of access-key or secret-key is provided, the omitted key will be automatically generated. By default, a generated key is added to the keyring without replacing an existing key pair. If access-key is specified and refers to an existing key owned by the user then it will be modified.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| display-name | string | Yes |\n| email | string | No |\n| key-type | string | No |\n| access-key | string | No |\n| secret-key | string | No |\n| user-caps | string | No |\n| generate-key | boolean | No |\n| max-buckets | number | No |\n| suspended | boolean | No |\n\n\n### updateUser(parameters)\nModify a user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| display-name | string | No |\n| email | string | No |\n| key-type | string | No |\n| access-key | string | No |\n| secret-key | string | No |\n| user-caps | string | No |\n| generate-key | boolean | No |\n| max-buckets | number | No |\n| suspended | boolean | No |\n\n\n### deleteUser(parameters)\nRemove an existing user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| purge-data | boolean | No |\n\n\n### createSubUser(parameters)\nCreate a new subuser (primarily useful for clients using the Swift API). Note that either gen-subuser or subuser is required for a valid request. Note that in general for a subuser to be useful, it must be granted permissions by specifying access. As with user creation if subuser is specified without secret, then a secret key will be automatically generated.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| subuser | string | No |\n| key-type | string | No |\n| secret-key | string | No |\n| access | string | No |\n| generate-secret | boolean | No |\n\n\n### updateSubUser(parameters)\nModify an existing subuser\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| subuser | string | Yes |\n| key-type | string | No |\n| secret-key | string | No |\n| access | string | No |\n| generate-secret | boolean | No |\n\n\n### deleteSubUser(parameters)\nRemove an existing subuser\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| subuser | string | Yes |\n| purge-keys | boolean | No |\n\n\n### createKey(parameters)\nCreate a new key. If a subuser is specified then by default created keys will be swift type. If only one of access-key or secret-key is provided the committed key will be automatically generated, that is if only secret-key is specified then access-key will be automatically generated. By default, a generated key is added to the keyring without replacing an existing key pair. If access-key is specified and refers to an existing key owned by the user then it will be modified. The response is a container listing all keys of the same type as the key created. Note that when creating a swift key, specifying the option access-key will have no effect. Additionally, only one swift key may be held by each user or subuser.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| subuser | string | No |\n| key-type | string | No |\n| access-key | string | No |\n| secret-key | string | No |\n| generate-key | boolean | No |\n\n\n### deleteKey(parameters)\nRemove an existing key.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| access-key | string | Yes |\n| uid | string | No |\n| subuser | string | No |\n| key-type | string | No |\n\n\n### getBucketInfo(parameters)\nGet information about a subset of the existing buckets. If uid is specified without bucket then all buckets beloning to the user will be returned. If bucket alone is specified, information for that particular bucket will be retrieved.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | No |\n| bucket | string | No |\n| stats | boolean | No |\n\n\n### deleteBucket(parameters)\nDelete an existing bucket.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| bucket | string | Yes |\n| purge-objects | boolean | No |\n\n\n### getBucketIndex(parameters)\nCheck the index of an existing bucket. NOTE: to check multipart object accounting with check-objects, fix must be set to True.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| bucket | string | Yes |\n| check-objects | boolean | No |\n| fix | boolean | No |\n\n\n### unlinkBucket(parameters)\nUnlink a bucket from a specified user. Primarily useful for changing bucket ownership.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| bucket | string | Yes |\n\n\n### linkBucket(parameters)\nLink a bucket to a specified user, unlinking the bucket from any previous user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| bucket | string | Yes |\n\n\n### deleteObject(parameters)\nRemove an existing object. NOTE: Does not require owner to be non-suspended.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| bucket | string | Yes |\n| object | string | Yes |\n\n\n### getBucketPolicy(parameters)\nRead the policy of a bucket.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| bucket | string | Yes |\n| object | string | No |\n\n\n### getObjectPolicy(parameters)\nRead the policy of an object.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| bucket | string | Yes |\n| object | string | Yes |\n\n\n### createUserCapability(parameters)\nAdd an administrative capability to a specified user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| user-caps | string | Yes |\n\n\n### deleteUserCapability(parameters)\nRemove an administrative capability from a specified user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| user-caps | string | Yes |\n\n\n### getUserQuota(parameters)\nRead the quota of an user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n\n\n### updateUserQuota(parameters)\nUpdate the quota of an user.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| quotaObject | string | Yes |\n\n\n### getBucketQuota(parameters)\nRead the quota of a bucket.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n\n\n### updateBucketQuota(parameters)\nUpdate the quota of a bucket.\n  \n| Parameter | Data Type | Mandatory? |\n| --------- | --------- | --------- |\n| uid | string | Yes |\n| quotaObject | string | Yes |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fceph-admin-ops-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobilg%2Fceph-admin-ops-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fceph-admin-ops-client/lists"}