REST API: Access to new hal registers
9-24-24
Operating system: macOS
Hello.
Have issue when try to GET data from new hal custom register

Recordbegin(CustomItemStatusVc,-,"");
RecordField(Code,M4Code,60,INVc);
...



MainKeyBegin(Code,0);
KeySegment(Code);
SynchronizationIndex;
EndRecord;

Using for this http://127.0.0.1:1300/api/1/CustomItemStatusVc

SERP server for each call asks login password. But after entering - nothing happens - server returns 401 error (Unauthorized)
But when I call IVVc or any standard register - then all works fine.
For tests I using UK demo company with common RestAPI setting by superadmin access rights (allowed all).


When I disabled in Optional Features have error in browser
<error description="not authorized to read this resource"/>
This issue only with new registers from datadef.hal

Mayme I miss some settings? Please assist with this.
This answer was useful
Created by17:16 15 Oct 2024
This answer was useful
10-15-24
Hi,

The user you are using with REST API authentication must have access to the register.
To have access to a register the user must be able to navigate to the register in the user interface.
Any register thus must be added to the user interface somewhere where the user has access.

Martins.
Gatis Jansons
10-16-24
On top of having the custom register added to the interface (register's LClass defined for a specific module in Startup).. interface languages matter as well.

Make sure to add the custom register also under:
SetLangMode(LangEnglish,"ENG",0);
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Ibrahim Bashir
Hello, System &gt;&gt; Settings &gt;&gt; Optional Features &gt;&gt; Idle User Timeout (Minutes) this is configured to 15 minutes in my setup. is there a way to make this works per user? or skip s...
04:56 29 Nov 2024
Reino Botha
Please check your version of android if it is the same as the server you are connecting too. ...
08:24 21 Nov 2024