How to create a custom table using REST API?

astha8
Kilo Contributor

Hi,

I am facing some issues while creating custom tables using rest API. I wanted to ask some questions related to JSON that needs to be

posted to sys_db_object table, in order to create a custom table.

1. what are the compulsory fields that need to be provided to create a table?

2. To specify user_role and super_class a reference value needs to be given. How to get these values?

3. How to create a new user_role using API?

Thanks!

2 REPLIES 2

Alikutty A
Tera Sage

Hi Astha,



You should create a new table entry using POST method, Provide these field in your request body.



Label : Table Name


Name: Internal Name


Extends table: Provide SYS_ID of your extended table record (for eg: Task table sys_id = 8921f2b7db332200191a5901cf9619c0)


User Role: Provide SYS_ID of your Role


find_real_file.png



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Hi,



Thanks for pointing out that the reference Ids are actually sys_id, this will solve the problem for getting the reference of tables I want to extend (by fetching the values for all the tables). But, for user_role I need to operate on sys_user_role table, and get or post request to this table is actually forbidden(403). Can you please let me know how to get around that?



Please look at the earlier post How to get reference value for user role and super class? for more details. I am not sure what values to give for fields with link in them.