Assign an Entity
Assign one or more users to one or more entities.
HTTP Method
POST
Endpoint
/api/data/write/AssignDataWriter
Request URL
{Base URL}/api/data/write/AssignDataWriter
Sample Request Body
{
"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
}
]
}
}
Parameters
| Param Name | Data Type | Description |
|---|---|---|
| EntityName | String | Name of the entity type (for example, Investigation). |
| Ids | Integer | List of entity IDs to which users will be assigned. Example: “Ids”: [1, 2] |
| ID | Integer | Unique identifier of the user. |
| LinkName | String | Name of the relationship (for example, Related Entities). |
| IsNew | Boolean | true or false. Indicates whether the link is newly created. Set to true to create a new link. |
| IsDeleted | Boolean | true or false. Indicates whether to delete an existing link. Set to true to remove the link. |
Missing or invalid credentials returns an error.
Curl Example
Multi-line format (for readability):
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):
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}]}}"
Sample Responses
Status code 2XX indicates a successful request and response.
200 OK
Description: Operation succeeded.