Connecting to the ServiceNow REST API using OAuth2

2»

Comments

  • Mahulima
    Mahulima Contributor

    @Henry Simms

    I have import my existing model which you shared earlier in the beginning which was giving 21 columns.

    Then I have done all these set up

    Now in Configuration Set Up what needs to be done before I download the .rest from here

  • Mahulima
    Mahulima Contributor
    edited July 26

    @Henry Simms

    In the configuration tab I have done like this and then Downloaded the .rest. But Still cant see that table in the dataset list when using the external system

  • Mahulima
    Mahulima Contributor

    @Henry Simms Can you please give some suggestion here. What input should we give in the "Configure Endpoints" so that we can get the Table specific records.

  • Mahulima
    Mahulima Contributor

    @Henry Simms

    In Progress Data Direct I am getting the Output

    But that has also 21 System Columns, If I download this .rest and use that then in Aperture Getting 21 columns only as in Progress Data Direct also I can see only 21 Columns

  • Mahulima
    Mahulima Contributor

    @Henry Simms as in Progress Data Direct also we are getting those 21 System Columns , the downloading of that JSON is not helpful from Progress data Direct. That Downloaded json is also giving me 21 columns. So is manually updating the JSON is the only option?

  • Mahulima
    Mahulima Contributor

    @Henry Simms

    I also tried to add the columns m anually in the JSON But then I am not getting records .

    I have added like this

  • Mahulima
    Mahulima Contributor
    edited August 20

    @Henry Simms I think I am more close now, I am trying to add the columns manually in the rest file. Here in your example you can see the result for other newly added fields too but for me I am only getting the records for SYS_ID. Also I have Observed te column names I mentioned in the rest is not exactly same what I am getting here in Aperture. For example the column name for example I mentioned in the .rest is xxxx.status but here in Aperture I see it is coming as xxxstatus . So is it because here it is unable to take '.' in the column name? in that case the actual column name is not taken and hence now records are fetched for those columns?

    Also you mentioned this addition of columns will be lot faster if we can use Progress Data Direct. Now in Progress Data Direct I can see the records of 21 records but how can i get more there?

  • Mahulima
    Mahulima Contributor

    @Henry Simms

    I am super close now, You also mentioned that we can make this new column addition in Rest file faster with progress Data Direct . I am now getting the records in progress data Direct

    Also in result tab I see more fields with records

    Now if I download this .rest and use that Ideally it should work? But now its not working.

  • Mahulima
    Mahulima Contributor

    @Henry Simms I think now I have found a way to do it. Thanks

  • Henry Simms
    Henry Simms Administrator
    edited August 28

    Great to hear that you have got this working (and sorry to not reply earlier, I've been on holiday for a while!).

    For future reference these are the steps I follow to add config for additional CMDB tables to the .rest file:

    1. Start up the AutoREST Composer. I recommend using the commandline javaw -jar "C:\ApertureDataStudio\drivers\jdbc\DSautorest.jar" --design

    2. Either import your existing .rest file you've created in previous steps, or start with the default pre-built ServiceNow model available in the Composer:

    3. Enter your ServiceNow connection credentials. You can use the OAuth settings discussed in earlier posts, but for sampling I just use the Basic auth (username and password) for simplicity

    4. Click Test Connect to conduct the initial sampling

    5. In the Configure Endpoints tab, click the "+" icon to add a new endpoint, define the path to the table you want to sample, eg https://<instance>.service-now.com/api/now/table/cmdb_ci_appl. Click Send to carry out the sampling and review the returned columns:

    6. Repeat the above for each table you want to include in your .rest file. In the screenshot below I have sampled four tables, cmdb_ci_appl, incident, sys_db_object, and task:

    7. Click Download in the composer to download the .rest file with the newly sampled tables

    The resulting .rest file, just containing the schema for the four tables, is below: