404 "Detail Not Found"

Anything concerning integration via the REST API
Post Reply
jason_29
Posts: 7
Joined: Fri Dec 06, 2019 3:09 pm

404 "Detail Not Found"

Post by jason_29 »

Using some of the API calls and at times I get detailed not found in return ?

Any way to find out what details I am missing ... in the book ? or using the rest api ?

User avatar
rosarior
Developer
Developer
Posts: 519
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: 404 "Detail Not Found"

Post by rosarior »

Can you expand on that? Is it a specific API call that returns 404 at random or the entire API?

jason_29
Posts: 7
Joined: Fri Dec 06, 2019 3:09 pm

Re: 404 "Detail Not Found"

Post by jason_29 »

using Swagger and under checkout

-get "/checkouts/{id}/checkout_info/"
-delete "/checkouts/{id}/checkout_info/

I enter the document id but get 404

User avatar
rosarior
Developer
Developer
Posts: 519
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: 404 "Detail Not Found"

Post by rosarior »

For what version is this?

Also to view the checkout details of a document, two permissions are required: Document View and Check out details view.

jason_29
Posts: 7
Joined: Fri Dec 06, 2019 3:09 pm

Re: 404 "Detail Not Found"

Post by jason_29 »

running mayan version 3.3.4

I am running as the super user ? or do I need to create another user to do this

User avatar
rosarior
Developer
Developer
Posts: 519
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: 404 "Detail Not Found"

Post by rosarior »

I understand now. The issue is the ID number itself.

The ID number of the checkout API is not the document ID. Checkouts have their own ID sequence. Checkouts are like tickets or stubs that evidence that a document has been checked out.

They have their own ID number because they are a separate database table from documents. From the API point of view they are resource separate from documents.

User avatar
rosarior
Developer
Developer
Posts: 519
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: 404 "Detail Not Found"

Post by rosarior »

The checkout serializer was updated to show its own ID and URL besides the document information.

Commit here: https://gitlab.com/mayan-edms/mayan-edm ... 0d41dea8e8

This will be available in the next bugfix version (3.3.5).

Thanks for the report.

jason_29
Posts: 7
Joined: Fri Dec 06, 2019 3:09 pm

Re: 404 "Detail Not Found"

Post by jason_29 »

Great Thanks !

Where would I look for checkout id ? I don't see anything in the get "/checkouts/ checkouts_list"

just curious

jason_29
Posts: 7
Joined: Fri Dec 06, 2019 3:09 pm

Re: 404 "Detail Not Found"

Post by jason_29 »

nvm; I see it in swagger if I check in a document ... I get a new id number.

thanks again !

User avatar
rosarior
Developer
Developer
Posts: 519
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: 404 "Detail Not Found"

Post by rosarior »

Yes, the ID is given at the moment of the checkout creation. The commit linked here: https://gitlab.com/mayan-edms/mayan-edm ... 0d41dea8e8 makes the ID appear in the checkout list view ('/checkouts/'), in case the ID was not recorded at creation.

Post Reply