Hey There,
Currently trying to tag some media and cant work out what i am doing wrong with the Curl command.
I know the call would be similar to:
curl -X POST “http://xibo.org.uk/api/library/246/tag” -H “authorization:XXXXXXX” -H “accept: application/json” -H “Content-Type: application/x-www-form-urlencoded” -d “tag=KitchenTV”
but when i input this into the command line i receive a positive response, however the tags are not updated.
{
“mediaId”: 246,
“ownerId”: 2,
“parentId”: 243,
“name”: “filename.png”,
“mediaType”: “image”,
“storedAs”: “246.png”,
“fileName”: “filename.png”,
“tags”: null,
“fileSize”: “95004”,
“duration”: 30,
“valid”: 1,
“moduleSystemFile”: 0,
“expires”: “0”,
“retired”: “0”,
“isEdited”: “0”,
“md5”: “xxxxxx”,
“owner”: “xxxxxx”,
“groupsWithPermissions”: null,
“released”: 1,
“apiRef”: null,
“createdDt”: “2018-06-05 07:38:10”,
“modifiedDt”: “2018-06-05 13:35:33”,
“isSaveRequired”: false,
“isRemote”: null,
“cloned”: false,
“newExpiry”: null,
“alwaysCopy”: false
}
Looking at the API documentation i see the tags need to be in an array aswell. I’ve also tried
curl -X POST “http://xibo.org.uk/api//library/246/tag” -H “authorization:XXXXXXX” -H “accept: application/json” -H “Content-Type: application/x-www-form-urlencoded” -d “tag=array(KitchenTV,test1)”
which doesn’t seem to work.
Have been testing in Curl first until i get it working and then converting it to powershell.
Cheers,
Sam