API Source Update for SAP Fieldglass Question

I am having to add a few custom attribute to SAP Fieldglass and to do that I need to update the source using the source API however the documentation for the connector has what looks like an IIQ example versus an ISC/IDN example.

I got as far as this body as there are no examples in the API documentation for this path:

{
    "op": "add",
    "path": "/jsonPathMappingForReports",
    "value": {
        "Business Unit": {
            "userReportAttrName": null,
            "workerReportAttrName": "Business Unit"
        }
    }
  }

I basically get a method not allowed. The doc says to do a patch as it is a partial update. Anybody has done this for SAP Fieldglass? Really appreciate any guidance. Thanks.

Hi @pdegraaffiam , can you share the full API call, i.e. what is the method and endpoint used also. I believe you are trying to update/patch the connector for the jsonPathMappingForReports attribute.

Here is the endpoint: https://xxxx.com/v3/sources/idnumber

I am doing a PATCH based on the API documentation.

The connector doc says to do the following:

  1. Add the json mapping for the attribute under the <entrykey=“jsonPathMappingForReports”> via rest api to the source.For example,

example entry for currency field <entry key="Currency"> <value> <Map> <entry key="userReportAttrName" value="Currency"/> <entry key="workerReportAttrName"/> </Map> </value></entry>

They do not say what API to use so I assume an update on the source as when I pull the source back I see the path mentioned.

The example above looks like an IIQ example however.

Any help is appreciated.

hi @pdegraaffiam

Can you try following request body -

{
    "op": "add",
    "path": "/connectorAttributes/jsonPathMappingForReports",
    "value": {
        "Business Unit": {
            "userReportAttrName": null,
            "workerReportAttrName": "Business Unit"
        }
    }
  }

Here is what happens. When I use your suggestion (thanks) I get a 404 which I assume means the path is wrong. When I remove the connectorAttributes and the /. I get a bad request.

The request was syntactically correct but its content is semantically invalid."

I tried even the example shown in the doc and that does not work and get the same errors. So I believe the doc maybe wrong. Hoping to hear from support what I am doing wrong here?

Thanks for your help.

Paul

Hi @pdegraaffiam

I used the same PATCH API and the request body I shared earlier today worked for me.

However, can you try to do a PUT and update the whole source?

  1. Get the full source JSON using following API -

API -

GET https://{{tenant}}.api.identitynow.com/v3/sources/:id

Using the full response from this API, add the “Business Unit” attribute value in the jsonPathMappingForReports array -

        "jsonPathMappingForReports": {
            "Deactivation Date": {
                "userReportAttrName": "Deactivation Date",
                "workerReportAttrName": null
            },
            .
            .
            .
            .
            .
            .
            .
           "Business Unit": {
            "userReportAttrName": null,
            "workerReportAttrName": "Business Unit"
             }
        }
  1. Run the PUT api with the the full JSON body which includes “Business Unit” attribute within jsonPathMappingForReports
PUT  https://{{tenant}}.api.identitynow.com/v3/sources/:id

Request body : Full source json

I got the same type of error. I will try it on another environment and see if it is environmental. thanks for your guidance really appreciate it.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.