Return the "form" you use to create an issue
/*/issues/issues/v2/issues/create-form
Request
There are no request parameters for this operation.
Response
object
object
object
- id
-
Type:
integer
(int32
) - links
-
Type:
array
links - sortkey
-
Type:
integer
(int32
) - value
-
Type:
string
object
- components
-
Type:
array
components - defaultComponent
-
Type:
object
Component - description
-
Type:
string
- id
-
Type:
integer
(int32
) - isActive
-
Type:
boolean
Default Value:false
- links
-
Type:
array
links - name
-
Type:
string
- releases
-
Type:
array
releases - releaseTags
-
Type:
array
releaseTags
object
object
- id
-
Type:
integer
(int32
) - links
-
Type:
array
links - sortkey
-
Type:
integer
(int32
) - value
-
Type:
string
object
- id
-
Type:
integer
(int32
) - links
-
Type:
array
links - sortkey
-
Type:
integer
(int32
) - value
-
Type:
string
object
- id
-
Type:
integer
(int32
) - isActive
-
Type:
boolean
Default Value:false
- isOpen
-
Type:
boolean
Default Value:false
- links
-
Type:
array
links - sortkey
-
Type:
integer
(int32
) - value
-
Type:
string
object
- gravatarHash
-
Type:
string
- id
-
Type:
integer
(int32
) - links
-
Type:
array
links - loginName
-
Type:
string
- realname
-
Type:
string
object
- href
-
Type:
string
- mediaType
-
Type:
string
- method
-
Type:
string
- profile
-
Type:
string
- rel
-
Type:
string
array
array
-
Type:
object
ReleaseTag
object
- id
-
Type:
integer
(int32
) - links
-
Type:
array
links - value
-
Type:
string
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.