Topics on this page
Notes about resource property values
There are a few things that you should be aware of when setting values for resource properties or Workload Security settings.
To express a
null value using the API, use
0 (zero). For example, when you use
0 as the policyID for a computer it is interpreted as
null, and that the computer has no assigned policy.
Note that this applies when using the API directly. The client libraries support the use of null values.
Valid values for Boolean properties
When you use the API, you must use either
false for the values of Boolean properties. Any other value returns an error.
If you do not provide a value (i.e. null),
false is the default value.
Include only changed values when modifying resources
When you use an operation to modify a resource, you provide only the properties that you need to change. For example, to change the name of a policy, you provide a policy object with a name property, and all other properties are null or not specified. This pattern is typical for REST APIs.
policy = api.Policy() policy.name = policy_name policy_api = api.PoliciesApi() policy_api.modifyPolicy(policyID, policy, false, "v1")