Jira
Connect Jira to your preprocessing pipeline, and use the Unstructured Ingest CLI or the Unstructured Ingest Python library to batch process all your documents and store structured outputs locally on your filesystem.
The requirements are as follows.
-
The site URL for your Jira Data Center installation or Jira Cloud account. For Jira Cloud, open Jira in your web browser and copy the address from the browser’s address bar. If you’re unsure, check the dashboard URL, or if viewing an issue, project or board, the site URL is typically everything that comes before and including
/jira
, such ashttps://<organization>.atlassian.net/jira
. -
To process Jira projects, provide the IDs for the target projects. To get a project’s ID, sign in to your Jira Cloud account or Jira Data Center installation, and then go to the following URL:
https://<organization>.atlassian.net/rest/api/latest/project/<project-key>
, replacing<organization>
with yours, and replacing<project-key>
with the target project’s key. In the response, look for the URLhttps://<organization>.atlassian.net/rest/api/3/project/<project-id>
, where<project-id>
is the target project’s ID. -
To process Jira boards, the IDs for the target boards. To get a board’s ID, sign in to your Jira Cloud account or Jira Data Center installation, and then go to the following URL:
https://<organization>.atlassian.net/rest/agile/1.0/board?projectKeyOrId=<project-key-or-id>
, replacing<organization>
with yours, and<project-key-or-id>
with the associated project’s key or ID. In the response, look for the URLhttps://<organization>.atlassian.net/rest/agile/1.0/board/<board-id>
, where<board-id>
is the board’s ID. -
To process Jira issues, the IDs for the target issues. To get an issue’s ID, sign in to your Jia Cloud account or Jira Data Center installation, open the issue, and then look at the URL in your browser’s address bar. The issue ID is the string of characters after the final slash in the URL.
-
A user in your Jira Cloud account or Jira Data Center installation.
-
The user must have the correct permissions in your Jira Cloud account or Jira Data Center installation to access the target projects, boards, and issues.
-
One of the following:
- For Jira Cloud or Jira Data Center, the target user’s name or email address, and password. Change a Jira Cloud user’s password. Change a Jira Data Center user’s password.
- For Jira Cloud only, the target user’s name or email address, and API token. Create an API token.
- For Jira Data Center only, the target user’s personal access token (PAT). Create a PAT.
The Jira connector dependencies:
You might also need to install additional dependencies, depending on your needs. Learn more.
The following environment variables:
-
JIRA_URL
- The site URL for your Jira Data Center installation or Jira Cloud account, represented by--url
(CLI) orurl
(Python). -
One of the following:
-
For Jira Cloud or Jira Data Center, the target user’s name or email address, and password, as follows:
JIRA_USERNAME
- The name or email address of the target user, represented by--username
(CLI) orusername
(Python).JIRA_PASSWORD_OR_API_TOKEN
- The user’s password, represented by--password
(CLI) orpassword
(Python).
-
For Jira Cloud only, the target user’s name or email address, and API token, as follows:
JIRA_USERNAME
- The name or email address of the target user, represented by--username
(CLI) orusername
(Python).JIRA_PASSWORD_OR_API_TOKEN
- The user’s API token, represented by--password
(CLI) orpassword
(Python).
-
For Jira Data Center only, the target user’s personal access token (PAT), as follows:
JIRA_PERSONAL_ACCESS_TOKEN
- The user’s personal access token (PAT), represented by--token
(CLI) ortoken
(Python).
-
Also:
-
For Jira Cloud, you must specify
--cloud
(CLI) or setcloud
toTrue
(Python). -
For Jira Data Center, you can specify
--no-cloud
(CLI) or setcloud
toFalse
(Python). This is the default if not otherwise specified. -
To process specific projects, boards, or issues, use:
--projects
with a comma-delimited list of target project IDs (CLI) orproject
with an array of target project IDs (Python).--boards
with a comma-delmited list of target board IDs (CLI) orboards
with an array of target board IDs (Python).--issues
with a comma-delimited list of target issue IDs (CLI) orissues
with an array of target issue IDs (Python).
Now call the Unstructured CLI or Python. The destination connector can be any of the ones supported. This example uses the local destination connector.
This example sends data to Unstructured for processing by default. To process data locally instead, see the instructions at the end of this page.
For the Unstructured Ingest CLI and the Unstructured Ingest Python library, you can use the --partition-by-api
option (CLI) or partition_by_api
(Python) parameter to specify where files are processed:
-
To do local file processing, omit
--partition-by-api
(CLI) orpartition_by_api
(Python), or explicitly specifypartition_by_api=False
(Python).Local file processing does not use an Unstructured API key or API URL, so you can also omit the following, if they appear:
--api-key $UNSTRUCTURED_API_KEY
(CLI) orapi_key=os.getenv("UNSTRUCTURED_API_KEY")
(Python)--partition-endpoint $UNSTRUCTURED_API_URL
(CLI) orpartition_endpoint=os.getenv("UNSTRUCTURED_API_URL")
(Python)- The environment variables
UNSTRUCTURED_API_KEY
andUNSTRUCTURED_API_URL
-
To send files to the Unstructured Partition Endpoint for processing, specify
--partition-by-api
(CLI) orpartition_by_api=True
(Python).Unstructured also requires an Unstructured API key and API URL, by adding the following:
--api-key $UNSTRUCTURED_API_KEY
(CLI) orapi_key=os.getenv("UNSTRUCTURED_API_KEY")
(Python)--partition-endpoint $UNSTRUCTURED_API_URL
(CLI) orpartition_endpoint=os.getenv("UNSTRUCTURED_API_URL")
(Python)- The environment variables
UNSTRUCTURED_API_KEY
andUNSTRUCTURED_API_URL
, representing your API key and API URL, respectively.
You must specify the API URL only if you are not using the default API URL for Unstructured Ingest, for example, if you are using a version of the Unstructured API that is hosted on your own compute infrastructure.
The default API URL for Unstructured Ingest is
https://api.unstructuredapp.io/general/v0/general
, which is the API URL for the Unstructured Partition Endpoint.If you do not have an API key, get one now.
If the Unstructured API is hosted on your own compute infrastructure, the process for generating Unstructured API keys, and the Unstructured API URL that you use, are different. For details, contact Unstructured Sales at sales@unstructured.io.
Was this page helpful?