# Connect via API

Follow the instructions below to connect Violet to Teamcenter via API.

{% hint style="info" %}
Connecting directly to the Teamcenter database and bypassing the API is recommended for faster performance. To use that method, skip ahead to the instructions [here](https://docs.violetlabs.com/apps/t/teamcenter/connect-direct-to-database).\
\
If you wish to connect to TeamcenterX, head to the instructions [here](https://docs.violetlabs.com/apps/t/teamcenter/connect-teamcenter-x).
{% endhint %}

### Configure access

First, you'll need to ensure Violet can access Teamcenter via one of the below methods:

<details>

<summary>Option 1: Access via Allow List</summary>

Add the applicable IP addresses to the allow list for the server hosting your Teamcenter environment:

{% hint style="info" %}
**Violet's IP Addresses**

For **Violet:**

* *Production*: 50.19.87.143
* *Staging*: 34.204.135.202

For **VioletGov**:

* *Production*: 3.31.169.141
* *Staging*: 3.30.99.219
  {% endhint %}

</details>

<details>

<summary>Option 2: Access via VPN</summary>

For added security, we can establish a VPN tunnel. This will connect Violet’s AWS VPC and the network where your Teamcenter environment is hosted.&#x20;

We recommend [Tailscale](https://tailscale.com/) VPN, but support any method you require, like IPsec VPN or AWS PrivateLink. More info [here](https://docs.violetlabs.com/resources/administrative/connect-self-hosted-software/vpn-tunnel).

</details>

### **Create a service account** <a href="#id-2-create-violet-teamcenter-account" id="id-2-create-violet-teamcenter-account"></a>

We suggest that you create a dedicated read-only Teamcenter account that can be used as a service account for Violet integrations and syncs. This helps prevent ambiguity in your data, and it will allow the Violet team to most reliably test and maintain your integration.&#x20;

In addition, if you don't have Active Workspace, this will be required to allow Violet to access the REST API without locking out another user.

You can securely share credentials with the Violet team on the **Credentials** page.

### Connect Teamcenter

1. In [Violet](https://app.violetlabs.com/) (or [VioletGov](https://app.violetgov.com/)), navigate to **Integrations** and click  <img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FtlFf29W81Xw97AUJ5zwb%2FScreenshot%202026-02-19%20at%201.13.34%E2%80%AFPM.png?alt=media&#x26;token=c80f613a-d379-4cd4-a5c8-9c04e63e37ea" alt="" data-size="line"> to add a new integration.&#x20;
2. Select <img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FFxrrZ81rsZ5MhbdFvNpO%2Fteamcenter.png?alt=media&#x26;token=ed10a4ab-13f4-4f05-bd85-ea9db426d31c" alt="" data-size="line">**Teamcenter**

\[Optional] You can also provide a unique name for the connection based on the credentials you're using, and you can create **restricted permissions** to users or groups:

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FLNq8XfPFudyBudwAhJwe%2Fpermissions.png?alt=media&#x26;token=502752e3-2f38-4c8b-8fa0-2ff8b3a5a19a" alt="" width="375"><figcaption></figcaption></figure>

3. Enter the server URL followed by the port number you selected during configuration (typically `:8080`).&#x20;
4. Enter your Teamcenter username and password, then click **Connect.**
   1. You are free to use your own user account or a service account. We typically recommend using a service account to avoid ambiguity in your data, especially for larger organizations.

<figure><img src="https://2091741164-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvrraExym8pNEUvBDoima%2Fuploads%2FWyPxm2pVATxZuCY0gAkD%2FTeamcenterIntegration.png?alt=media&#x26;token=702358d5-24a6-45c7-9540-08b2a453aa06" alt="" width="375"><figcaption></figcaption></figure>

Once your connection is live, you're ready to [set up your Teamcenter integration](https://docs.violetlabs.com/apps/t/teamcenter/setting-up-your-integration).

### Troubleshooting

<details>

<summary>Confirm your Teamcenter is running JsonRestServices</summary>

Your Teamcenter instance will need to be running `JsonRestServices` in order to allow Violet to connect. For most implementations, this should be enabled out of the box.&#x20;

If you're not sure whether your instance is running `JsonRestServices`, you can run the quick test below:

1. Open a web browser and navigate to: <http://yourteamcenter.yourdomain.com:8080/tc/JsonRestServices>
   1. (Note, replace `yourteamcenter.yourdomain.com` with the location of your Teamcenter sever).
2. You should see an error page with the below error message. This confirms that JsonRestServices are running at that endpoint.

`The request could not be understood by the server due to malformed syntax.`&#x20;

If you see a response other than this message, you may not have JsonRestServices enabled. We'll need to connect with your Teamcenter implementation team to enable this.

</details>

<details>

<summary>Port selection and SSL</summary>

1. By default, Violet will connect to port TCP:8080 on your Teamcenter server. If you prefer to use a different port, let us know. Any port is fine as long as JsonRestServices is available there.
2. To ensure that the connection between Violet and Teamcenter is secure, it is important that the endpoint on your Teamcenter server is protected with a **valid SSL certificate.**

</details>

<details>

<summary>Teamcenter Active Workspace and file ingestion</summary>

If you are using Teamcenter Active Workspace, which is required if you wish to ingest files, we will also need to communicate with port 3000.

</details>
