Generating templates for resource creation

When you use the HCP management API to create a resource, the best way to ensure that the request body includes the appropriate properties is to use a template. You can generate your own template by submitting a GET request for an existing resource of the same type. In the request, include the verbose=false query parameter on the resource URL (or omit the verbose parameter to accept the default of false).

With a nonverbose GET request HCP returns only properties whose values you can set. This enables you to use the response body as a template for the request body for creating additional resources of the same type.

In most cases, in response to a nonverbose GET request, HCP returns all the properties required for creating a resource of the same type and none of the properties that are invalid on a PUT request. The only exception is for namespaces, where the response body does not include the versioningSettings property. To complete the template for namespaces, you need to add this property.

To generate the template for creating tenants, you need to make the GET request using a system-level user account. The tenant you specify in the GET request must not have granted system-level users administrative access to itself.

Trademarks and Legal Disclaimer

© 2017 Hitachi Data Systems Corporation. All rights reserved.