modzyClient.getModelVersions

Retrieve models versions

modzyClient.getModelVersions(modelId)

Returns a list of historical versions for a specific model.

Parameters

Parameter

Type

Description

Example

modelId

string

A model identifier assigned by Modzy.

'ed542963de'

Returns

A JSON object with a list of model versions for the modelId specified

{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "type": "array",
    "items": {
        "$ref": "#/definitions/ModelVersionItem"
    },
    "definitions": {
        "ModelVersionItem": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "version": {
                    "type": "string"
                }
            },
            "required": [
                "version"
            ]            
        }
    }
}

Examples

versions = await modzyClient.getModelVersions('ed542963de');
console.log( `Versions ${models.length}` );

Using promises

modzyClient.getModelVersions('ed542963de')
  .then(
    (models)=>{
      console.log( `Versions ${models.length}` );
    }
  )
  .catch(
    (error)=>{
      console.error(error);
    }
  );

Did this page help you?