Cannot add attachment linked_url via http API
Hi all,
I am having a problem getting an attachment containing a link posted to a group library. I want to attach a link to an url to an existing item in a group library. So far I came to this curl equivalent with postman:
curl -X POST \
'http://api.zotero.org/groups/2100546/items?v=3&key=myapikey' \
-H 'Accept: */*' \
-H 'Content-Type: application/json' \
-H 'Zotero-Write-Token: 6ee22qnnkoq4u0eh6q9bxrqvahpk6u9j' \
-H 'cache-control: no-cache' \
-d '[
{
"itemType": "attachment",
"parentItem": "7MNFBCDZ",
"linkMode": "linked_url",
"title": "Podio Link",
"accessDate": "2012-03-14T17:45:54Z",
"url": "https://thelink.com",
"note": "",
"tags": [],
"collections": [],
"relations": {},
"contentType": "",
"charset": ""
}
]'
But like this I am getting a list of the items in the group library as a response. No trace of the supposed new attachment item....
On https://www.zotero.org/support/dev/web_api/v3/file_upload#ii_create_child_attachment_item the path in the example is for a user - since it's a group library, I should enter the group identifier there, I suppose?
What am I doing wrong here?
greetings
I am having a problem getting an attachment containing a link posted to a group library. I want to attach a link to an url to an existing item in a group library. So far I came to this curl equivalent with postman:
curl -X POST \
'http://api.zotero.org/groups/2100546/items?v=3&key=myapikey' \
-H 'Accept: */*' \
-H 'Content-Type: application/json' \
-H 'Zotero-Write-Token: 6ee22qnnkoq4u0eh6q9bxrqvahpk6u9j' \
-H 'cache-control: no-cache' \
-d '[
{
"itemType": "attachment",
"parentItem": "7MNFBCDZ",
"linkMode": "linked_url",
"title": "Podio Link",
"accessDate": "2012-03-14T17:45:54Z",
"url": "https://thelink.com",
"note": "",
"tags": [],
"collections": [],
"relations": {},
"contentType": "",
"charset": ""
}
]'
But like this I am getting a list of the items in the group library as a response. No trace of the supposed new attachment item....
On https://www.zotero.org/support/dev/web_api/v3/file_upload#ii_create_child_attachment_item the path in the example is for a user - since it's a group library, I should enter the group identifier there, I suppose?
What am I doing wrong here?
greetings
-
mmooleAh well, yes, one should really use https instead of http - then it is working as it should :-)