Get form for creating an issue

get

/issues/issues/v3/issues/create-form

Return the template, which contains all fields, that's used to create a new issue.

Request

Header Parameters
Body ()
Root Schema : HttpServletResponse
Type: object
Show Source
Nested Schema : Locale
Type: object
Show Source
Nested Schema : ServletOutputStream
Type: object
Nested Schema : PrintWriter
Type: object
Nested Schema : extensionKeys
Type: array
Unique Items Required: true
Show Source
Nested Schema : unicodeLocaleAttributes
Type: array
Unique Items Required: true
Show Source
Nested Schema : unicodeLocaleKeys
Type: array
Unique Items Required: true
Show Source
Back to Top

Response

200 Response

Successful operation
Body ()
Root Schema : CreateIssue
Type: object
Show Source
Nested Schema : Component
Type: object
Show Source
Nested Schema : Priority
Type: object
Show Source
Nested Schema : Product
Type: object
Show Source
Nested Schema : Release
Type: object
Show Source
Nested Schema : Resolution
Type: object
Show Source
Nested Schema : Severity
Type: object
Show Source
Nested Schema : Status
Type: object
Show Source
Nested Schema : User
Type: object
Show Source
Nested Schema : components
Type: array
Show Source
Nested Schema : releases
Type: array
Nested Schema : releaseTags
Type: array
Show Source
Nested Schema : ReleaseTag
Type: object
Show Source

406 Response

Media type not acceptable
Body ()
Root Schema : RestException
Type: object
Show Source
Nested Schema : Throwable
Type: object
Show Source
Nested Schema : stackTrace
Type: array
Show Source
Nested Schema : suppressed
Type: array
Show Source
Nested Schema : stackTrace
Type: array
Show Source
Nested Schema : suppressed
Type: array
Nested Schema : StackTraceElement
Type: object
Show Source
Back to Top

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.


curl -i
-X GET
-H "Accept: application/vnd.oracle.resource+json"
-s https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/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":"https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/issues/create-form"},
    {"rel":"create",
     "href":"http://myinstance.oracleccloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/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, which you do by using curl to submit a a POST request with a modified version of this file on the REST resource.

Back to Top