Skip to content

Commit 8db13ca

Browse files
authored
UI/API: Jira source connector (#541)
1 parent 410e761 commit 8db13ca

File tree

10 files changed

+167
-0
lines changed

10 files changed

+167
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Jira
3+
---
4+
5+
import FirstTimeAPISourceConnector from '/snippets/general-shared-text/first-time-api-source-connector.mdx';
6+
7+
<FirstTimeAPISourceConnector />
8+
9+
Ingest your files into Unstructured from Jira.
10+
11+
The requirements are as follows.
12+
13+
import JiraPrerequisites from '/snippets/general-shared-text/jira.mdx';
14+
15+
<JiraPrerequisites />
16+
17+
To create a Jira source connector, see the following examples.
18+
19+
import JiraSDK from '/snippets/source_connectors/jira_sdk.mdx';
20+
import JiraAPIRESTCreate from '/snippets/source_connectors/jira_rest_create.mdx';
21+
22+
<CodeGroup>
23+
<JiraSDK />
24+
<JiraAPIRESTCreate />
25+
</CodeGroup>
26+
27+
Replace the preceding placeholders as follows:
28+
29+
import JiraAPIPlaceholders from '/snippets/general-shared-text/jira-api-placeholders.mdx';
30+
31+
<JiraAPIPlaceholders />
32+

api-reference/workflow/sources/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ For the list of specific settings, see:
3131
- [Elasticsearch](/api-reference/workflow/sources/elasticsearch) (`ELASTICSEARCH` for the Python SDK or `elasticsearch` for `curl` and Postman)
3232
- [Google Cloud Storage](/api-reference/workflow/sources/google-cloud) (`GCS` for the Python SDK or `gcs` for `curl` and Postman)
3333
- [Google Drive](/api-reference/workflow/sources/google-drive) (`GOOGLE_DRIVE` for the Python SDK or `google_drive` for `curl` and Postman)
34+
- [Jira](/api-reference/workflow/sources/jira) (`JIRA` for the Python SDK or `jira` for `curl` and Postman)
3435
- [Kafka](/api-reference/workflow/sources/kafka) (`KAFKA_CLOUD` for the Python SDK or `kafka-cloud` for `curl` and Postman)
3536
- [Local](/api-reference/workflow/sources/local) (Supported only for `curl` and Postman)
3637
- [MongoDB](/api-reference/workflow/sources/mongodb) (`MONGODB` for the Python SDK or `mongodb` for `curl` and Postman)

mint.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
"ui/sources/elasticsearch",
195195
"ui/sources/google-cloud",
196196
"ui/sources/google-drive",
197+
"ui/sources/jira",
197198
"ui/sources/kafka",
198199
"ui/sources/mongodb",
199200
"ui/sources/onedrive",
@@ -288,6 +289,7 @@
288289
"api-reference/workflow/sources/elasticsearch",
289290
"api-reference/workflow/sources/google-cloud",
290291
"api-reference/workflow/sources/google-drive",
292+
"api-reference/workflow/sources/jira",
291293
"api-reference/workflow/sources/kafka",
292294
"api-reference/workflow/sources/local",
293295
"api-reference/workflow/sources/mongodb",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- `<name>` (_required_): A unique name for this connector.
2+
- `<url>` (_required_): The URL of the Jira instance.
3+
- `<username>` (_required_ for password or API token authentication, or personal access token authentication): The username of the Jira user.
4+
- `<password>` (_required_ for password or API token authentication): The password or API token of the Jira user.
5+
- `<token>` (_required_ for personal access token authentication): The personal access token of the Jira user.
6+
- `<project-id>`: The ID of a target project in Jira to access.
7+
- `<board-id>`: The ID of a target board in Jira to access.
8+
- `<issue-id>`: The ID of a target issue in Jira to access.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Fill in the following fields:
2+
3+
- **Name** (_required_): A unique name for this connector.
4+
- **URL** (_required_): The URL of the Jira instance.
5+
- **Username** (_required_ for password or API token authentication, or personal access token authentication): The username of the Jira user.
6+
- **Password** (_required_ for password authentication): The password of the Jira user.
7+
- **API Token** (_required_ for API token authentication): The API token of the Jira user.
8+
- **Personal Access Token** (_required_ for personal access token authentication): The personal access token of the Jira user.
9+
- **Projects**: A comma-separated list of IDs of the target projects in Jira to access.
10+
- **Boards**: A comma-separated list of IDs of the target boards in Jira to access.
11+
- **Issues**: A comma-separated list of IDs of the target issues in Jira to access.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
```bash curl
2+
curl --request 'POST' --location \
3+
"$UNSTRUCTURED_API_URL/sources" \
4+
--header 'accept: application/json' \
5+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY" \
6+
--header 'content-type: application/json' \
7+
--data \
8+
'{
9+
"name": "<name>",
10+
"type": "jira",
11+
"config": {
12+
"url": "<url>",
13+
14+
# For password or API token authentication:
15+
"username": "<username>",
16+
"password": "<password">,
17+
18+
# For personal access token authentication:
19+
"token": "<token>",
20+
21+
"projects": [
22+
"<project-id>",
23+
"<project-id>"
24+
],
25+
"boards": [
26+
"<board-id>",
27+
"<board-id>"
28+
],
29+
"issues": [
30+
"<issue-id>",
31+
"<issue-id>"
32+
]
33+
}
34+
}'
35+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
```python Python SDK
2+
import os
3+
4+
from unstructured_client import UnstructuredClient
5+
from unstructured_client.models.operations import CreateSourceRequest
6+
from unstructured_client.models.shared import (
7+
CreateSourceConnector,
8+
SourceConnectorType,
9+
JiraSourceConnectorConfigInput
10+
)
11+
12+
with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as client:
13+
response = client.sources.create_source(
14+
request=CreateSourceRequest(
15+
create_source_connector=CreateSourceConnector(
16+
name="<name>",
17+
type=SourceConnectorType.JIRA,
18+
config=JiraSourceConnectorConfigInput(
19+
url="<url>",
20+
21+
# For password or API token authentication:
22+
username="<username>",
23+
password="<password">,
24+
25+
# For personal access token authentication:
26+
token="<token>",
27+
28+
projects=[
29+
"<project-id>",
30+
"<project-id>"
31+
],
32+
boards=[
33+
"<board-id>",
34+
"<board-id>"
35+
],
36+
issues=[
37+
"<issue-id>",
38+
"<issue-id>"
39+
]
40+
)
41+
)
42+
)
43+
)
44+
45+
print(response.source_connector_information)
46+
```

ui/connectors.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Unstructured supports connecting to the following source and destination types.
2020
- [Elasticsearch](/ui/sources/elasticsearch)
2121
- [Google Cloud Storage](/ui/sources/google-cloud)
2222
- [Google Drive](/ui/sources/google-drive)
23+
- [Jira](/ui/sources/jira)
2324
- [Kafka](/ui/sources/kafka)
2425
- [MongoDB](/ui/sources/mongodb)
2526
- [OneDrive](/ui/sources/onedrive)

ui/sources/jira.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Jira
3+
---
4+
5+
import FirstTimeUISourceConnector from '/snippets/general-shared-text/first-time-ui-source-connector.mdx';
6+
7+
<FirstTimeUISourceConnector />
8+
9+
Ingest your files into Unstructured from Jira.
10+
11+
The requirements are as follows.
12+
13+
import JiraPrerequisites from '/snippets/general-shared-text/jira.mdx';
14+
15+
<JiraPrerequisites />
16+
17+
To create the source connector:
18+
19+
1. On the sidebar, click **Connectors**.
20+
2. Click **Sources**.
21+
3. Cick **New** or **Create Connector**.
22+
4. Give the connector some unique **Name**.
23+
5. In the **Provider** area, click **Jira**.
24+
6. Click **Continue**.
25+
7. Follow the on-screen instructions to fill in the fields as described later on this page.
26+
8. Click **Save and Test**.
27+
28+
import JiraFields from '/snippets/general-shared-text/jira-platform.mdx';
29+
30+
<JiraFields />

ui/sources/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ To create a source connector:
3131
- [Elasticsearch](/ui/sources/elasticsearch)
3232
- [Google Cloud Storage](/ui/sources/google-cloud)
3333
- [Google Drive](/ui/sources/google-drive)
34+
- [Jira](/ui/sources/jira)
3435
- [Kafka](/ui/sources/kafka)
3536
- [MongoDB](/ui/sources/mongodb)
3637
- [OneDrive](/ui/sources/onedrive)

0 commit comments

Comments
 (0)