All API requests must be authenticated using NTLM. If API key authentication is enabled on your Hubstream instance, the API key must also be included in every request alongside the NTLM credentials.
Example curl Request Commands
The following examples show how to connect to the Hubstream API using curl.
Method 1 – NTLM
Template
bash
curl --header "Accept-Language: en" \
--http1.1 \
--insecure \
--verbose \
--ntlm \
--user "{device-name}\{username}:{password}" \
-X {METHOD} \
"{Base URL}/{endpoint}" \
-H "Content-Type: application/json" \
-d '{request body}'| Parameter | Description |
|---|---|
| METHOD | HTTP method - GET or POST |
| device-name | Your device or system name |
| username | Username used to sign in to the Hubstream instance |
| password | Password used to sign in to the Hubstream instance |
| Base URL | Your Hubstream host URL (for example, https://hubstreamproduction.hubstreamonline.com or localhost) |
| endpoint | API endpoint path (for example, api/v2/app/userInfo) |
| -d | Request body. Required mostly for POST requests |
Example 1 – POST (assign an entity)
Multi-line format (for readability):
bash
curl --header "Accept-Language: en" \
--http1.1 \
--insecure \
--verbose \
--ntlm \
--user "device-name1\jdoe:P@ssw0rd" \
-X POST \
"https://hubstreamproduction.hubstreamonline.com/api/data/write/AssignDataWriter" \
-H "Content-Type: application/json" \
-d '{
"EntityName": "Investigation",
"Parameter": {
"Ids": [4],
"Items": [
{
"ID": "107",
"LinkName": "Related Entities",
"LinkGUID": "af3b6df9-4418-4901-a168-a9bb87787d31",
"IsDeleted": true
},
{
"ID": "113",
"LinkName": "Related Entities",
"IsNew": true
}
]
}
}'Single-line format (for terminal use):
bash
curl --header "Accept-Language: en" --http1.1 --insecure --verbose --ntlm --user "device-name1\jdoe:P@ssw0rd" -X POST "https://hubstreamproduction.hubstreamonline.com/api/data/write/AssignDataWriter" -H "Content-Type: application/json" -d "{\"EntityName\":\"Investigation\",\"Parameter\":{\"Ids\":[4],\"Items\":[{\"ID\":\"107\",\"LinkName\":\"Related Entities\",\"LinkGUID\":\"af3b6df9-4418-4901-a168-a9bb87787d31\",\"IsDeleted\":true},{\"ID\":\"113\",\"LinkName\":\"Related Entities\",\"IsNew\":true}]}}"Example 2 – GET (retrieve user information)
Multi-line format (for readability):
bash
curl --header "Accept-Language: en" \
--http1.1 \
--insecure \
--verbose \
--ntlm \
--user "device-name1\jdoe:P@ssw0rd" \
-X GET \
"https://hubstreamproduction.hubstreamonline.com/api/app/userinfo"Single-line format (for terminal use):
bash
curl --header "Accept-Language: en" --http1.1 --insecure --verbose --ntlm --user "device-name1\jdoe:P@ssw0rd" -X GET "https://hubstreamproduction.hubstreamonline.com/api/app/userinfo"Method 2 – NTLM + API Key
Use when API key authentication is enabled on your Hubstream instance. Both NTLM credentials and the API key are required.
Template
bash
curl --header "Accept-Language: en" \
--http1.1 \
--insecure \
--verbose \
--ntlm \
--user "{device-name}\{username}:{password}" \
-X {METHOD} \
"{Base URL}/{endpoint}" \
-H "X-Hubstream-API-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{request body}'| Parameter | Description |
|---|---|
| METHOD | HTTP method - GET or POST |
| device-name | Your device or system name |
| username | Username used to sign in to the Hubstream instance |
| password | Password used to sign in to the Hubstream instance |
| Base URL | Hubstream host URL (for example, https://hubstreamproduction.hubstreamonline.com or localhost) |
| endpoint | API endpoint path |
| your-api-key | API key provided by Hubstream |
| -d | Request body. Required mostly for POST requests |
Example 1 – POST (assign an entity)
Multi-line format (for readability):
bash
curl --header "Accept-Language: en" \
--http1.1 \
--insecure \
--verbose \
--ntlm \
--user "device-name1\jdoe:P@ssw0rd" \
-X POST \
"https://hubstreamproduction.hubstreamonline.com/api/data/write/AssignDataWriter" \
-H "X-Hubstream-API-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"EntityName": "Investigation",
"Parameter": {
"Ids": [4],
"Items": [
{
"ID": "107",
"LinkName": "Related Entities",
"LinkGUID": "af3b6df9-4418-4901-a168-a9bb87787d31",
"IsDeleted": true
},
{
"ID": "113",
"LinkName": "Related Entities",
"IsNew": true
}
]
}
}'Single-line format (for terminal use):
bash
curl --header "Accept-Language: en" --http1.1 --insecure --verbose --ntlm --user "device-name1\jdoe:P@ssw0rd" -X POST "https://hubstreamproduction.hubstreamonline.com/api/data/write/AssignDataWriter" -H "X-Hubstream-API-Key: <your-api-key>" -H "Content-Type: application/json" -d "{\"EntityName\":\"Investigation\",\"Parameter\":{\"Ids\":[4],\"Items\":[{\"ID\":\"107\",\"LinkName\":\"Related Entities\",\"LinkGUID\":\"af3b6df9-4418-4901-a168-a9bb87787d31\",\"IsDeleted\":true},{\"ID\":\"113\",\"LinkName\":\"Related Entities\",\"IsNew\":true}]}}"Example 2 – GET (retrieve user information)
Multi-line format (for readability):
bash
curl --header "Accept-Language: en" \
--http1.1 \
--insecure \
--verbose \
--ntlm \
--user "device-name1\jdoe:P@ssw0rd" \
-X GET \
"https://hubstreamproduction.hubstreamonline.com/api/app/userinfo" \
-H "X-Hubstream-API-Key: <your-api-key>"Single-line format (for terminal use):
bash
curl --header "Accept-Language: en" --http1.1 --insecure --verbose --ntlm --user "device-name1\jdoe:P@ssw0rd" -X GET "https://hubstreamproduction.hubstreamonline.com/api/app/userinfo" -H "X-Hubstream-API-Key: <your-api-key>"