API documentation

    Compound Registration provides a REST interface to interact with the registration system.

    Documentation

    If you have installed Compound Registration, you can check the API documentation at:

    Since version 24.3.3:

    https://yourhost.com/RegistryCxn/rest/swagger-ui/index.html

    Before version 24.3.3:

    https://yourhost.com/RegistryCxn/rest/swagger-ui.html

    In case you don't have a deployed system, you can check the API documentation of the latest Compound Registration version on the compreg-demo-swagger-ui. Authentication is needed to use the example REST API, access can be requested here.

    Sources

    {primary} Before version 24.3.2 the source name had to be written in all capitals without spaces, for example NEWSOURCE. Since version 24.3.2 the source name can be lowercase as well. "Default" can be a valid source name. The source parameter of the request body accepted by the /autoRegister, /advancedAutoRegister, and /advancedRegister endpoints is going to be case-sensitive. (E.g. to register with "REGISTRAR" the string "REGISTRAR" will be accepted but not "registrar").

    Forcing compounds to the Staging

    Using the API, compounds can be prevented to be registered and "forced" into the Staging area for further review. For more details check the swagger for Autoregistration.

    ID-based fields

    Since version 21.3.0 a new parameter has been added to the settings at the bulkloader API: processIdBasedFields. This configuration option is related to the ID-based dictionaries.

    Example:

    "settings":{
          "type":"MOLECULE",
          "rowDelimiter":null,
          "fieldDelimiter":null,
          "multiValueDelimiter":"",
          "structureField":null,
          "containsHeader":true,
          "processIdBasedFields":true
       },

    -processIdBasedFields:true: System tries to find the ID of the given Value to save. If it cannot be found, it will try to save the value as is.

    -processIdBasedFields":false: It tries to save the given value as it is, considering it to be an ID of an entry in the dictionary.

    In both cases additional validation configurations might block these registrations and make them fall to Staging. E.g if the fromList validator is added in the field configuration.

    Since version 21.3.0 the registration endpoints received a new parameter. In case you are using ID-based dictionaries, this way you can provide the IDs of the entry as well. This new option is available inside the Structure's AdditionalData JSON Array.

    Example:

    "additionalData": [{
            "name": "id_based_field",
            "value": "two",
            "id": "2"
        }, {
            "name": "simple_field",
            "value": "example"
        }
    ]

    Generate fields

    Since version 23.16.0 all generated data of the compound can be recalculated.

    For bulk recalculation the /RegistryCxn/rest/amendmentService/bulkRegenerateFields API can be used. It regenerates additional data for all compounds.

    You can get status information about the bulk field regeneration with the help of the /RegistryCxn/rest/amendmentService/bulkRegenerateFields/status API.

    {info} The processed/total number of items returned by the /RegistryCxn/rest/amendmentService/bulkRegenerateFields/status will consider all elements of a compound tree.

    E.g. if a compound tree has a parent, version, and three lots, then for that compound 5 items will be considered.

    The bulk regeneration of data is finished when the number of processed items is equal to the number of total items.

    {info} The configured generated fields for a given level for the compound are always counted as 1 item independently of the actual number of the fields.

    E.g. if there are 2 generated fields configured for all three levels (parent, version, and lot) and there is only one lot registered for each compound, and there are 3 compounds in the system, the number of total items will be 9.

    {info} The processed/total number of items is independent of the successfully generated fields for a given level.

    E.g. if there are 2 generated fields configured for all three levels (parent, version, and lot, and there is only one lot registered for each compound), and there are 3 compounds in the system, the processed/total number of items will be 9 even if only the generated data is successfully calculated for only one field from the two.

    Items of No structures and Markush structures, where data generation is not always possible, are still counted in the processed/total number of the /RegistryCxn/rest/amendmentService/bulkRegenerateFields/status.

    {info} In the case of a large database, the recalculation can be slow.

    Since version 24.3.0 the bulk recalculation of additional data for a set of compounds can be done using the /RegistryCxn/rest/amendmentService/bulkRegenerateFieldsForIds API request. The system can recalculate all generated data for the specified PCNs, CNs, or LNs. The status information can be available with the /RegistryCxn/rest/amendmentService/bulkRegenerateFields/status API request.

    Fetch original id

    Since version 24.3.0 the /RegistryCxn/rest/amendmentService/fetchOriginalId can be used to fetch the first id ever assigned to a given lot id list. The “Original Identifier” field should be configured on the form.

    {info} When the project-based access is enabled, then you cannot use the fetch id for the lots you do not have access to.

    Validate

    Since version 24.3.4 the /RegistryCxn/rest/validate/auto and the /RegistryCxn/rest/validate/manual endpoints return in one result all the structure (quality and source-based) checker errors.