Export data about objects

The endpoint objects returns information about objects in the Alfabet database. In the service call, a preconfigured tabular report must be specified which returns data about a number of objects.

The following information is useful to understand the information about the service call:

  • Each row in the report returns data about a base object. For configured reports returning data about objects of a specific object class, each object is a base object of the report and the base object is different for each row. For reports returning relations, the base object is the object the relation is established for. If an object has multiple relations, the base object will be identical in multiple rows. For example, if the configured report returns data about the assignment of applications to application groups and an application is assigned to two application groups, there will be two rows with this application as base object.
  • Relations between objects are stored as references based on the object class property REFSTR of each object. REFSTR values are unique. If an object class property stores a relation to another object, the REFSTR value of the target object will be stored in the database.
  • REFSTR values are composed of three numbers separated by a dash: 116-123-0. The first number is specific for the object class that the object belongs to and is the same for all objects of the same class. The second number is specific for the object. On object creation, an object is assigned a number +1 of the last created object. The third number is always zero.
  • Some of the object classes in Alfabet are not independent object classes with own database tables but subtypes of a superordinate object class. For example, Physical Server and Virtual Server are both subtypes of the object class Device. The data for both physical servers and virtual servers is written in the database table of the object class Device. The technical term for a subtype used in the following is "object class stereotype".

You can return different sets of information via the endpoint:

Endpoint name: objects

HTTP method: POST

Service call: URLOfTheAlfabetAPIServer/api/v2/objects

Authorization Header: Authorization:TypeValue

Click for details about authorization.

Additional Header Fields: Content-Type: application/json; charset=utf-8

Body: The body is a JSON object with the following structure:

Field Mandatory/Optional Required Value
"Report":"ReportName" Mandatory The name of one of the configured reports that the call shall read data from. Click to view a list of available configured reports and the data returned by each report.
ReportResult:"DataSet/References/Objects" Mandatory ReportResult must be one of the following:
  • DataSet: Use to return all information included in the report.
  • References: Use to return a list of REFSTR values of the objects found in the report.
  • Objects: Use to return all property values set for all objects found in the report.
"Limit" : Number Optional This field defines the maximum number of objects that the response of the call shall return data for. This value may be set to limit data returned for reports including a high number of objects. In combination with the field Offset, this field can be used to fetch the result of a big report in multiple steps.

If Limit is not set, a maximum number of 1000 result data sets of the configured report are returned.

"Offset" : Number Optional This field defines the start position for returning values in the result data set of the configured report. For example, if the Limit field is set to 20 and the Offset is set to 10, the results listed in row 11 to 30 in the tabular output of the configured report are returned in the service call. By default, the start position is the first row in the data set with the number 0.
"ReportArgs":{"DATE":yyyymmdd"} Optional With this field, you can limit the return value to objects changed after the specied date if the report is configured to filter the data by last change date. The filter is available for all reports returning information about objects of a defined object class.

The date must be specified as YYYYMMDD. (for example, 20240125 for 25th of January 2024)

"CurrentProfile":"Portfolio Admin" Mandatory The name of a user profile that shall be used to access Alfabet. The user profile is required to evaluate whether the user that is sending the service call is allowed to read data about an object. Use the Portfolio Admin user profile.
"EmptyValues":true/false Optional This field is only relevant if the ReportResult field of the call is set to Objects.

If EmptyValues is set to true , all object class properties of the object are returned even if they are not set. If EmptyValues is set to false , only object class properties of the object that are set are returned. By default the attribute is set to false.

"Language":"LanguageLCID" Optional To return all values in the original language and add translations in a second language, the parameter DataCulture shall be used instead of the parameter Language

This field is only relevant if translations are available for string data of objects and the ReportResult field of the call is set to Objects . The field must specify the language code (LCID) decimal of the culture for which the translations are available in the Alfabet database.

The standard language of the database is returned per default. If a translation is not available for a translatable object class property, no value will be returned, even if a value is provided in the standard language.

Language supersedes DataCulture . If both fields are available, only Language is used.

"DataCulture":"LanguageCode" Optional This field is only relevant if translations are available for string data of objects and the ReportResult field of the call is set to Objects . The field must specify either the language code of the culture for which translations are available in the Alfabet database, or ALL to return translations for all languages that provide translation. For example, the language code for German is de-DE. By default the standard language of the database is returned.

In addition to the values in the original language, translations are added to the return value in a separate field Translations.

The field Language supersedes DataCulture . If both fields are available, only Language is used and DataCulture is ignored.

"ApiCulture":"AlfabetFastLane_API" Optional This field is only relevant if the ReportResult field of the call is set to Objects . If it is not set, date and time information is returned in the standard language of your Alfabet installation.

You can set this field to AlfabetFastLane_API to return data and time values with the following patterns:

  • Date pattern: yyyy-MM-dd
  • Date time pattern: yyyy-MM-dd HH:mm:ss.fff
  • Time pattern: HH:mm:ss
  • Number pattern: The group symbol is a comma, the decimal symbol is a period, and the number of decimals is not limited (e.g. 3,125.987).

Return value

The return value depends on the setting of the ReportResult field of the call.

RESTful Service call:

Service call: https://AlfabetCloud/AlfabetAPIServer/api/v2/objects

HTTP method: POST

Headers:

  • Authorization: bearer eyJ0eXAiOiJKVxMiJ9.eyJpc3MiOiJhbGZhYmV0IiwiaWF0IjoiMTU3MzAzMjA0NiIsImV4cCI6IjE1NzMwMzMyNDYiLCJxc2giOm51bGwsInN1YiI6IkFwaSBBdXRoZW50aWNhdGlvbiIsImNvbnRleHQiOnsidXNlciI6eyJVc2VyS2V5IjoiQUxGQUJFRDRUNGNc1R5cGUiOjB9fX0.PJC0EWtlUETbraV7NckVkRTFVm356y6K9JyhFR245hXp-2ApttryATZ_dAL0bi_GZpeJx7iqr_lRIA
  • Content-Type: application/json; charset=utf-8

Body:

  • {
  • "CurrentProfile":"Portfolio Admin",
  • "Report": "RAPI_ApplicationGroup",
  • "ReportResult": "DataSet",
  • "Limit": 500,
  • "Offset": 250
  • "ReportArgs":{"DATE":20240210"}
  • }

Only one application group has been changed after the specified date.

Response of the service call:

  • "Objects": [{
    • "ClassName": "ApplicationGroup",
    • "RefStr": "157-78-0",
    • "Values": {
      • "Name": "Financial Services Apps",
      • "Parent": "Administrative Service Apps",
      • Short Name: null,
      • "Type": "Analysis Group"
      • "Description": null;
      • },
    • "NestedObjects": {}
    • }
  • }],
  • "Count": 001,
  • "Name": "RAPI_ApplicationGroup"
  • "Description": "";