You can pass a single JSON object to create a single element, or a JSON array of version JSON objects to create multiple elements. If you create a single element, the response includes the URI of the new element in the Location response header, and the response body includes one version JSON object with the format specified by the format parameter. If you create multiple elements, the response includes a JSON array of version JSON objects with the specified format in an order that corresponds to the order of the input data. If no format is specified, the "detail" format will be used by default. If creating a large number of elements in a single request, it is recommended to use the "list" or "name" formats for better performance, when the use case allows it.
Table 1. Request parameters
||One of the format options; this parameter determines what information is included in the JSON response. If not specified, or if an unrecognized value is specified, the default format of "detail" will be used.
For the format
parameter, use one of the following format options:
- Primary properties and application, version statuses and children
- Primary properties and application, version statuses with related comments, attachments, and component versions
For details about the full JSON that the server returns when you select one of these formats, see the related resource: versions resource
curl -k -u jsmith:passwd
-H "Accept: application/json"
-H "Content-Type: application/json"
Example JSON request
"name": "Example Version 1.0",
"description": "Version example with application ID reference",