Create issue

post

/issues/issues/v3/issues

Create a new issue.

Request

Header Parameters
Body ()
Issue to create
Root Schema : Issue
Type: object
Show Source
Nested Schema : attachments
Type: array
Show Source
Nested Schema : ccs
Type: array
Show Source
Nested Schema : comments
Type: array
Show Source
Nested Schema : commits
Type: array
Show Source
Nested Schema : Component
Type: object
Show Source
Nested Schema : customFields
Type: object
Additional Properties Allowed
Show Source
Nested Schema : duplicates
Type: object
Nested Schema : User
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 : Sprint
Type: object
Show Source
Nested Schema : Status
Type: object
Show Source
Nested Schema : subIssues
Type: object
Nested Schema : tags
Type: array
Show Source
Nested Schema : timeSpent
Type: array
Show Source
Nested Schema : Attachment
Type: object
Show Source
Nested Schema : attachmentData
Type: array
Show Source
Nested Schema : IssueHandle
Type: object
Show Source
Nested Schema : Comment
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
Nested Schema : Tag
Type: object
Show Source
Nested Schema : TimeSpent
Type: object
Show Source
Back to Top

Response

200 Response

Successful operation
Body ()
Root Schema : Issue
Type: object
Show Source
Nested Schema : attachments
Type: array
Show Source
Nested Schema : ccs
Type: array
Show Source
Nested Schema : comments
Type: array
Show Source
Nested Schema : commits
Type: array
Show Source
Nested Schema : Component
Type: object
Show Source
Nested Schema : customFields
Type: object
Additional Properties Allowed
Show Source
Nested Schema : duplicates
Type: object
Nested Schema : User
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 : Sprint
Type: object
Show Source
Nested Schema : Status
Type: object
Show Source
Nested Schema : subIssues
Type: object
Nested Schema : tags
Type: array
Show Source
Nested Schema : timeSpent
Type: array
Show Source
Nested Schema : Attachment
Type: object
Show Source
Nested Schema : attachmentData
Type: array
Show Source
Nested Schema : IssueHandle
Type: object
Show Source
Nested Schema : Comment
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
Nested Schema : Tag
Type: object
Show Source
Nested Schema : TimeSpent
Type: object
Show Source

400 Response

Invalid issue property
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

404 Response

Unknown issue property
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

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 create a VB Studio issue by submitting a POST request on the REST resource using curl. The example uses an input file, issues-new, that contains the complete JSON representation of the issue to be created.


curl -i 
-X POST 
-s 
-H "Accept: application/vnd.oracle.resource+json" -H "Content-type: application/vnd.oracle.resource+json" 
-d@issue-new 
https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/issues

Notice that the command uses ?H parameters to specify the Accept and Content-type for the body of the response. These parameters must be specified for all Issues API POST and PUT operations.

Example of Response Header

The following shows an example of the response header.


200 Successful Operation
Content-Type: application/vnd.oracle.resource+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,if the request was successful. The entire JSON representation for the newly created issue is returned in a single line. The output has been formatted to improve readability.


{"issue":{
  "links":[
    {"rel":"self",
     "href":"https://myinstance.oraclecloud.com/myorg-org/rest/myorg_pubapi_203132/issues/v3/issues/1"},
    {"rel":"canonical",
     "href":"https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/issues/1"},
    {"rel":"create-form",
     "href":"https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/issues/create-form"},
    {"rel":"collection",
     "href":"https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/issues"},
    {"rel":"search-form",
     "href":"https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/issues/v3/issues/search-form"}
  ],
  "id":1,
  "version":"1498782045181",
  "creationDate":1498782045175,
  "modificationDate":1498782045181,
  "summary":"New Story",
  "description":"",
  "wikiRenderedDescription":"",
  "tags":[],
  "sumOfSubIssuesEstimatedTime":0,
  "remainingTime":0,
  "sumOfSubIssuesRemainingTime":0,
  "sumOfSubIssuesStoryPoints":0,
  "url":"https://myinstance.oraclecloud.com/myorg/rest/myorg_pubapi_203132/task/1",
  "type":"Story",
  "externalLinks":[],
  "reporter":{
    "id":1,
    "loginName":"joe@example.com",
    "realname":"Joe",
    "gravatarHash":"68aa64f7d0abfd8929c261f78b60fd27"},
  "ccs":[
    {"id":1,
     "loginName":"joe@example.com",
     "realname":"Joe",
     "gravatarHash":"68aa64f7d0abfd8929c261f78b60fd27"}
   ],
  "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},
  "subIssues":[],
  "timeSpent":[],
  "sumOfSubIssuesTimeSpent":0,
  "attachments":[],
  "duplicates":[],
  "customFields":{
    "iteration":"---"},
  "commits":[],
  "comments":[]
}}
Back to Top