Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read an Archer data element from JSON client

SureshAtmakuru
Contributor II

Hello Team - I am looking for some help to pull the below data from one of my Archer applications in JSON API mode. 

 

Workspace Name: Technology Control Assessments

Application Name: MY Application Repository 

Data elements: Sub-Contractor-ID, Sub-Contractor-Name

 

I need help with a sample JSON code snippet to pull the above data elements. Appreciated your help and thanks in advance.

3 REPLIES 3

DavidPetty
Archer Employee
Archer Employee

Suresh, being you already know the workspace and application name, an API call isn't needed.

 

For data elements, you can use this REST API call, /api/core/system/content/*content id*

 

You can use ODATA to filter just the fields you need.

 

For example:

Projecting

Projecting is accomplished through the use of the OData $select keyword. This allows the caller to specify which properties of the response object should be included in the response. The following example shows a valid OData select to return only the Name and Description properties for a group domain object.

 

               {“Value”:”?$select=Name,Description”}

Filtering

Filtering is accomplished through the use of the OData $filter keyword. Logical Operators are typically used to filter the set of resources.

                         eq                  Equal                   

                         ne                  Not Equal               

                         gt                   Greater Than            

                         ge                  Greater Than or Equal

                         lt                    Less Than

                         le                   Less Than or Equal

                         and                Logical And

                         or                   Logical Or

                         not                Logical Negation

 

This following query returns all resources with id less than 100:

          {“Value”:”?$filter=Id lt 100}

 Advisory Consultant

SureshAtmakuru
Contributor II

Hi David - Thank you. I am unable to open ODATA link as it is saying Unauthorized. Please advise. 

Sorry about that.  I've update my post above on some ODATA examples.

 Advisory Consultant