Skip to content

Commit

Permalink
Merge pull request #644 from prancer-io/api-document
Browse files Browse the repository at this point in the history
Modified Jira & Az board ticket creation API docs
  • Loading branch information
jaiminswan committed Dec 19, 2022
2 parents 7f1a216 + e0f1b52 commit b47fcaf
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 21 deletions.
37 changes: 27 additions & 10 deletions docs/docs/api/azureboardintegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,13 @@ curl -X PUT 'https://portal.prancer.io/prancer-customer1/api/azboard/configurati
- **CURL Sample**

```curl
curl -X POST 'https://portal.prancer.io/prancer-customer1/api/azboard/issue' -H 'Authorization: Bearer <JWT Bearer Token>' --data-raw '{"container": "aws_tf_rds","issues":[{"title": "Bulk issue creation 3"}]}'
curl -X POST 'https://portal.prancer.io/prancer-customer1/api/azboard/ticket/create/' -H 'Authorization: Bearer <JWT Bearer Token>' --data-raw '{"container":"aws_cloud_specific", "pac_alert_ids": ["62b59d9105c659f779127df4", "62b9af0d0f8908d3969b39b6", "62b9af0d0f8908d3969b39f0"]}
```

- **URL: <https://portal.prancer.io/prancer-customer1/api/azboard/issue>**
- **Method:POST**- **Header:**
- **URL: <https://portal.prancer.io/prancer-customer1/api/azboard/ticket/create>**
- **Method:POST**
- **Header:**

``` code
    - content-type: application/json
Expand All @@ -539,18 +540,34 @@ curl -X POST 'https://portal.prancer.io/prancer-customer1/api/azboard/issue' -H

``` json
{
"container": "aws_tf_rds",
"issues": [
{
"title": "Issue creation"
}
]
"container":"aws_cloud_specific",
"pac_alert_ids": [
"62b59d9105c659f779127df4",
"62b9af0d0f8908d3969b39b6",
"62b9af0d0f8908d3969b39f0"
]
}
```

- **Explanation:**
`The Container and issues fields are mandatory.

`Required Fields`

- **container:** Name of the cloud container for which you want want to create Jira tickets.

**For Creating Ticket for Infra findings:**
- **result_id:** Result id of the infra output.
- **output_id:** Output id of the infra output.
- **test_id:** Test id of the failed testcase of the infra output.
- **snapshot_id:** Snapshot id of the failed testcase in infra output.

**For Creating Ticket for App findings:**
- **pac_alert_ids:** Alert id list for which ticket needs to be created.


`Optional Fields`

- **matching_testcase:** : Valid values are `true` and `false`. To create the a single ticket for all similar failed testcases on the Infra findings if `true`

- **Response:**

Expand Down
40 changes: 29 additions & 11 deletions docs/docs/api/jiraintegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,11 +578,11 @@ curl -X GET 'https://portal.prancer.io/prancer-customer1/api/jira/issue?containe
- **CURL Sample**

```curl
curl -X POST 'https://portal.prancer.io/prancer-customer1/api/jira/issue' -H 'Authorization: Bearer <JWT Bearer Token>' --data-raw {"container":"new_container","project":"IP","issues":[{"title" : "title for the issue","tags"["test","label"]}]}
curl -X POST 'https://portal.prancer.io/prancer-customer1/api/jira/ticket/create/' -H 'Authorization: Bearer <JWT Bearer Token>' --data-raw '{"container":"aws_cloud_specific", "pac_alert_ids": ["62b59d9105c659f779127df4", "62b9af0d0f8908d3969b39b6", "62b9af0d0f8908d3969b39f0"]}
```

- **URL: <https://portal.prancer.io/prancer-customer1/api/jira/issue>**
- **URL: <https://portal.prancer.io/prancer-customer1/api/jira/ticket/create/>**
- **Method:POST**
- **Header:**

Expand All @@ -596,19 +596,37 @@ curl -X POST 'https://portal.prancer.io/prancer-customer1/api/jira/issue' -H 'Au

``` json
{
"container":"new_container",
"project":"IP",

"issues":[
{
"title" : "title for the issue",
"tags":["test","label"]
}]
"container":"aws_cloud_specific",
"pac_alert_ids": [
"62b59d9105c659f779127df4",
"62b9af0d0f8908d3969b39b6",
"62b9af0d0f8908d3969b39f0"
]
}
```

- **Explanation:**
`The Container and issues fields are mandatory. The title in the issues is a required field.Tags and issuetype are optional.The Project field can be optional.`

`Required Fields`

- **container:** Name of the cloud container for which you want want to create Jira tickets.

**For Creating Ticket for Infra findings:**
- **result_id:** Result id of the infra output.
- **output_id:** Output id of the infra output.
- **test_id:** Test id of the failed testcase of the infra output.
- **snapshot_id:** Snapshot id of the failed testcase in infra output.

**For Creating Ticket for App findings:**
- **pac_alert_ids:** Alert id list for which ticket needs to be created.


`Optional Fields`

- **issuetype:** : Issue type for Jira ticket.
- **labels:** : Labels type for Jira ticket.
- **project:** : Project name of Jira in which ticket needs to be created.
- **matching_testcase:** : Valid values are `true` and `false`. To create the a single ticket for all similar failed testcases on the Infra findings if `true`


- **Response:**
Expand Down

0 comments on commit b47fcaf

Please sign in to comment.