Hi
Sorry my bad english, but i try.I need use REST API, but not work.My PHPMaker 2020.10 Ajusted:
API NT signing secret key = 123456
API NT signing algorithm = HS512
API NT authorization header = X-Authorization
API access time after login (seconds) = 0
API expire time after login (seconds) = 172800
API Access-ControI-A110A-Origin header =
Generate all project in my Localhost with IISAnd Project work fine.When send in postman:
POST = localhost ativos api action=view object=links id=54
Authorization = No Auth{success:false,failureMessage:Voce nao tem permissao para acessar ativos api index.php version 16.0.10When ajuste in postman ti Authorization = API KEY and X-Authorization and Bearer 123456 and Header
Return this erro : Slim Application Error A website error has occurred. Sorry for the temporary inconvenience.I dont now, how to this work
I read in PHPMaker help, but not understande how to build this.
Help. I Need one example if is possible.Thanks a Lot.
Hi.I try to generated my project without security options.
YES… Work Fine in postman…
POST = http: / localhost /ativos /api / ? action = view & object = links & id=55
Autorization = No Authand i see this return:
{
“success”: true,
“links”: {
“id”: “55”,
“Nome”: “Editor Texto Compartilhado”,
“URL”: “collabedit.com”,
“Grupo”: “DEVELOPER”,
“ArquivoPDF”: null,
“Img_db”: null,
“Img_Nome”: null,
“Img_Extensao”: null,
“Img_Tamanho”: null,
“Img_Largura”: null,
“Img_Altura”: null
},
“version”: “16.0.10”
}I now… the problem is login… but i dont understend how to solve this.
I continue try…
If you use security, you need to login first, read the topic REST API in the help file.
Thanks for your answer.I understand that I have to login. But I can’t do that.
I’ve read the help 10 times and still don’t understand how to do it.If I log into the system normally through the login screen, it doesn’t work either.And I can’t use JWTBut I will keep trying until I get it.
If you have any simpler example that I can try, you are most welcome.
kaldiris wrote:
And I can’t use JWTThe REST API requires login by JWT.
WORK FINE !
First i get the JWT return
GET localhost / AppName / api / ?action=login&username=XXXXX&password=YYYYYYYI put in another tab…
GET localhost / AppName / api / ?action=list&object=tablename
and Includ Header parameter Key = X-Authorization and value “Bearer hjsghdfhjkdfhlajhdfçsdalhfjhdfsa…”
OBS: Value is a word Bearer, one space and JWT return…
Just it and work fine.
- REST API ADD not work yet for me. Create registry in database, but data in field is blank.
- Number records return is iqual a value defined in project. I like all registry when use API. Like LIST.
Thats it.
Thanks a LOT for your help
kaldiris wrote:
- REST API ADD not work yet for me. Create registry in database, but data in field is blank.
If you use User Level Security in your project, make sure the user has “Add” permission.Number records return is iqual a value defined in project. I like all registry when use API. Like LIST.You may pass the “recperpage” parameter (e.g. a very large number") and “start” parameter when you use the “list” action, see the description in the topic REST API in the help file.