# Integrate Postman with Jenkins [Jenkins](https://www.jenkins.io/) is an open source automation server that can act as a continuous integration (CI) server or a continuous delivery (CD) hub. With hundreds of available plug-ins, teams can use Jenkins to build, deploy, and automate almost any project. To set up a Jenkins integration for your API in the Postman API Builder, first create an API token in Jenkins and then configure your API in Postman. After you set up the integration, you can view the status of builds or start a new build, all from within Postman. ## Create a Jenkins API token 1. Sign in to Jenkins. 2. Click your user name at the upper right, and then select **Configure**. 3. Click **Add new Token**. 4. Enter a name for the token and click **Generate**. 5. Copy the new token. (Save the token somewhere safe.) ## Configure a Jenkins integration 1. Open your API by selecting **APIs** in the sidebar. *Each API can be linked to one CI project*. 2. Click **Test and Automation**. 3. Under **Automate**, select **Jenkins**. 4. Enter a **Nickname** to help you recognize the integration later. 5. Enter the **URL** of your Jenkins server. If your Jenkins server is located behind a firewall, you may need to ask your IT team to allowlist the Postman static IP address (`3.212.102.200`) to enable the Jenkins integration. Learn more about [Static IP support](https://learning.postman.com/docs/integrations/intro-integrations/#static-ip-support). 6. Enter your **Jenkins username**. 7. For **Authentication token**, enter your Jenkins API token. 8. Select the **CI project** used for your API. 9. Click **Connect**. Connect to Jenkins ## View build status After you set up a Jenkins integration, information for build jobs is available in Postman. For each build you can view the start time, duration, and build status (`Success` or `Failed`). You can also view the results of collection runs that are [configured in your pipeline using the Postman CLI](#configure-the-postman-cli-for-jenkins). To view build jobs, open an API and click **Test and Automation**. The most recent jobs are listed under the repository name. Click **View Builds** to view the full list of build jobs. From here you can take the following actions: * Use the dropdown list to filter jobs by build status. * To open a build in Jenkins, select the build name. * To start a new build, click **Run Build**. * To get the latest build status information, click Refresh icon **Refresh**. * To edit or delete the integration, click the more actions icon More actions icon. View all Jenkins builds ## View collection run details Using the Postman CLI, you can run Postman collections with your API tests as part of a Jenkins pipeline. To view details for collections that were run as part of a build, first [configure the Postman CLI for Jenkins](#configure-the-postman-cli-for-jenkins) and then [start a new build](#view-build-status). After the build is complete, use the arrows to expand a build and expand a collection to view details about a collection run. Click **View Report** to view a collection run report in the Postman **History**. Learn more about using the [Collection Runner](/docs/collections/running-collections/intro-to-collection-runs/). ## View API Governance and API Security rule violations Using the Postman CLI, you can enforce [Postman API Governance and API Security rules each time the pipeline runs](/docs/api-governance/api-definition/api-definition-warnings/#track-governance-and-security-rule-violations-in-cicd) using the [api lint](/docs/postman-cli/postman-cli-options/#governance-and-security) command ([Enterprise teams only](https://www.postman.com/pricing/)). To view the results of API Governance and API Security checks that ran as part of the build, first [configure the Postman CLI for Jenkins](#configure-the-postman-cli-for-jenkins) and then [start a new build](#view-build-status). After the build is complete, use the arrows to expand a build and expand an API specification stored in the Postman API Builder to view any rule violations. View API Governance and API Security results ## Configure the Postman CLI for Jenkins With the help of the Postman CLI and the Postman API, you can run Postman collections with your API tests as part of your Jenkins pipeline. First generate the Postman CLI configuration code in Postman. Then add the configuration code to your Jenkins pipeline. Each time a build runs, the Postman CLI runs the collections that contain your tests. You can view the results of your tests in Postman. You can also enforce [API Governance and API Security rules](/docs/api-governance/api-definition/api-definition-warnings/#track-governance-and-security-rule-violations-in-cicd) each time the pipeline runs ([Enterprise teams only](https://www.postman.com/pricing/)). Before you begin, make sure you've already [set up an integration](#configure-a-jenkins-integration) between your API and Jenkins. To generate configuration code for the Postman CLI, do the following: 1. Open your API and click **Test and Automation**. 2. Under the repository name, click **View Builds**. 3. Click **Configure Postman CLI**. 4. Select a **Collection** to run during pipeline builds. To be available in the dropdown list, you must first [add the collection as a test suite](/docs/design-apis/api-builder/testing-an-api/#adding-api-tests) to your API. You can also select an **Environment** to use. 5. (Optional) Select the checkbox to enforce API Governance and API Security rules each time the CI/CD pipeline runs ([Enterprise teams only](https://www.postman.com/pricing/)). 6. Select the **Operating system** for your CI/CD pipeline. 7. Click **Copy Postman CLI Command** to copy the Postman CLI configuration. Generate the Postman CLI configuration To add the Postman CLI configuration to your Jenkins pipeline, do the following: 1. Open your pipeline project in Jenkins and click **Configure**. 2. Paste the Postman CLI configuration you copied from Postman into the **Pipeline script**. Then, do the following: * Replace `your_nodejs_configured_tool_name` with the name of your Node.js tool, for example, `node`. * Replace all instances of `$POSTMAN_API_KEY` with a valid [Postman API Key](/docs/developer/postman-api/authentication/#generate-a-postman-api-key). 3. Click **Save** and then run the pipeline using the new configuration. 4. To view the test results in Postman, open your API and click **Test and Automation**. For more help, see [View collection run details](#view-collection-run-details).