Update Feature Policies for One Project
On this page
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
Base URL: https://cloud.mongodb.com/api/public/v1.0
Required Roles
This resource requires the Project Owner
.
Resource
PUT /groups/{PROJECT-ID}/controlledFeature
Important
You must include every policy that you want to include and maintain. This resource overwrites any existing policy. If you omit a policy when using this resource, that policy isn't enforced after the update. That policy has been removed.
Request Path Parameters
Name | Type | Necessity | Description |
---|---|---|---|
| string | Required | Unique identifier of the project that has the controlled features. |
Request Query Parameters
The following query parameters are optional:
Name | Type | Description | Default | ||||||
---|---|---|---|---|---|---|---|---|---|
pageNum | integer | Page number (1-index based). |
| ||||||
itemsPerPage | integer | Number of items to return per page, up to a maximum of 500. |
| ||||||
pretty | boolean | Indicates whether the response body should be in a prettyprint format. |
| ||||||
envelope | boolean | Indicates whether or not to wrap the response in an envelope. Some API clients cannot access the HTTP response headers or
status code. To remediate this, set For endpoints that return one result, response body includes:
For endpoints that return a list of results, the | None |
Request Body Parameters
Name | Type | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| object | Identifying parameters for the external system that manages this Ops Manager Project. | ||||||||||||||||||||||
externalManagementSystem .name | string | Identifying label for the external system that manages this Ops Manager Project. | ||||||||||||||||||||||
externalManagementSystem .systemId | string | Unique identifier of the external system that manages this Ops Manager Project. | ||||||||||||||||||||||
externalManagementSystem .version | string | Active release of the external system that manages this Ops Manager Project. | ||||||||||||||||||||||
| array | List of policies that the external system applies to this Ops Manager Project. | ||||||||||||||||||||||
policies .policy[n] | object | Single policy set for this Ops Manager Project. This parameter can
be set one or more times in the Accepted values are:
| ||||||||||||||||||||||
policies[n] .disabledParams | array | List of |
Response
Name | Type | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| string | Unique identifier of the Project for which you are setting this policy. | ||||||||||||||||||||||
| string | Timestamp in ISO 8601 date and time format in UTC when this feature control policy was created. | ||||||||||||||||||||||
| string | Timestamp in ISO 8601 date and time format in UTC when this feature control policy was updated. | ||||||||||||||||||||||
| object | Identifying parameters for the external system that manages this Cloud Manager Project. | ||||||||||||||||||||||
externalManagementSystem .name | string | Identifying label for the external system that manages this Cloud Manager Project. | ||||||||||||||||||||||
externalManagementSystem .systemId | string | Unique identifier of the external system that manages this Cloud Manager Project. | ||||||||||||||||||||||
externalManagementSystem .version | string | Active release of the external system that manages this Cloud Manager Project. | ||||||||||||||||||||||
| array | List of policies that the external system applies to this Cloud Manager Project. | ||||||||||||||||||||||
policies .policy[n] | object | Single policy set for this Cloud Manager Project. This parameter can
be set one or more times in the Possible values are:
| ||||||||||||||||||||||
policies[n] .disabledParams | array | List of |
Example Request
1 curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ 2 --header "Accept: application/json" \ 3 --header "Content-Type: application/json" \ 4 --include \ 5 --request PUT "https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/groups/{PROJECT-ID}/controlledFeature?pretty=true" \ 6 --data '{ 7 "externalManagementSystem": 8 { 9 "name": "Operator", 10 "systemId": "6d6c139ae5528707b6e8e3b2", 11 "version": "0.2.1" 12 }, 13 "policies": [ 14 {"policy": "ExternallyManagedLock"}, 15 {"policy": "DisableUserManagement"}, 16 {"policy": "DisableAuthenticationMechanisms"}, 17 {"policy": "DisableSetMongodVersion"}, 18 { 19 "policy": "DisableSetMongodConfig", 20 "disabledParams": ["net.tls.CAFile"] 21 } 22 ] 23 }'
Example Response
Response Header
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
200 OK Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
Response Body
1 { 2 "_id": "{PROJECT-ID}", 3 "created": "2019-08-29T15:03:24Z", 4 "updated": "2019-08-29T15:03:24Z", 5 "externalManagementSystem": 6 { 7 "name": "Operator", 8 "systemId": "6d6c139ae5528707b6e8e3b2", 9 "version": "0.2.1" 10 }, 11 "policies": [ 12 {"policy": "ExternallyManagedLock"}, 13 {"policy": "DisableUserManagement"}, 14 {"policy": "DisableAuthenticationMechanisms"}, 15 {"policy": "DisableSetMongodVersion"}, 16 { 17 "policy": "DisableSetMongodConfig", 18 "disabledParams": ["net.tls.CAFile"] 19 } 20 ] 21 }