Previous Topic

Next Topic

Book Contents

Book Index

JSON-RPC API

Provides a Web interface to FIM through JSON-RPC.

Overview

Provides a Web interface to FIM through JSON-RPC. The functionality is provided by the FIM JSON-RPC Bundle.

Methods

Method

Return Value

Parameters

Parameter Description

FIM/getFunctionalItemUIDs

String[]. All Functional Item UIDs registered in the system, matching the filter. Error if the filter is invalid.

  • filter: string
  • filter: string - LDAP filter for the needed Functional Items. If it is null or empty string, all Functional Items are returned. The filter keys are case sensitive and can be: uid, name, tags, objectClass, one of the Functional Item attributes.

FIM/getFunctionalItems

FunctionalItemSet. The Functional Items that are registered in the system with the given unique identifiers.

  • uids: string[]
  • level: int
  • uids: string[] - The identifiers of the functional items that are requested. If it is null all Functional Items are returned.
  • level: int - The level/depth of the functional items to be returned additionally to the matched functional items (0 to N).

FIM/getFunctionalItemsByFilter

FunctionalItemSet. All Functional Items registered in the system, matching the filter. Error if the filter is invalid.

  • filter: string
  • level: int
  • filter: string - A list of values are Supported JSON Types. Can be null if there are no params. String can be used in values to represent number and boolean.
  • level: int - The level/depth of the functional items to be returned additionally to the matched functional items (0 to N).

FIM/getFunctionalItem

FunctionalItemObject. Error if UID is invalid.

  • uid: string
  • level: int
  • uid: string - ID of the Functional Item.
  • level: int - The level/depth of the functional items to be returned additionally to the matched functional items (0 to N).

FIM/getProperty

JSON Object. Error if UID or property name are invalid. Error if property can not be read.

  • uid: string
  • propertyName: string
  • uid: string - ID of the Functional Item.
  • propertyName: string - The name of the property to be gotten.

FIM/setProperty

Error if UID, property name or property value are invalid. Error if property can not be set because of some reason.

  • uid: string
  • propertyName: string
  • propertyValue: Supported JSON Types.
  • uid: string - ID of the Functional Item.
  • propertyName: string - The name of the property to be set.
  • propertyValue: - The value that needs to be set to the specified property. String can be used in value to represent number and boolean.

FIM/invokeOperation

Supported JSON Types. Error if UID, operation name or params are invalid. Error if operation can not be executed for some reason.

  • uid: string
  • operationname: string
  • params: object[]
  • uid: string - ID of the Functional Item.
  • operationname: string - The name of the operation.
  • params: object[] - The list with operation parameters values (Supported JSON Types). Can be null if there are no params. String can be used in values to represent number and boolean.

FIM/getItemsMetadata

ItemMetadataSet. Returns the ItemMetadata for array with functional item interfaces.If there is no metadata found for a class, its metadata will be skipped in the returned set.

  • objectClass: string[]
  • includeBeanMetadata: true/false
  • objectClass: string[] - Array with functional item interfaces names which metadata is required.
  • includeBeanMetadata: true/false - 'true' if the referenced beans metadata should be returned also.

FIM/getBeansMetadata

BeanMetadataSet. Returns the beans metadata for array with bean classes names.If there is no metadata found for a class, its metadata will be skipped in the returned set.

  • classNames: string[]
  • includeBeanMetadata: true/false
  • classNames: string[] - Array with all beans class names which metadata is required.
  • includeBeanMetadata: true/false - 'true' if the referenced beans metadata should be returned also.

FIM/getItemsCreationMetadata

ItemCreationMetadataSet. Returns the FunctionalItems creation metadata for array with functional item interfaces and a specified FunctionalItemFactory (or for all of them if the factory UID is not specified).

  • factoryUID: string
  • objectClass: string[]
  • factoryUID: string - The UID of the FunctionalItemFactory or null if the creation metadata should be get from all factories that support the specified classes.
  • objectClass: string[] - Array with functional item interfaces names which creation metadata is required.

FIM/getBeansCreationMetadata

BeansCreationMetadataSet. Returns a custom type creation metadata for the given class names. If there is no metadata found for a class, its metadata will be skipped in the returned set.

  • classNames: string[]
  • includeBeanMetadata: true/false
  • classNames: string[] - Array with types which creation metadata is required.
  • includeBeanMetadata: true/false - 'true' if the creation metadata of the referenced creation bean fields will be included also, otherwise only the requested classes bean metadata will be returned.

Objects

Object

Field

Field Description

