Get form for creating an issue
/issues/issues/v3/issues/create-form
Request
-
Accept: string
Default Value:
object
-
country(optional):
string
-
displayCountry(optional):
string
-
displayLanguage(optional):
string
-
displayName(optional):
string
-
displayScript(optional):
string
-
displayVariant(optional):
string
-
extensionKeys(optional):
array extensionKeys
Unique Items Required:
true
-
iso3Country(optional):
string
-
iso3Language(optional):
string
-
language(optional):
string
-
script(optional):
string
-
unicodeLocaleAttributes(optional):
array unicodeLocaleAttributes
Unique Items Required:
true
-
unicodeLocaleKeys(optional):
array unicodeLocaleKeys
Unique Items Required:
true
-
variant(optional):
string
object
object
Response
200 Response
object
-
component(optional):
object Component
-
links(optional):
array links
-
priority(optional):
object Priority
-
product(optional):
object Product
-
release(optional):
object Release
-
resolution(optional):
object Resolution
-
severity(optional):
object Severity
-
status(optional):
object Status
-
summary(optional):
string
-
type(optional):
string
object
-
components(optional):
array components
-
defaultComponent(optional):
object Component
-
description(optional):
string
-
id(optional):
integer(int32)
-
isActive(optional):
boolean
Default Value:
false
-
links(optional):
array links
-
name(optional):
string
-
releases(optional):
array releases
-
releaseTags(optional):
array releaseTags
object
-
id(optional):
integer(int32)
-
isActive(optional):
boolean
Default Value:
false
-
isOpen(optional):
boolean
Default Value:
false
-
links(optional):
array links
-
sortkey(optional):
integer(int32)
-
value(optional):
string
array
406 Response
array
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.