Cloudera Documentation

Model Registry

Default

createModel

Create a new model. This groups the model artifacts that belong to the same model.


/models

Usage and SDK Samples

curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v2/models"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        CreateModelRequest body = ; // CreateModelRequest | Create model request.
        try {
            Model result = apiInstance.createModel(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        CreateModelRequest body = ; // CreateModelRequest | Create model request.
        try {
            Model result = apiInstance.createModel(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
CreateModelRequest *body = ; // Create model request.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Create a new model. This groups the model artifacts that belong to the same model.
[apiInstance createModelWith:body
              completionHandler: ^(Model output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var body = ; // {{CreateModelRequest}} Create model request.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createModel(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createModelExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var body = new CreateModelRequest(); // CreateModelRequest | Create model request.

            try
            {
                // Create a new model. This groups the model artifacts that belong to the same model.
                Model result = apiInstance.createModel(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.createModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // CreateModelRequest | Create model request.

try {
    $result = $api_instance->createModel($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->createModel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::CreateModelRequest->new(); # CreateModelRequest | Create model request.

eval { 
    my $result = $api_instance->createModel(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->createModel: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # CreateModelRequest | Create model request.

try: 
    # Create a new model. This groups the model artifacts that belong to the same model.
    api_response = api_instance.create_model(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->createModel: %s\n" % e)

Parameters

Body parameters
Name Description
body *
{
Required: name
name:
Model name string
description:
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
createModelVersionRequestPayload:
{
Required: metadata
tags:
metadata:
downloadModelRepoRequest:
}
visibility:
string

Visibility of the model (default: private).

Enum: public, private
}

Responses

Status: 200 - A successful model create response.

{
Required: name
id:
string

The UUID of a model

name:
Model name string
creator:
{
user_name:
string

User name

}
visibility:
string

Visibility of the model.

Enum: public, private
description:
string

Model description

tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

model_versions:
[
{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
string

Run UUID that generated the model version.

experiment_id:
string

Experiment UUID.

metrics:
[

ExperimentRun metrics.

{

Metric associated with a ExperimentRun, represented as a key-value pair.

key:
string

Key identifying this metric.

value:
number (double)

Value associated with this metric.

timestamp:
string (date-time)

The timestamp at which this metric was recorded.

step:
string (int64)

Step at which to log the metric.

}
]
params:
[

ExperimentRun parameters.

{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
}
huggingface_metadata:
{
model_info:
string
model_card:
string
}
ngc_metadata:
{
model_info:
string
manifest_yaml:
string
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}
]
}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

createModelVersion

Create a new model version. This metadata of a model artifacts that belong to the same model.


/models/{model_id}/versions

Usage and SDK Samples

curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v2/models/{model_id}/versions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        CreateModelVersionRequest body = ; // CreateModelVersionRequest | Create model version request.
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            ModelVersion result = apiInstance.createModelVersion(body, modelId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createModelVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        CreateModelVersionRequest body = ; // CreateModelVersionRequest | Create model version request.
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            ModelVersion result = apiInstance.createModelVersion(body, modelId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#createModelVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
CreateModelVersionRequest *body = ; // Create model version request.
String *modelId = modelId_example; // Public identifier of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Create a new model version. This metadata of a model artifacts that belong to the same model.
[apiInstance createModelVersionWith:body
    modelId:modelId
              completionHandler: ^(ModelVersion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var body = ; // {{CreateModelVersionRequest}} Create model version request.
var modelId = modelId_example; // {{String}} Public identifier of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createModelVersion(bodymodelId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createModelVersionExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var body = new CreateModelVersionRequest(); // CreateModelVersionRequest | Create model version request.
            var modelId = modelId_example;  // String | Public identifier of a model.

            try
            {
                // Create a new model version. This metadata of a model artifacts that belong to the same model.
                ModelVersion result = apiInstance.createModelVersion(body, modelId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.createModelVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // CreateModelVersionRequest | Create model version request.
$modelId = modelId_example; // String | Public identifier of a model.

try {
    $result = $api_instance->createModelVersion($body, $modelId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->createModelVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::CreateModelVersionRequest->new(); # CreateModelVersionRequest | Create model version request.
my $modelId = modelId_example; # String | Public identifier of a model.

eval { 
    my $result = $api_instance->createModelVersion(body => $body, modelId => $modelId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->createModelVersion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # CreateModelVersionRequest | Create model version request.
modelId = modelId_example # String | Public identifier of a model.

try: 
    # Create a new model version. This metadata of a model artifacts that belong to the same model.
    api_response = api_instance.create_model_version(body, modelId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->createModelVersion: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required
Body parameters
Name Description
body *
{
Required: metadata
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
metadata:
{
Required: model_repo_type
tags:
model_repo_type:
mlflowMetadata:
huggingface_metadata:
ngc_metadata:
}
downloadModelRepoRequest:
{
Required: repo_id,source
source:
repo_id:
hf_token:
}
}

Responses

Status: 200 - A successful model version create response.

{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
experiment_id:
metrics:
params:
tags:
}
huggingface_metadata:
{
model_info:
model_card:
}
ngc_metadata:
{
model_info:
manifest_yaml:
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

deleteModel

Deleting a model deletes all model artifacts and model versions and associated metadata.


/models/{model_id}

Usage and SDK Samples

curl -X DELETE\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v2/models/{model_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            apiInstance.deleteModel(modelId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            apiInstance.deleteModel(modelId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Deleting a model deletes all model artifacts and model versions and associated metadata.
[apiInstance deleteModelWith:modelId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteModel(modelId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteModelExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.

            try
            {
                // Deleting a model deletes all model artifacts and model versions and associated metadata.
                apiInstance.deleteModel(modelId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.deleteModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.

try {
    $api_instance->deleteModel($modelId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deleteModel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.

eval { 
    $api_instance->deleteModel(modelId => $modelId);
};
if ($@) {
    warn "Exception when calling DefaultApi->deleteModel: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.

try: 
    # Deleting a model deletes all model artifacts and model versions and associated metadata.
    api_instance.delete_model(modelId)
except ApiException as e:
    print("Exception when calling DefaultApi->deleteModel: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required

Responses

Status: 204 - A successful model delete response.

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

deleteModelVersion

Deleting a model version deletes all model artifacts and model versions and associated metadata.


/models/{model_id}/versions/{version}

Usage and SDK Samples

curl -X DELETE\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v2/models/{model_id}/versions/{version}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version number of a model.
        try {
            apiInstance.deleteModelVersion(modelId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteModelVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version number of a model.
        try {
            apiInstance.deleteModelVersion(modelId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#deleteModelVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.
Integer *version = 56; // Version number of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Deleting a model version deletes all model artifacts and model versions and associated metadata.
[apiInstance deleteModelVersionWith:modelId
    version:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.
var version = 56; // {{Integer}} Version number of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteModelVersion(modelId, version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteModelVersionExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.
            var version = 56;  // Integer | Version number of a model.

            try
            {
                // Deleting a model version deletes all model artifacts and model versions and associated metadata.
                apiInstance.deleteModelVersion(modelId, version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.deleteModelVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.
$version = 56; // Integer | Version number of a model.

try {
    $api_instance->deleteModelVersion($modelId, $version);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deleteModelVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.
my $version = 56; # Integer | Version number of a model.

eval { 
    $api_instance->deleteModelVersion(modelId => $modelId, version => $version);
};
if ($@) {
    warn "Exception when calling DefaultApi->deleteModelVersion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.
version = 56 # Integer | Version number of a model.

try: 
    # Deleting a model version deletes all model artifacts and model versions and associated metadata.
    api_instance.delete_model_version(modelId, version)
except ApiException as e:
    print("Exception when calling DefaultApi->deleteModelVersion: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required
version*
Integer (int32)
Version number of a model.
Required

Responses

Status: 204 - A successful model version delete response.

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

downloadModelRegistryCli

Download Model registry CLI.


/cli/{os}

Usage and SDK Samples

curl -X GET\
-H "Accept: multipart/form-data"\
"/api/v2/cli/{os}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String os = os_example; // String | Operating system of the client.
        try {
            byte[] result = apiInstance.downloadModelRegistryCli(os);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#downloadModelRegistryCli");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String os = os_example; // String | Operating system of the client.
        try {
            byte[] result = apiInstance.downloadModelRegistryCli(os);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#downloadModelRegistryCli");
            e.printStackTrace();
        }
    }
}
String *os = os_example; // Operating system of the client.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Download Model registry CLI.
[apiInstance downloadModelRegistryCliWith:os
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');

var api = new ModelRegistry.DefaultApi()
var os = os_example; // {{String}} Operating system of the client.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.downloadModelRegistryCli(os, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class downloadModelRegistryCliExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var os = os_example;  // String | Operating system of the client.

            try
            {
                // Download Model registry CLI.
                byte[] result = apiInstance.downloadModelRegistryCli(os);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.downloadModelRegistryCli: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$os = os_example; // String | Operating system of the client.

try {
    $result = $api_instance->downloadModelRegistryCli($os);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->downloadModelRegistryCli: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $os = os_example; # String | Operating system of the client.

eval { 
    my $result = $api_instance->downloadModelRegistryCli(os => $os);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->downloadModelRegistryCli: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
os = os_example # String | Operating system of the client.

try: 
    # Download Model registry CLI.
    api_response = api_instance.download_model_registry_cli(os)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->downloadModelRegistryCli: %s\n" % e)

Parameters

Path parameters
Name Description
os*
String
Operating system of the client.
Required

Responses

Status: 200 - OK. The file will be downloaded.

string (binary)

Body of the artifact.

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

downloadModelRegistryPythonPackage

Download Model registry Python package.


/python.tar.gz

Usage and SDK Samples

curl -X GET\
-H "Accept: multipart/form-data"\
"/api/v2/python.tar.gz"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            byte[] result = apiInstance.downloadModelRegistryPythonPackage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#downloadModelRegistryPythonPackage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            byte[] result = apiInstance.downloadModelRegistryPythonPackage();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#downloadModelRegistryPythonPackage");
            e.printStackTrace();
        }
    }
}

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Download Model registry Python package.
[apiInstance downloadModelRegistryPythonPackageWithCompletionHandler: 
              ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');

var api = new ModelRegistry.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.downloadModelRegistryPythonPackage(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class downloadModelRegistryPythonPackageExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();

            try
            {
                // Download Model registry Python package.
                byte[] result = apiInstance.downloadModelRegistryPythonPackage();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.downloadModelRegistryPythonPackage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $result = $api_instance->downloadModelRegistryPythonPackage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->downloadModelRegistryPythonPackage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    my $result = $api_instance->downloadModelRegistryPythonPackage();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->downloadModelRegistryPythonPackage: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # Download Model registry Python package.
    api_response = api_instance.download_model_registry_python_package()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->downloadModelRegistryPythonPackage: %s\n" % e)

Parameters

Responses

Status: 200 - OK. The file will be downloaded.

string (binary)

Body of the artifact.

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

getModel

Get details of a model and all its versions.


/models/{model_id}

Usage and SDK Samples

curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v2/models/{model_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            Model result = apiInstance.getModel(modelId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            Model result = apiInstance.getModel(modelId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get details of a model and all its versions. 
[apiInstance getModelWith:modelId
              completionHandler: ^(Model output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getModel(modelId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getModelExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.

            try
            {
                // Get details of a model and all its versions. 
                Model result = apiInstance.getModel(modelId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.

try {
    $result = $api_instance->getModel($modelId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getModel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.

eval { 
    my $result = $api_instance->getModel(modelId => $modelId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getModel: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.

try: 
    # Get details of a model and all its versions. 
    api_response = api_instance.get_model(modelId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getModel: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required

Responses

Status: 200 - A successful model response.

{
Required: name
id:
string

The UUID of a model

name:
Model name string
creator:
{
user_name:
string

User name

}
visibility:
string

Visibility of the model.

Enum: public, private
description:
string

Model description

tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

model_versions:
[
{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
string

Run UUID that generated the model version.

experiment_id:
string

Experiment UUID.

metrics:
[

ExperimentRun metrics.

{

Metric associated with a ExperimentRun, represented as a key-value pair.

key:
string

Key identifying this metric.

value:
number (double)

Value associated with this metric.

timestamp:
string (date-time)

The timestamp at which this metric was recorded.

step:
string (int64)

Step at which to log the metric.

}
]
params:
[

ExperimentRun parameters.

{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
}
huggingface_metadata:
{
model_info:
string
model_card:
string
}
ngc_metadata:
{
model_info:
string
manifest_yaml:
string
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}
]
}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

getModelVersion

Get a model version details of the specified model.


/models/{model_id}/versions/{version}

Usage and SDK Samples

curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v2/models/{model_id}/versions/{version}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version number of a model.
        try {
            ModelVersion result = apiInstance.getModelVersion(modelId, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getModelVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version number of a model.
        try {
            ModelVersion result = apiInstance.getModelVersion(modelId, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getModelVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.
Integer *version = 56; // Version number of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get a model version details of the specified model.
[apiInstance getModelVersionWith:modelId
    version:version
              completionHandler: ^(ModelVersion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.
var version = 56; // {{Integer}} Version number of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getModelVersion(modelId, version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getModelVersionExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.
            var version = 56;  // Integer | Version number of a model.

            try
            {
                // Get a model version details of the specified model.
                ModelVersion result = apiInstance.getModelVersion(modelId, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getModelVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.
$version = 56; // Integer | Version number of a model.

try {
    $result = $api_instance->getModelVersion($modelId, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getModelVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.
my $version = 56; # Integer | Version number of a model.

eval { 
    my $result = $api_instance->getModelVersion(modelId => $modelId, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getModelVersion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.
version = 56 # Integer | Version number of a model.

try: 
    # Get a model version details of the specified model.
    api_response = api_instance.get_model_version(modelId, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getModelVersion: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required
version*
Integer (int32)
Version number of a model.
Required

Responses

Status: 200 - A model version request.

{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
experiment_id:
metrics:
params:
tags:
}
huggingface_metadata:
{
model_info:
model_card:
}
ngc_metadata:
{
model_info:
manifest_yaml:
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

getModels

Get all registered models.


/models

Usage and SDK Samples

curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v2/models?page_size=&page_token=&search_filter=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        Integer pageSize = 56; // Integer | Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response.
        String pageToken = pageToken_example; // String | Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page.
        String searchFilter = searchFilter_example; // String | Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "="
        String sort = sort_example; // String | Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name.
        try {
            ListModelsResponse result = apiInstance.getModels(pageSize, pageToken, searchFilter, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getModels");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer pageSize = 56; // Integer | Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response.
        String pageToken = pageToken_example; // String | Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page.
        String searchFilter = searchFilter_example; // String | Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "="
        String sort = sort_example; // String | Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name.
        try {
            ListModelsResponse result = apiInstance.getModels(pageSize, pageToken, searchFilter, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getModels");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
Integer *pageSize = 56; // Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response. (optional)
String *pageToken = pageToken_example; // Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page. (optional)
String *searchFilter = searchFilter_example; // Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "=" (optional)
String *sort = sort_example; // Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get all registered models.
[apiInstance getModelsWith:pageSize
    pageToken:pageToken
    searchFilter:searchFilter
    sort:sort
              completionHandler: ^(ListModelsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var opts = { 
  'pageSize': 56, // {{Integer}} Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response.
  'pageToken': pageToken_example, // {{String}} Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page.
  'searchFilter': searchFilter_example, // {{String}} Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "="
  'sort': sort_example // {{String}} Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getModels(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getModelsExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var pageSize = 56;  // Integer | Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response. (optional) 
            var pageToken = pageToken_example;  // String | Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page. (optional) 
            var searchFilter = searchFilter_example;  // String | Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "=" (optional) 
            var sort = sort_example;  // String | Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name. (optional) 

            try
            {
                // Get all registered models.
                ListModelsResponse result = apiInstance.getModels(pageSize, pageToken, searchFilter, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getModels: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$pageSize = 56; // Integer | Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response.
$pageToken = pageToken_example; // String | Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page.
$searchFilter = searchFilter_example; // String | Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "="
$sort = sort_example; // String | Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name.

try {
    $result = $api_instance->getModels($pageSize, $pageToken, $searchFilter, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getModels: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $pageSize = 56; # Integer | Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response.
my $pageToken = pageToken_example; # String | Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page.
my $searchFilter = searchFilter_example; # String | Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "="
my $sort = sort_example; # String | Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name.

eval { 
    my $result = $api_instance->getModels(pageSize => $pageSize, pageToken => $pageToken, searchFilter => $searchFilter, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getModels: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
pageSize = 56 # Integer | Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response. (optional)
pageToken = pageToken_example # String | Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page. (optional)
searchFilter = searchFilter_example # String | Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "=" (optional)
sort = sort_example # String | Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name. (optional)

try: 
    # Get all registered models.
    api_response = api_instance.get_models(pageSize=pageSize, pageToken=pageToken, searchFilter=searchFilter, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getModels: %s\n" % e)

Parameters

Query parameters
Name Description
page_size
Integer (int32)
Page size is an optional argument to set the number of entries to return in one page. If not specified, the server will determine a page size. You must specify the argument for every request when using the provided next page_token in the response.
page_token
String
Page token is an optional argument for specifying which page of results to get. If not specified, the first page will be returned, including a token for the next page. Will be empty if there is no next page.
search_filter
String
Search filter is an optional HTTP parameter to filter results by. Supported search filter keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. For example: search_filter={"name":"foo","creator.name":"bar"}, Additionally, more advanced syntax is supported to find a range we can use the syntax {key: ["5", "7"]} to return all values that are > 5 and < 7 for the specified key. Secondly, we allow the ability to perform just a comparison operator on the specified key. For example: {key: ["<", "10"]} would return all matches for the key that are less than 10. The following operators are supported: ">", "<", ">=", "<=", "<>", "="
sort
String
Sort is an optional HTTP parameter to sort results by. Supported sort keys are: [models.id, model_name, creator_id, created_at, updated_at, description]. where "+" means sort by ascending order, and "-" means sort by descending order. For example: sort=-updated_at,+name.

Responses

Status: 200 - List models response.

{

List models response.

models:
[
{
Required: name
id:
string

The UUID of a model

name:
Model name string
creator:
{
user_name:
string

User name

}
visibility:
string

Visibility of the model.

Enum: public, private
description:
string

Model description

tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

}
]
next_page_token:
string

Token to retrieve the next page of results.

}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

modelsModelIdOptions

CORS Preflight

This endpoint handles CORS preflight requests. CORS is allowed from the control plane origin.


/models/{model_id}

Usage and SDK Samples

curl -X OPTIONS\
-H "Authorization: [[apiKey]]"\
"/api/v2/models/{model_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            apiInstance.modelsModelIdOptions(modelId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsModelIdOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            apiInstance.modelsModelIdOptions(modelId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsModelIdOptions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// CORS Preflight
[apiInstance modelsModelIdOptionsWith:modelId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.modelsModelIdOptions(modelId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class modelsModelIdOptionsExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.

            try
            {
                // CORS Preflight
                apiInstance.modelsModelIdOptions(modelId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.modelsModelIdOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.

try {
    $api_instance->modelsModelIdOptions($modelId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->modelsModelIdOptions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.

eval { 
    $api_instance->modelsModelIdOptions(modelId => $modelId);
};
if ($@) {
    warn "Exception when calling DefaultApi->modelsModelIdOptions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.

try: 
    # CORS Preflight
    api_instance.models_model_id_options(modelId)
except ApiException as e:
    print("Exception when calling DefaultApi->modelsModelIdOptions: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required

Responses

Status: 200 - Successful preflight request


modelsModelIdVersionsOptions

CORS Preflight

This endpoint handles CORS preflight requests. CORS is allowed from the control plane origin.


/models/{model_id}/versions

Usage and SDK Samples

curl -X OPTIONS\
-H "Authorization: [[apiKey]]"\
"/api/v2/models/{model_id}/versions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            apiInstance.modelsModelIdVersionsOptions(modelId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsModelIdVersionsOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            apiInstance.modelsModelIdVersionsOptions(modelId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsModelIdVersionsOptions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// CORS Preflight
[apiInstance modelsModelIdVersionsOptionsWith:modelId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.modelsModelIdVersionsOptions(modelId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class modelsModelIdVersionsOptionsExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.

            try
            {
                // CORS Preflight
                apiInstance.modelsModelIdVersionsOptions(modelId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.modelsModelIdVersionsOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.

try {
    $api_instance->modelsModelIdVersionsOptions($modelId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->modelsModelIdVersionsOptions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.

eval { 
    $api_instance->modelsModelIdVersionsOptions(modelId => $modelId);
};
if ($@) {
    warn "Exception when calling DefaultApi->modelsModelIdVersionsOptions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.

try: 
    # CORS Preflight
    api_instance.models_model_id_versions_options(modelId)
except ApiException as e:
    print("Exception when calling DefaultApi->modelsModelIdVersionsOptions: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required

Responses

Status: 200 - Successful preflight request


modelsModelIdVersionsVersionOptions

CORS Preflight

This endpoint handles CORS preflight requests. CORS is allowed from the control plane origin.


/models/{model_id}/versions/{version}

Usage and SDK Samples

curl -X OPTIONS\
-H "Authorization: [[apiKey]]"\
"/api/v2/models/{model_id}/versions/{version}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version of a model.
        try {
            apiInstance.modelsModelIdVersionsVersionOptions(modelId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsModelIdVersionsVersionOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version of a model.
        try {
            apiInstance.modelsModelIdVersionsVersionOptions(modelId, version);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsModelIdVersionsVersionOptions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *modelId = modelId_example; // Public identifier of a model.
Integer *version = 56; // Version of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// CORS Preflight
[apiInstance modelsModelIdVersionsVersionOptionsWith:modelId
    version:version
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var modelId = modelId_example; // {{String}} Public identifier of a model.
var version = 56; // {{Integer}} Version of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.modelsModelIdVersionsVersionOptions(modelId, version, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class modelsModelIdVersionsVersionOptionsExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var modelId = modelId_example;  // String | Public identifier of a model.
            var version = 56;  // Integer | Version of a model.

            try
            {
                // CORS Preflight
                apiInstance.modelsModelIdVersionsVersionOptions(modelId, version);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.modelsModelIdVersionsVersionOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$modelId = modelId_example; // String | Public identifier of a model.
$version = 56; // Integer | Version of a model.

try {
    $api_instance->modelsModelIdVersionsVersionOptions($modelId, $version);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->modelsModelIdVersionsVersionOptions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $modelId = modelId_example; # String | Public identifier of a model.
my $version = 56; # Integer | Version of a model.

eval { 
    $api_instance->modelsModelIdVersionsVersionOptions(modelId => $modelId, version => $version);
};
if ($@) {
    warn "Exception when calling DefaultApi->modelsModelIdVersionsVersionOptions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
modelId = modelId_example # String | Public identifier of a model.
version = 56 # Integer | Version of a model.

try: 
    # CORS Preflight
    api_instance.models_model_id_versions_version_options(modelId, version)
except ApiException as e:
    print("Exception when calling DefaultApi->modelsModelIdVersionsVersionOptions: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required
version*
Integer (int32)
Version of a model.
Required

Responses

Status: 200 - Successful preflight request


modelsOptions

CORS Preflight

This endpoint handles CORS preflight requests. CORS is allowed from the control plane origin.


/models

Usage and SDK Samples

curl -X OPTIONS\
-H "Authorization: [[apiKey]]"\
"/api/v2/models"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.modelsOptions();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.modelsOptions();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#modelsOptions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// CORS Preflight
[apiInstance modelsOptionsWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.modelsOptions(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class modelsOptionsExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();

            try
            {
                // CORS Preflight
                apiInstance.modelsOptions();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.modelsOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $api_instance->modelsOptions();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->modelsOptions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    $api_instance->modelsOptions();
};
if ($@) {
    warn "Exception when calling DefaultApi->modelsOptions: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # CORS Preflight
    api_instance.models_options()
except ApiException as e:
    print("Exception when calling DefaultApi->modelsOptions: %s\n" % e)

Parameters

Responses

Status: 200 - Successful preflight request


updateModel

Update model description and add tags.


/models/{model_id}

Usage and SDK Samples

curl -X PATCH\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v2/models/{model_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        Model body = ; // Model | Create model request.
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            Model result = apiInstance.updateModel(body, modelId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateModel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Model body = ; // Model | Create model request.
        String modelId = modelId_example; // String | Public identifier of a model.
        try {
            Model result = apiInstance.updateModel(body, modelId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateModel");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
Model *body = ; // Create model request.
String *modelId = modelId_example; // Public identifier of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Update model description and add tags.
[apiInstance updateModelWith:body
    modelId:modelId
              completionHandler: ^(Model output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var body = ; // {{Model}} Create model request.
var modelId = modelId_example; // {{String}} Public identifier of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateModel(bodymodelId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateModelExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var body = new Model(); // Model | Create model request.
            var modelId = modelId_example;  // String | Public identifier of a model.

            try
            {
                // Update model description and add tags.
                Model result = apiInstance.updateModel(body, modelId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.updateModel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // Model | Create model request.
$modelId = modelId_example; // String | Public identifier of a model.

try {
    $result = $api_instance->updateModel($body, $modelId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->updateModel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::Model->new(); # Model | Create model request.
my $modelId = modelId_example; # String | Public identifier of a model.

eval { 
    my $result = $api_instance->updateModel(body => $body, modelId => $modelId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->updateModel: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # Model | Create model request.
modelId = modelId_example # String | Public identifier of a model.

try: 
    # Update model description and add tags.
    api_response = api_instance.update_model(body, modelId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->updateModel: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required
Body parameters
Name Description
body *
{
Required: name
id:
string

The UUID of a model

name:
Model name string
creator:
{
user_name:
}
visibility:
string

Visibility of the model.

Enum: public, private
description:
string

Model description

tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

model_versions:
[
{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
string

Run UUID that generated the model version.

experiment_id:
string

Experiment UUID.

metrics:
[

ExperimentRun metrics.

{

Metric associated with a ExperimentRun, represented as a key-value pair.

key:
string

Key identifying this metric.

value:
number (double)

Value associated with this metric.

timestamp:
string (date-time)

The timestamp at which this metric was recorded.

step:
string (int64)

Step at which to log the metric.

}
]
params:
[

ExperimentRun parameters.

{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
}
huggingface_metadata:
{
model_info:
string
model_card:
string
}
ngc_metadata:
{
model_info:
string
manifest_yaml:
string
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}
]
}

Responses

Status: 200 - A successful model update response.

{
Required: name
id:
string

The UUID of a model

name:
Model name string
creator:
{
user_name:
string

User name

}
visibility:
string

Visibility of the model.

Enum: public, private
description:
string

Model description

tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

model_versions:
[
{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
string

Run UUID that generated the model version.

experiment_id:
string

Experiment UUID.

metrics:
[

ExperimentRun metrics.

{

Metric associated with a ExperimentRun, represented as a key-value pair.

key:
string

Key identifying this metric.

value:
number (double)

Value associated with this metric.

timestamp:
string (date-time)

The timestamp at which this metric was recorded.

step:
string (int64)

Step at which to log the metric.

}
]
params:
[

ExperimentRun parameters.

{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
}
huggingface_metadata:
{
model_info:
string
model_card:
string
}
ngc_metadata:
{
model_info:
string
manifest_yaml:
string
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}
]
}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}

updateModelVersion

Update a model version of the specified model.


/models/{model_id}/versions/{version}

Usage and SDK Samples

curl -X PATCH\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v2/models/{model_id}/versions/{version}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Bearer
        ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        UpdateModelVersionRequest body = ; // UpdateModelVersionRequest | parameters to patch
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version number of a model.
        try {
            ModelVersion result = apiInstance.updateModelVersion(body, modelId, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateModelVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        UpdateModelVersionRequest body = ; // UpdateModelVersionRequest | parameters to patch
        String modelId = modelId_example; // String | Public identifier of a model.
        Integer version = 56; // Integer | Version number of a model.
        try {
            ModelVersion result = apiInstance.updateModelVersion(body, modelId, version);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#updateModelVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
UpdateModelVersionRequest *body = ; // parameters to patch
String *modelId = modelId_example; // Public identifier of a model.
Integer *version = 56; // Version number of a model.

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Update a model version of the specified model.
[apiInstance updateModelVersionWith:body
    modelId:modelId
    version:version
              completionHandler: ^(ModelVersion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ModelRegistry = require('model_registry');
var defaultClient = ModelRegistry.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new ModelRegistry.DefaultApi()
var body = ; // {{UpdateModelVersionRequest}} parameters to patch
var modelId = modelId_example; // {{String}} Public identifier of a model.
var version = 56; // {{Integer}} Version number of a model.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateModelVersion(bodymodelIdversion, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateModelVersionExample
    {
        public void main()
        {

            // Configure API key authorization: Bearer
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DefaultApi();
            var body = new UpdateModelVersionRequest(); // UpdateModelVersionRequest | parameters to patch
            var modelId = modelId_example;  // String | Public identifier of a model.
            var version = 56;  // Integer | Version number of a model.

            try
            {
                // Update a model version of the specified model.
                ModelVersion result = apiInstance.updateModelVersion(body, modelId, version);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.updateModelVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // UpdateModelVersionRequest | parameters to patch
$modelId = modelId_example; // String | Public identifier of a model.
$version = 56; // Integer | Version number of a model.

try {
    $result = $api_instance->updateModelVersion($body, $modelId, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->updateModelVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::UpdateModelVersionRequest->new(); # UpdateModelVersionRequest | parameters to patch
my $modelId = modelId_example; # String | Public identifier of a model.
my $version = 56; # Integer | Version number of a model.

eval { 
    my $result = $api_instance->updateModelVersion(body => $body, modelId => $modelId, version => $version);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->updateModelVersion: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # UpdateModelVersionRequest | parameters to patch
modelId = modelId_example # String | Public identifier of a model.
version = 56 # Integer | Version number of a model.

try: 
    # Update a model version of the specified model.
    api_response = api_instance.update_model_version(body, modelId, version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->updateModelVersion: %s\n" % e)

Parameters

Path parameters
Name Description
model_id*
String
Public identifier of a model.
Required
version*
Integer (int32)
Version number of a model.
Required
Body parameters
Name Description
body *
{
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
}

Responses

Status: 200 - Update a model version request.

{
Required: version
model_id:
string

Model unique UUID

model_name:
string

Model name

version:
integer (int32)

Model version number.

notes:
user:
{
user_name:
string

User name

}
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
status:
Possible status of a model version string
Default: UNKNOWN
Enum: REGISTERING, UPLOADING, READY, UPLOAD_FAILED, DELETED, DELETING, DELETE_FAILED, UNKNOWN
metadata:
{
Required: model_repo_type
tags:
[
{

Tag is used to add more metadata.

key:
string

The tag key.

value:
string

The tag value.

}
]
model_repo_type:
string

The model repo format.

Enum: MLFLOW, HF, NGC
mlflowMetadata:
{
run_id:
experiment_id:
metrics:
params:
tags:
}
huggingface_metadata:
{
model_info:
model_card:
}
ngc_metadata:
{
model_info:
manifest_yaml:
}
}
created_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

updated_at:
string (date-time)

Date in YYYY-MM-DDThh:mm:ss.uuZ format (ISO 8601 format). Output only.

artifact_uri:
string

URI corresponding to where artifacts for this model version are stored.

}

Status: default - unexpected error

{
Required: code,message
code:
integer (int32)
message:
string
}