000033884 - How to find RSA Archer Field information for a given Field Id using REST API instead of a SQL query

Document created by RSA Customer Support Employee on Aug 30, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 3Show Document
  • View in full screen mode

Article Content

Article Number000033884
Applies ToRSA Product Set: Archer
RSA Product/Service Type: Archer
RSA Version/Condition: 5.x, 6.x
IssueHow to find field information for a given Field Id using REST API instead of a SQL query.
The Archer log file contains exception messages, however it only provides the Field Id.  
The following is a sample exception message from the Archer.ArcherTech.JobFramework.Job.yyyymmdd.xml log file for a bad calculated field.

Attempting to calculate field 3044 of content 338304 resulted in: System.ArgumentException: Value is not a valid number: B2.....
TasksUse the Archer REST API and a browser to get the field information.  
Additional steps can be taken to get the Level and Module (Applications and Questionnaires) information too.
Resolution
  1. Take note of the Field Id.
  2. From a browser, login to Archer.
  3. In the URL, delete everything after the Base URL and append the following after replacing *FieldId* with the Field Id from step 1.
    api/core/system/fielddefinition/*FieldId*?$select=Id,Name,Alias,LevelId

    If using Internet Explorer, you will be prompted to save/open a file.  Open the file in Notepad or other text editor.  The data is in JSON format like the following.
    {"Links":[],"RequestedObject":{"Id":3044,"Name":"Count of Objectives","Alias":"Count_of_Objectives","LevelId":5},"IsSuccessful":true,"ValidationMessages":[]}

    If using Chrome, the data is displayed in XML format on the web page like the following.
    <WebApiRequestResultOfArrayOfKeyValueOfstringanyTypeuHEDJ7Dj xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ArcherTech.Common.Domain.Result">
      <ValidationMessages xmlns:d2p1="http://schemas.datacontract.org/2004/07/ArcherTech.Common.Validation" xmlns="http://schemas.datacontract.org/2004/07/ArcherTech.Common.Domain" />
      <IsSuccessful xmlns="http://schemas.datacontract.org/2004/07/ArcherTech.Common.Domain">true</IsSuccessful>
      <RequestedObject xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/ArcherTech.Common.Domain">
        <d2p1:KeyValueOfstringanyType>
          <d2p1:Key>Id</d2p1:Key>
          <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">3044</d2p1:Value>
        </d2p1:KeyValueOfstringanyType>
        <d2p1:KeyValueOfstringanyType>
          <d2p1:Key>Name</d2p1:Key>
          <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Count of Objectives</d2p1:Value>
        </d2p1:KeyValueOfstringanyType>
        <d2p1:KeyValueOfstringanyType>
          <d2p1:Key>Alias</d2p1:Key>
          <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Count_of_Objectives</d2p1:Value>
        </d2p1:KeyValueOfstringanyType>
        <d2p1:KeyValueOfstringanyType>
          <d2p1:Key>LevelId</d2p1:Key>
          <d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">5</d2p1:Value>
        </d2p1:KeyValueOfstringanyType>
      </RequestedObject>
      <Links />
    </WebApiRequestResultOfArrayOfKeyValueOfstringanyTypeuHEDJ7Dj>

 
  1. To get the Level information, delete everything after the Base URL and append the following after replacing *LevelId* with the Level Id from step 3.
    api/core/system/level/*LevelId*?$select=Id,Name,ModuleId

    Sample results with Level information.
    {"Links":[],"RequestedObject":{"Id":5,"Name":"Section","ModuleId":65},"IsSuccessful":true,"ValidationMessages":[]}

 
  1. To get the Module information, delete everything after the Base URL and append the following after replacing *ModuleId* with the Module Id from step 4.
    api/core/system/application/*ModuleId*?$select=Id,Name,Alias

    Sample results with Module information.
    {"Links":[],"RequestedObject":{"Id":65,"Name":"Policies","Alias":"Policies"},"IsSuccessful":true,"ValidationMessages":[]}

 
  1. If step 5 returns "The resource cannot be found" message, the Module may be a Questionnaire which requires a different URL.  Delete everything after the Base URL and append the following after replacing *ModuleId* with the Module Id from step 4.
    api/core/system/questionnaire/*ModuleId*?$select=Id,Name,Alias

    Sample results for a Questionnaire.
    {"Links":[],"RequestedObject":{"Id":325,"Name":"Facility Assessment","Alias":"Facility_Assessment"},"IsSuccessful":true,"ValidationMessages":[]}

Attachments

    Outcomes