REST API view/list

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
btrade
User
Posts: 357

REST API view/list

Post by btrade »

Hi,
I first time use rest api in PHPMaker 2020 (trial version) for test and see this message
{"success":false,"failureMessage":"You do not have permission to access \/crm\/api\/index.php.","version":"16.0.0"}

I run URL demo5/crm/api/?action=view&object=articles&id=64

What is a reason "You don't have permission"?


arbei
User
Posts: 9419

Post by arbei »

If the table "articles" is protected by User Level Security, you cannot access the table without logging in first. See the topic REST API > Authenticate User with JWT (JSON Web Token) in the help file.


btrade
User
Posts: 357

Post by btrade »

Thanks you. It is solved.

Now I want to have data whith help other field (whiout ID)

demo5/crm/api/?action=view&object=articles&link=home
It is dont work.

demo5/crm/api/?action=view&object=articles&id=64
It is work.


btrade
User
Posts: 357

Post by btrade »

How to use this method demo5/crm/api/?action=view&object=articles&link=home ???


arbei
User
Posts: 9419

Post by arbei »

Without primary key field you cannot find the record to view.


btrade
User
Posts: 357

Post by btrade »

I understood. okay. Thanks you


kaldiris
User
Posts: 58

Post by kaldiris »

Hi btrade

I Loved if you post your example about this here.
I Dont understend how to use API with PHPMaker.
I Need one full example.

Thanks a lot.


arbei
User
Posts: 9419

Post by arbei »

Read the topic REST API in the help file, there are examples.


Post Reply