List deployments in a namespace, with optional filters, paginated in ascending name order.
curl -X GET \
-H "Authorization: [[apiKey]]" \
-H "Accept: application/json,application/yaml" \
"http://localhost/api/v1/deployments?namespace=namespace_example&name=name_example&createdBy=createdBy_example&apiStandard=apiStandard_example&modelName=modelName_example&task=task_example&state=state_example&chatEnabled=true&pageSize=56&pageToken=pageToken_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ServingServiceApi;
import java.io.File;
import java.util.*;
public class ServingServiceApiExample {
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");
// Create an instance of the API class
ServingServiceApi apiInstance = new ServingServiceApi();
String namespace = namespace_example; // String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none.
String name = name_example; // String | Filters to the deployment with this exact name.
String createdBy = createdBy_example; // String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT.
String apiStandard = apiStandard_example; // String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter.
String modelName = modelName_example; // String | Filters to deployments serving this model name.
String task = task_example; // String | Filters to deployments with this model task.
String state = state_example; // String | Filters to deployments in this lifecycle state.
Boolean chatEnabled = true; // Boolean | Filters to deployments that do, or do not, support the OpenAI chat API.
Integer pageSize = 56; // Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped.
String pageToken = pageToken_example; // String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page.
try {
serving.v1.ListDeploymentsResponse result = apiInstance.servingServiceListDeployments(namespace, name, createdBy, apiStandard, modelName, task, state, chatEnabled, pageSize, pageToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServingServiceApi#servingServiceListDeployments");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final String namespace = new String(); // String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none.
final String name = new String(); // String | Filters to the deployment with this exact name.
final String createdBy = new String(); // String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT.
final String apiStandard = new String(); // String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter.
final String modelName = new String(); // String | Filters to deployments serving this model name.
final String task = new String(); // String | Filters to deployments with this model task.
final String state = new String(); // String | Filters to deployments in this lifecycle state.
final Boolean chatEnabled = new Boolean(); // Boolean | Filters to deployments that do, or do not, support the OpenAI chat API.
final Integer pageSize = new Integer(); // Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped.
final String pageToken = new String(); // String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page.
try {
final result = await api_instance.servingServiceListDeployments(namespace, name, createdBy, apiStandard, modelName, task, state, chatEnabled, pageSize, pageToken);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->servingServiceListDeployments: $e\n');
}
import org.openapitools.client.api.ServingServiceApi;
public class ServingServiceApiExample {
public static void main(String[] args) {
ServingServiceApi apiInstance = new ServingServiceApi();
String namespace = namespace_example; // String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none.
String name = name_example; // String | Filters to the deployment with this exact name.
String createdBy = createdBy_example; // String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT.
String apiStandard = apiStandard_example; // String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter.
String modelName = modelName_example; // String | Filters to deployments serving this model name.
String task = task_example; // String | Filters to deployments with this model task.
String state = state_example; // String | Filters to deployments in this lifecycle state.
Boolean chatEnabled = true; // Boolean | Filters to deployments that do, or do not, support the OpenAI chat API.
Integer pageSize = 56; // Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped.
String pageToken = pageToken_example; // String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page.
try {
serving.v1.ListDeploymentsResponse result = apiInstance.servingServiceListDeployments(namespace, name, createdBy, apiStandard, modelName, task, state, chatEnabled, pageSize, pageToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServingServiceApi#servingServiceListDeployments");
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"];
// Create an instance of the API class
ServingServiceApi *apiInstance = [[ServingServiceApi alloc] init];
String *namespace = namespace_example; // Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none. (default to null)
String *name = name_example; // Filters to the deployment with this exact name. (optional) (default to null)
String *createdBy = createdBy_example; // Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT. (optional) (default to null)
String *apiStandard = apiStandard_example; // Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter. (optional) (default to null)
String *modelName = modelName_example; // Filters to deployments serving this model name. (optional) (default to null)
String *task = task_example; // Filters to deployments with this model task. (optional) (default to null)
String *state = state_example; // Filters to deployments in this lifecycle state. (optional) (default to null)
Boolean *chatEnabled = true; // Filters to deployments that do, or do not, support the OpenAI chat API. (optional) (default to null)
Integer *pageSize = 56; // Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped. (optional) (default to null)
String *pageToken = pageToken_example; // Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page. (optional) (default to null)
[apiInstance servingServiceListDeploymentsWith:namespace
name:name
createdBy:createdBy
apiStandard:apiStandard
modelName:modelName
task:task
state:state
chatEnabled:chatEnabled
pageSize:pageSize
pageToken:pageToken
completionHandler: ^(serving.v1.ListDeploymentsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ClouderaAiGatewayAndInference = require('cloudera_ai_gateway_and_inference');
var defaultClient = ClouderaAiGatewayAndInference.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";
// Create an instance of the API class
var api = new ClouderaAiGatewayAndInference.ServingServiceApi()
var namespace = namespace_example; // {String} Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none.
var opts = {
'name': name_example, // {String} Filters to the deployment with this exact name.
'createdBy': createdBy_example, // {String} Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT.
'apiStandard': apiStandard_example, // {String} Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter.
'modelName': modelName_example, // {String} Filters to deployments serving this model name.
'task': task_example, // {String} Filters to deployments with this model task.
'state': state_example, // {String} Filters to deployments in this lifecycle state.
'chatEnabled': true, // {Boolean} Filters to deployments that do, or do not, support the OpenAI chat API.
'pageSize': 56, // {Integer} Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped.
'pageToken': pageToken_example // {String} Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.servingServiceListDeployments(namespace, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class servingServiceListDeploymentsExample
{
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");
// Create an instance of the API class
var apiInstance = new ServingServiceApi();
var namespace = namespace_example; // String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none. (default to null)
var name = name_example; // String | Filters to the deployment with this exact name. (optional) (default to null)
var createdBy = createdBy_example; // String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT. (optional) (default to null)
var apiStandard = apiStandard_example; // String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter. (optional) (default to null)
var modelName = modelName_example; // String | Filters to deployments serving this model name. (optional) (default to null)
var task = task_example; // String | Filters to deployments with this model task. (optional) (default to null)
var state = state_example; // String | Filters to deployments in this lifecycle state. (optional) (default to null)
var chatEnabled = true; // Boolean | Filters to deployments that do, or do not, support the OpenAI chat API. (optional) (default to null)
var pageSize = 56; // Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped. (optional) (default to null)
var pageToken = pageToken_example; // String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page. (optional) (default to null)
try {
serving.v1.ListDeploymentsResponse result = apiInstance.servingServiceListDeployments(namespace, name, createdBy, apiStandard, modelName, task, state, chatEnabled, pageSize, pageToken);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling ServingServiceApi.servingServiceListDeployments: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearer
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ServingServiceApi();
$namespace = namespace_example; // String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none.
$name = name_example; // String | Filters to the deployment with this exact name.
$createdBy = createdBy_example; // String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT.
$apiStandard = apiStandard_example; // String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter.
$modelName = modelName_example; // String | Filters to deployments serving this model name.
$task = task_example; // String | Filters to deployments with this model task.
$state = state_example; // String | Filters to deployments in this lifecycle state.
$chatEnabled = true; // Boolean | Filters to deployments that do, or do not, support the OpenAI chat API.
$pageSize = 56; // Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped.
$pageToken = pageToken_example; // String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page.
try {
$result = $api_instance->servingServiceListDeployments($namespace, $name, $createdBy, $apiStandard, $modelName, $task, $state, $chatEnabled, $pageSize, $pageToken);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ServingServiceApi->servingServiceListDeployments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ServingServiceApi;
# Configure API key authorization: bearer
$WWW::OPenAPIClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ServingServiceApi->new();
my $namespace = namespace_example; # String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none.
my $name = name_example; # String | Filters to the deployment with this exact name.
my $createdBy = createdBy_example; # String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT.
my $apiStandard = apiStandard_example; # String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter.
my $modelName = modelName_example; # String | Filters to deployments serving this model name.
my $task = task_example; # String | Filters to deployments with this model task.
my $state = state_example; # String | Filters to deployments in this lifecycle state.
my $chatEnabled = true; # Boolean | Filters to deployments that do, or do not, support the OpenAI chat API.
my $pageSize = 56; # Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped.
my $pageToken = pageToken_example; # String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page.
eval {
my $result = $api_instance->servingServiceListDeployments(namespace => $namespace, name => $name, createdBy => $createdBy, apiStandard => $apiStandard, modelName => $modelName, task => $task, state => $state, chatEnabled => $chatEnabled, pageSize => $pageSize, pageToken => $pageToken);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ServingServiceApi->servingServiceListDeployments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: bearer
openapi_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.ServingServiceApi()
namespace = namespace_example # String | Namespace to list deployments from. Deployments live only in the service's serving
namespace, so any other namespace lists none. (default to null)
name = name_example # String | Filters to the deployment with this exact name. (optional) (default to null)
createdBy = createdBy_example # String | Filters to deployments created by this user. Must be a valid Kubernetes label value
(at most 63 characters; letters, digits, '-', '_' and '.', starting and ending with a
letter or digit); any other value is rejected with INVALID_ARGUMENT. (optional) (default to null)
apiStandard = apiStandard_example # String | Filters to deployments serving this inference API standard. UNSPECIFIED applies no filter. (optional) (default to null)
modelName = modelName_example # String | Filters to deployments serving this model name. (optional) (default to null)
task = task_example # String | Filters to deployments with this model task. (optional) (default to null)
state = state_example # String | Filters to deployments in this lifecycle state. (optional) (default to null)
chatEnabled = true # Boolean | Filters to deployments that do, or do not, support the OpenAI chat API. (optional) (default to null)
pageSize = 56 # Integer | Maximum number of deployments to return. Non-positive values use the server default; values above the server maximum are capped. (optional) (default to null)
pageToken = pageToken_example # String | Opaque pagination cursor from a previous response's next_page_token. Omit to start from the first page. (optional) (default to null)
try:
api_response = api_instance.serving_service_list_deployments(namespace, name=name, createdBy=createdBy, apiStandard=apiStandard, modelName=modelName, task=task, state=state, chatEnabled=chatEnabled, pageSize=pageSize, pageToken=pageToken)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServingServiceApi->servingServiceListDeployments: %s\n" % e)
extern crate ServingServiceApi;
pub fn main() {
let namespace = namespace_example; // String
let name = name_example; // String
let createdBy = createdBy_example; // String
let apiStandard = apiStandard_example; // String
let modelName = modelName_example; // String
let task = task_example; // String
let state = state_example; // String
let chatEnabled = true; // Boolean
let pageSize = 56; // Integer
let pageToken = pageToken_example; // String
let mut context = ServingServiceApi::Context::default();
let result = client.servingServiceListDeployments(namespace, name, createdBy, apiStandard, modelName, task, state, chatEnabled, pageSize, pageToken, &context).wait();
println!("{:?}", result);
}