Supported JSON Types

  • No
  • string, number, object, array, true, false, null. We use boolean when boolean can be return. Number can be used to represent int and double.

FunctionalItemObject

  • item: FunctionalItemInfo
  • references: FunctionalItemInfo[]
  • item: FunctionalItemInfo - Functional Item.
  • references: FunctionalItemInfo[] - Array with all strong references of the included Functional Items. It is optional.

FunctionalItemSet

  • items: FunctionalItemInfo[]
  • references: FunctionalItemInfo[]
  • items: FunctionalItemInfo[] - Array of Functional Items
  • references: FunctionalItemInfo[] - Array with all strong references of the included Functional Items. It is optional.

FunctionalItemInfo

  • uid: string
  • name string
  • tags: string[]
  • objectClass: string[]
  • properties: object
  • attributes: object
  • uid: string - Functional Item UID.
  • name string - Functional Item name. It is optional.
  • tags: string[] - Functional Item tags set. Each element is an unique string used as functional item tag. It is optional.
  • objectClass: string[] - Object class names. It contains all Functional Item interfaces including the inherited ones.
  • properties: object - The item readable properties. A set of (key, value) pairs. Each key is a name of the property and the value is the actual property value. It is optional if there are no readable properties.
  • attributes: object - Functional item attributes used as service registration properties. A set of (key, value) pairs. The key is an attribute name and the value is its actual attribute value. Key type must be string and value type can be a FIM suported type. It is optional.

FunctionalItemError (deprecated since 2.3.0)

  • code: int
  • classname int
  • message: String
  • details: String
  • cause: FunctionalItemError
  • code: int - The error code. 1 for illegal functional item state, 2 - illegal operation argument, 0 - undefined code (by default), others - custom error codes.
  • classname int - The cause of the error. If it is caused by a Throwable, the cause field holds the Throwable class name. It is optional.
  • message: String - The error message. It is optional.
  • details: String - More detail message of the error. If it is a Throwable, the cause details field holds the top of the throwable stack. It is optional.
  • cause: FunctionalItemError

ItemMetadataSet

  • metadata: ItemMetadata[]
  • references: BeanMetadata[]
  • metadata: ItemMetadata[] - Items metadata.
  • references: BeanMetadata[] - Array with all bean metadatas referenced by the ItemMetadata objects. It is optional.

ItemMetadata

  • name: string
  • objectClass:string
  • description: string
  • version: string
  • properties: PropertyMetadata[]
  • operations: OperationMetadata[]
  • eventableOperations: OperationMetadata[] (since 2.3.2000)
  • attributes: object
  • name: string - The user-frindly name.
  • objectClass:string
  • description: string - The description.
  • version: string - The version, default 0.0.0.
  • properties: PropertyMetadata[] - The properties metadata. An array with the properties metadata info. It is optional if there are no properties.
  • operations: OperationMetadata[] - The operations metadata. An array with the operations metadata info. It is optional if there are no operations.
  • eventableOperations: OperationMetadata[] - The eventable-only operations metadata, i.e. non-executable operations. An array with the operations metadata info containing the eventName and eventProperties data. It is optional.
  • attributes: object - A set of (key, value) pairs. Each key is a name of metadata property and the value is actual metadata. The keys and values types must be strings. It is optional.

PropertyMetadata

  • name: string
  • readable: boolean
  • writable: boolean
  • eventable: boolean
  • <TypeMetadata>
  • asyncStatusPropertyName: string (deprecated since 2.3.0)
  • attributes: object
  • name: string - The property name.
  • readable: boolean - 'true' value if the property is readable. It is optional if the property is not readable.
  • writable: boolean - 'true' value if the property is writable. It is optional if the property is not writable.
  • eventable: boolean - 'true' value if the property is eventable. It is optional if the property is not eventable.
  • <TypeMetadata> - Includes the TypeMetadata (key, value) pairs, that are related to the property type.
  • asyncStatusPropertyName: string (deprecated since 2.3.0) - The name of the property that tracks the status of the asynchronous setter invocation if it is not synchronous. It is optional.
  • attributes: object - A set of (key, value) pairs. Each key is a name of metadata property and the value is actual metadata. The keys and values types must be strings. It is optional.

