Table API Post on M2M table ignoring links
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 07:03 AM
Hello.
I am trying to execute a call to Table API to create an entry in a M2M table.
Using the Rest API Explorer all works well.
But when I try the snippets (CURL or Javascript) the entry is created without link.
This is the CURL of the entry I am trying:
curl "https://dev121882.service-now.com/api/now/table/cmdb_m2m_business_process_ci" \ --request POST \ --header "Accept:application/json" \ --header "Content-Type:application/json" \ --data "{\"cmdb_ci\":\"31f10c8b475ef91034b5ba48436d43c3\",\"business_process\":\"132a39fa4726311034b5ba48436d4390\"}" \ --user 'admin':'admin'
It should create an entry in the table `cmdb_m2m_business_process_ci`. If run directly from the Rest API Explorer page, the entry is created.
Trying to run the same in Postman or similar (including using the generated Javascript or Python code) the entry is created but the two link fields are empty.
Looks like the data is ignored or not well recognized.
And I receive no errors telling me what the problem is.
Help is appreciated.