IRE Rule On ServiceNow CMDB - servicenow

I have created an Identification rule on IP Network CMDB table in ServiceNow -
IRE Rule and this works perfectly fine to tackle with duplicate records when using Transform map on import set to dump data into the CMDB table.
However, the same IRE doesn't work when I try posting record via ServiceNow REST API directly to the CMDB table, when posting the same record twice it accepts it without any error.
I thought IRE rules once set are applied on CMDB tables and works for every transactions on them, but it doesn't seem to the case.
Can someone please help me understand, why IRE rules are not working when using REST API to post records directly to CMDB table ?

I found the solution to this problem - we simply have to use the REST API for IRE from servicenow looks like this: https://<host_name>.service-now.com/api/now/identifyreconcile?sysparm_data_source=ImportSet

There is a special API to honour the IRE
https://developer.servicenow.com/dev.do#!/reference/api/paris/rest/c_IdentifyReconcileAPI

Related

Assigned to field in Case Table- Servicenow

In Case Form,Based on the group selected in Assignment group field ,the assigned to field is listing some users which belongs to it in CRM UI.
Now I want to retrieve the same users using normal REST API. Please suggest REST API to list the users based on a group.
Users linked to groups is stored in table sys_user_grmember. In the example I search for all Users in Group named "Application Development".
GET https://YOURINSTANCE.service-now.com/api/now/table/sys_user_grmember?sysparm_query=%22groupSTARTSWITHApplication%20Development%22&sysparm_limit=10
You can easily test the REST Api with the rest api explorer from SNOW: https://YOURINSTANCE.service-now.com/nav_to.do?uri=%2F$restapi.do
Can you give more info on the exact requirement, so i can be more precise?
As far as I know, you can create a rest message to get the users inside a group and show the list wherever you want.
This would require three things from your side.
a) Creating a rest message in Snow.
b) Creating a script includes calling the rest message.
c) A client script or trigger which initiates the rest call using client script.
Hope this helps.
Regards.

Bulk and Batch Rest API to get object values

Do we have bulk and batch Rest API to get the customer service object (like contacts,accounts,partner etc) values. If yes, Please provide detailed information. It will helpful for us.
Thanks in advance
There is 2 ways to go about doing this:
You can use the Table API (bad, but hey that is OOTB). Look up
for REST API Explorer and select the Table API in the API
Name to fetch multiple records from a table from ServiceNow, or;
You can create your own REST API (better) to basically return
what ever you want...

unable to get values from PER_ASSIGNMENT_SECURED_LIST_V table?

I am working in oracle hcm fusion application. Writing a extract rule for a batch loader fast formula. in one of the extract rule formula i am using a DBI PER_HIST_ASG_ASSIGNMENT_NUMBER but it returning 0, that is no values in DBI. The problem is the DBI internally refer a secured view PER_ASSIGNMENT_SECURED_LIST_V. If I query this table from BI publisher I am not getting any rows. Some one suggest that Data role is missing. Can anyone tell me what is the exact datarole that I should add to acces the values from that DBI.
This View is based on security profile added in the Employment like BU,Department,Location etc.
So you try to retrieve the records from a Super User or Implementation user which is not attached any security profile, You will get the results.
Data roles are configured differently for each organization that is using the Cloud.
So you have to check with your application security consultant for the exact data role you need for this table.

RethinkDB: How to iterate over every single row in a table

I am creating an ldapjs server to provide an LDAP interface to users stored in a ReactiveDB. When a 3rd-party app performs an LDAP search for users, I want to iterate over all rows in a RethinkDB users table and send them in LDAP form.
According to the RethinkDB docs, r.table('users').getAll() will return nothing.
It seems like I might be able to do r.table('users').filter(() => true) but that would be a hack.
Is RethinkDB trying to discourage getting all rows? Unfortunately that's just what I need so that OwnCloud can sync in all of the available users via its LDAP Auth Backend.
I figured it out, simply using r.table('users') returns all documents in the table according to https://www.rethinkdb.com/api/javascript/table/. Filtering options chained after table() are not required.

WebAPI - odata service adding ForeignKey

i am building my the model using ODataModelBuilder, i am trying to create navigation property however in the metadata i dont see any foreginkey indication, in my solution i am not using EF, so there is no foreignKey attribute, is it possible to add it by code?
As you clarified in your comment, the reason you want to add foreign key information is because your client application is not including related entities when you query the main entity. I don't think foreign keys are the problem here.
As an example, I'll use two entity types: Customer and Order. Every Customer has some number of associated Orders, so I have a navigation property on Customer called Orders that points to a collection of Orders. If I issue a GET request to /MyService.svc/Customers(1), the server will respond with all of the Customer's information as well as URLs that point to the related Order entities*. I won't, by default, get the data of each related Order within the same payload.
If you want a request to Customers(1) to include all of the data of its associated Orders, you would add the $expand query option to the request URI: /MyService.svc/Customers(1)?$expand=Orders. Using the WCF Data Services client (DataServiceContext), you can do this with .Expand():
DataServiceQuery<Customer> query = context.Customers.Expand("Orders");
However, WebAPI OData doesn't currently support $expand (the latest nightly builds do though, so this will change soon).
The other approach would be to make a separate request to fill in the missing Order data. You can use the LoadProperty() method to do this:
context.LoadProperty(customer, "Orders");
The LoadProperty approach should work with WebAPI as it stands today.
I know this doesn't answer your original question, but I hope addresses your intent.
*In JSON, which is the default format for WebAPI OData services, no links will show up on the wire, but they are still there "in spirit". The client is expected to be able to compute them on its own, which the WCF Data Services Client does.

Resources