OperationMetadata

  • name: string
  • description: string
  • eventName: string (since 2.3.0)
  • eventProperties: object (since 2.3.0)
  • parametersTypes: TypeMetadata[]
  • returnType: TypeMetadata
  • asyncStatusPropertyName: string (deprecated since 2.3.0)
  • attributes: object
  • name: string - The operation name.
  • description: string - The description. It is optional.
  • eventName: string (since 2.3.0) - The operation executed event name. One event name could be used for multiple item operations. It is optional. Mandatory if eventPropertiesTypes are present.
  • eventProperties: object (since 2.3.0)- The metadata of the operation executed custom event properties. It is optional.
  • parametersTypes: TypeMetadata[] - The metadata of the parameters. The elements are the same number and order as the operation parameters.
  • returnType: TypeMetadata - The metadata of the operation return value. A set of (key, value) pairs.
  • asyncStatusPropertyName (deprecated since 2.3.0) - The name of the property that tracks the status of the asynchronous operation execution (if it is not synchronous). It is optional.
  • attributes: object - A set of (key, value) pairs. Each key is a name of metadata property and the value is actual metadata. The keys and values types must be strings. It is optional.

TypeMetadata

  • description: string
  • classess: string[]
  • type: string
  • regex: string (since 2.3.0)
  • min: number
  • max: number
  • step: number
  • enumeration: object[]
  • description: string - The description. It is optional.
  • classess: string[] - The value holds the type real class name and its container names. The last element in the list is the class name of the type witch metadata is specified. (For example, for List with Integers will be returned an array with two elements ["java.util.List", "java.lang.Integer"])
  • type: string - GENERIC/ NUMERIC/ ENUM/ BEAN/ ITEM
  • regex: string (since 2.3.0) - The regex pattern for 'generic' type with lava.lang.String class. It is optional.
  • min: number - The minimum value of 'numeric' type. It is optional.
  • max: number - The maximum value of 'numeric' type. It is optional.
  • step: number - The step value of 'numeric' type. It is optional.
  • enumeration: object[] - Metadata for type ENUM. Each array element is (key, value) pair. The key is the value of constant and the value is its user-friendly name. The order of ENUM constants is preserved.

FieldMetadata

  • readable: boolean
  • writable: boolean
  • <TypeMetadata>
  • readable: boolean - 'true' value if the field is readable. It is optional if the field is not readable.
  • writable: boolean - 'true' value if the field is writable. It is optional if the field is not writable.
  • <TypeMetadata> - Includes the TypeMetadata (key, value) pairs, that are related to the property type.

BeanMetadataSet

  • metadata: BeanMetadata[]
  • references: BeanMetadata[]
  • metadata: BeanMetadata[] - Array with requested BeanMetadata objects.
  • references: BeanMetadata[] - Array with all bean fields metadata objects if there are any BEAN types referenced by the fields of requested beans. It is optional.

BeanMetadata

  • className: string
  • version: string
  • fields: object
  • className: string - The bean class name.
  • version: string - The metadata version as string. The version identifies the medatata changes for a bean class name.
  • fields: object - A set of (key, value) pairs. Each key is a name of bean field (String) and the value is the actual metadata of the field (FieldMetadata object). It is optional if there are no bean fileds.

BeanCreationMetadataSet

  • metadata: CreationMetadata[]
  • references: CreationMetadata[]
  • metadata: CreationMetadata[] - Array with requested CreationMetadata objects.
  • references: CreationMetadata[] - Array with all creation fields metadata objects if there are any BEAN types referenced by the fields of requested creation metadata. It is optional.

BeanCreationMetadata

  • factoryUID: string
  • <BeanMetadata>
  • factoryUID: string - The UID of the factory that provides the creation metadata. It is missing if the metadata is not provided by factory. The pair (version, factoryUID) identifies the creation medatata changes for a class name.
  • <BeanMetadata> - Includes all BeanMetadata (key, value) pairs.

ItemCreationMetadataSet

  • metadata: ItemCreationMetadata[]
  • references: BeanCreationMetadata[]
  • metadata: Item - CreationMetadata[]Array with requested ItemCreationMetadata objects.
  • references: Bean - CreationMetadata[]Array with all creation fields metadata objects if there are any BEAN types referenced by the fields of requested creation metadata. It is optional.

ItemCreationMetadata

  • objectClass: string
  • version: string
  • factoryUID: string
  • fields: object
  • objectClass: string - The item object name.
  • version: string - The metadata version as string. The version identifies the medatata changes for a bean class name.
  • factoryUID: string - The UID of the factory that provides the Item creation metadata. The pair (version, factoryUID) identifies the creation medatata changes for a supported object class.
  • fields: object - A set of (key, value) pairs. Each key is a name of creation field (String) and the value is the actual metadata of the field (FieldMetadata object). It is optional if no fields are required for the item creation.