Skip to main content

Hi,

We're trying to upload attachments via the SysAid REST API.
It works on our local environment, but fails from our public environment with a 401 Unauthorized error.

creating SR is successful.

We suspect there might be IP or domain restrictions.
Could you confirm if any such restrictions exist and help us to understand how to allow access from our server IP/domain?

Also, we don’t see a REST API settings or IP Restrictions panel in the admin UI — is it possible to enable this?

Thank you!

Hi there,

SysAid Copilot is here with our AI Magic!

Here is the response we thought might assist you:

## Problem Uploading Attachments via the SysAid REST API

It seems you're encountering a `401 Unauthorized` error when attempting to upload attachments via the SysAid REST API from your public environment. This issue could indeed be related to IP or domain restrictions. Below are steps to help you troubleshoot and resolve the issue:

---

### 1. **Check for IP or Domain Restrictions**
SysAid may have IP or domain restrictions in place for API access. While there isn't a specific "IP Restrictions" panel in the SysAid admin UI, you can verify and configure access as follows:

- **Firewall or Network Configuration**: Ensure that your public server's IP address is allowed to communicate with the SysAid server. Check your firewall or network settings to confirm this.
- **SysAid Server Configuration**: If you're using an on-premise SysAid installation, check the server configuration files for any IP restrictions. These files are typically located in the following directories:
- `...\SysAidServer\conf`
- `...\SysAidServer\root\WEB-INF\conf`

---

### 2. **Enable REST API**
To ensure the REST API is enabled and accessible:
- Navigate to **Settings > Integration > SysAid API** in the SysAid admin portal.
- Verify that the REST API is enabled.
- Confirm that the correct API endpoint is being used. The endpoint format should be:
```
https://yourdomain.sysaid.com/api/v1/
```
Replace `yourdomain` with your actual SysAid domain.

---

### 3. **Verify API Authentication**
The `401 Unauthorized` error typically indicates an issue with authentication. Ensure the following:
- Use a **locally created admin account** with SysAid administrator permissions for API requests.
- Include the correct credentials in your API calls.
- Upon successful login, you should receive a session token or cookie (e.g., `JSESSIONID`). This token must be included in subsequent API requests.

---

### 4. **Test from Public Environment**
To confirm whether the issue is related to IP restrictions:
- Temporarily whitelist your public server's IP address in your firewall or network settings.
- Test the API call again from your public environment.

---

### 5. **Review Logs for Errors**
Check the SysAid server logs for any error messages or warnings that could provide more insight into the issue. Relevant log locations include:
- `...\SysAidServer\logs`
- `...\SysAidServer\root\WEB-INF\logs`

---

### 6. **Contact SysAid Support**
If the issue persists after following the above steps, it may require further investigation by SysAid support. Since a Service Record has already been opened for this request, please update it with the following details:
- The steps you've taken to troubleshoot the issue.
- Any error messages or logs you've encountered.
- The IP address or domain of your public server.

---

By following these steps, you should be able to identify and resolve the issue with uploading attachments via the SysAid REST API. Let me know if you need further assistance!

![ ](https://www.sysaid.com/wp-content/uploads/2022/01/sysaid-logo.png)

Hello ​@ronent 

 

Thank you for the question.


As far as I know, there isn’t an IP restriction panel in the admin UI.

Can you share which API call you’re using and what permissions the account used for the call has? Is it a full SysAid admin?

I think the best next step is to create a ticket with our helpdesk so we can look into it more closely. I’ve already sent a message with your contact details and environment name to get a ticket opened — we’ll continue from there!


Reply