Return the "form" you use to create an issue

get

/*/issues/issues/v2/issues/create-form

Return a JSON representation of an issue with pre-filled default values. This "form" can be used as is to create a new issue.

Request

There are no request parameters for this operation.

Response

200 Response
successful operation
Body
Root Schema : CreateIssue
Type: object
Nested Schema : Component
Type: object
Nested Schema : Priority
Type: object
Nested Schema : Product
Type: object
Nested Schema : Release
Type: object
Nested Schema : Resolution
Type: object
Nested Schema : Severity
Type: object
Nested Schema : Status
Type: object
Nested Schema : User
Type: object
Nested Schema : components
Type: array
Nested Schema : releases
Type: array
Nested Schema : releaseTags
Type: array
Nested Schema : ReleaseTag
Type: object

Examples

The following example shows how to retrieve, and save to a file named issue-template, the form (template) you use to create an Oracle Developer Cloud Service issue by submitting a GET request on the REST resource using cURL.For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.

curl -i
-X GET 
-s http://developer.us.oraclecloud.com/dev-org/rest/dev-org_pubapi_203132/issues/v2/issues/create-form 
>issue-template

Example of Response Header

The following shows an example of the response header.

200 Successful Operation
Content-Type: application/json
Date: Thu, 17 Aug 2017 00:26:10 GMT

Example of Response Body

The following example shows the contents of the response body in JSON format. The server returned the JSON representation in a single line. The response body has been formatted for readability.

{"createIssue":{
  "links":[
    {"rel":"self",
     "href":"http://developer.us.oraclecloud.com/dev-org/rest/dev-org_pubapi_203132/issues/v2/issues/create-form"},
    {"rel":"create",
     "href":"http://developer.us.oracleccloud.com/dev-org/rest/dev-org_pubapi_203132/issues/v2/issues"}
  ],
  "summary":"New Task",
  "type":"Defect",
  "severity":{
    "id":4,
    "value":"normal",
    "sortkey":400},
  "status":{
    "id":1,
    "value":"UNCONFIRMED",
    "isActive":true,
    "isOpen":true,
    "sortkey":100},
  "priority":{
    "id":3,
    "value":"Normal",
    "sortkey":300},
  "release":{
    "id":1,
    "value":"---",
    "sortkey":0,
    "product":{
      "id":1}
  },
"product":{
  "id":1,
  "name":"Default",
  "description":"default product",
  "isActive":true,
  "defaultRelease":{
    "id":1,
    "value":"---",
    "sortkey":0,
    "product":{
      "id":1}
    },
  "defaultComponent":{
    "id":1,
    "product":{
      "id":1},
    "name":"Default",
    "description":"default component"},
  "releases":[
  {"id":1,
   "value":"---",
   "sortkey":0,
   "product":{
     "id":1}
    },
    {"id":2,
     "value":"0.0.1",
     "sortkey":10,
     "product":{
       "id":1}
     }   ],
 "components":[
   {"id":1,
    "product":{
      "id":1},
    "name":"Default",
    "description":"default component"}
   ],
  "releaseTags":[]}
}}

Every resource returned by the server includes a root object that identifies the resource, in this case, "createIssue". However, when the JSON representation of a resource is sent to the server in create and update operations, this root object must be stripped off, or the server will reject the request. This is tedious if it is done manually, but is quite simple for a program to do.

Open the saved file, issue-template, in a text editor, remove the heading {"createIssue": and the last trailing curly brace (}), then save the file. It is ready to be used to create a new issue by submitting a modified version of this file with the POST request on the REST resource using cURL.