API Overview

The section describes the various modules, classes that the CS-Deployment API contains along with the limitations of the API.

The CS-Deployment API contains modules, classes, functions, and variables that are documented by using the Python best practices. You can use the available context-sensitive help when you use tools such as Visual Studio Code that display the documentation embedded in the code.

Modules, classes, functions, and variables that are named with an underscore “_” prefix are considered internal implementation level code. Their details are subject to change in future releases and any changes may not be compatible with an earlier version.

The csdeploy Python package contains the CS-Deployment API code. The various modules under this package are as follows:

  • audit - Includes an AuditLogger class and related code to provide audit logging functionality.
  • exporter - Contains the Exporter class and related code that carries out the export operation.
  • gqlinvoke - Contains classes that represent a connection to a GraphQL server and runs GraphQL requests.
  • imexmap - Provides mapping functionality to map certain objects that are encountered when you export from a source environment to the corresponding objects during import into a destination environment.
  • importer - Contains the Importer class and related code that carries out the import operation.
  • pkg - Defines classes that make the deployment package to capture what is exported and imported.
  • util - Defines utility classes and functions.

The main classes that are used during an API call are exposed directly from the csdeploy package. These classes can be imported directly from csdeploy individually or by importing all (*) from that package.

  • Exporter - Carries out the export operation.
  • Importer - Carries out the import operation.
  • GraphqlConnection - Defines the connection parameters to a GraphQL server and allows such things as an authentication token to be retrieved.
  • DeploymentPackage - This holds the objects that are exported from a source environment and imported into a destination environment. It can be saved to a file and loaded from a file.
  • ExportSelection - Defines what object or objects to export. This forms the initial user selection. More dependencies are analyzed based on this selection.
  • ImportOptions - Defines various options that can control the import operation.
  • AuditLogger - Allows the capture of certain information in an audit log.
  • SelectionType - When not selecting specific objects to export, this selection type specifies that all application-defined objects, or all objects later than a certain timestamp be exported.
  • ObjectType - Defines a metadata object type like a class definition, property template, or choice list.
  • logging - The standard python logging module. This is not part of the csdeploy package but can be imported from csdeploy for convenience.

Limitations

The CS-Deployment API has the following limitations:
Note: V5.6 IF001 includes some improvements that remove certain limitations of the CS-Deployment API. Update your environment to the latest iFix to take advantage of the improvements.
  • The metadata objects that can be exported and imported by using the API are limited to class definitions, property templates, and choice lists.
  • The AuditDefinitions property of a SubscribableClassDefinition cannot be exported or imported.
  • The MarkingSet property of a PropertyTemplateString cannot be exported or imported.
  • During import, there is no option to override the Creator/LastModifier system properties.
  • The id of source and destination objects must match. There is no option to discover and map destination objects by name.
  • The security-related properties Owner and Permissions, and the DefaultInstanceOwner and DefaultInstancePermissions properties of class definitions, cannot be exported or imported. There is no a mapping mechanism to map security principals from source to destination environment.

    The GraphqlRequest class does not currently support a POST using multi-part form content and uploading file content.

  • (Removed in V5.6 IF001) Application-specific modifications to system class definitions cannot be exported or imported.
  • (Removed in V5.6 IF001) Application-specific modifications to add-on installed metadata objects cannot be exported or imported.
  • (Removed in V5.6 IF001) Changes to inherited property definitions –overriding certain attributes of property definitions a class definition inherits from its superclass – cannot be exported or imported.
  • (Removed in V5.6 IF001) Class definitions of class CmRoleClassDefinition are not supported and an error is returned if selected for export. When you select ALL application-defined class definitions, these class definitions are filtered out.
  • (Removed in V5.6 IF001) Some properties of SubscribableClassDefinition, for example, AuditDefinitions and ChangePreprocessorDefinitions cannot be exported or imported.