Rest API to get the form layout and fields

Raja16
Tera Contributor

Hi,

Do we have any Rest API to get the form layout and fields for Customer service relationships ( Contact, Account etc). If yes, Please provide the details about that. Otherwise, provide suggestion for how to get it. Thanks!

1 ACCEPTED SOLUTION

Raja16
Tera Contributor

I find the API's and It's worked. We need to achieve this using multiple API's.

https://<<instance_name>>/api/now/table/sys_ui_element?sysparm_query=sys_ui_section.view.name=<<view_name>>&sys_ui_section.name=<<object_name>>

https://<<instance_name>>/api/now/table/sys_dictionary?sysparm_query=name=<<table_name>>^element=<<element_name>>

View solution in original post

10 REPLIES 10

Hi Raja,

So what does it mean input will be CSM object name and view name?

Are you saying you will give the table name and the view name and get the fields present in that view?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Are you saying you will give the table name and the view name and get the fields present in that view? ----> Yes, exactly. that is what i'm trying to say. i need to get fields with attributes.

Is there REST API for this ?

Hi Raja,

 

You can go to REST API explorer into service now there you can use table API and you can pass the table name and in sys_param you can pas the view name and click on send button.

find_real_file.png

 

find_real_file.png

 

Please mark this correct if it resolved the purpose and mark it helpful to if this helped you at all.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

I don't want field values. I need a Meta for the tables ( like customer_contact,customer_account etc ). If you get chance please refer the above conversations.

Raja16
Tera Contributor

I find the API's and It's worked. We need to achieve this using multiple API's.

https://<<instance_name>>/api/now/table/sys_ui_element?sysparm_query=sys_ui_section.view.name=<<view_name>>&sys_ui_section.name=<<object_name>>

https://<<instance_name>>/api/now/table/sys_dictionary?sysparm_query=name=<<table_name>>^element=<<element_name>>