You are not logged in.
Pages: 1
Hi all
I'm struggling to assign a user to a computer, both during creation of the computer and when trying to update it.
I've tried using the fields user and users_id, but neither seem to work.
Here's what I'm sending:
options.url = "https://server/apirest.php/Computer/" + computer_id;
options.body = {
"input": {
"name": computer.name,
"users_id": 678
} };
options.headers = {
"Content-Type": "application/json",
"Session-Token": sessionToken.session_token
};
options.json = true;
putData(options)
I get a 200: True response, and the computer name will update, but the user doesn't get added.
Any help greatly appreciated!
Many thanks
David
Offline
Pages: 1