API add tag to document error Method \"POST\" not allowed

When things don't work as they should.
Post Reply
Mise
Posts: 13
Joined: Sun Dec 19, 2021 2:48 pm

API add tag to document error Method \"POST\" not allowed

Post by Mise »

Book explore Mayan EDMS, p.250:
POST /documents/{document_pk}/tags/
documents_tags_create
Attach a tag to a document.
Parameters:
– data (body) (required)
[Schema: NewDocumentTag (page 283)]

command:
curl -u admin:XHJVjCjDrq -X POST "http://192.168.64.80/api/v4/documents/2/tags/" -H "accept: application/json" -H "Cont
ent-Type: application/json" -d "{\"pk_tag\":\"3\"}"

{"detail":"Method \"POST\" not allowed."}
User avatar
rosarior
Developer
Developer
Posts: 688
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: API add tag to document error Method \"POST\" not allowed

Post by rosarior »

The API was updated in version 4.0. There are now 3 endpoints for working with document tags.
2021-12-21_05-25.png
2021-12-21_05-25.png (88.23 KiB) Viewed 333 times
Refer to the live API documentation for the latest API endpoint versions.
2021-12-21_05-26.png
2021-12-21_05-26.png (73.85 KiB) Viewed 333 times
Mise
Posts: 13
Joined: Sun Dec 19, 2021 2:48 pm

Re: API add tag to document error Method \"POST\" not allowed

Post by Mise »

Thanks a lot.
Post Reply