batchListProjects
Return a list of projects given a list of project IDs. This method will only return projects that the calling user has access to, and can be used in situations where information about a subset of projects (like project names) is needed.
/api/v2/projects/batch
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"//api/v2/projects/batch?project_ids="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CMLServiceApi;
import java.io.File;
import java.util.*;
public class CMLServiceApiExample {
public static void main(String[] args) {
CMLServiceApi apiInstance = new CMLServiceApi();
array[String] projectIds = ; // array[String] | The list of project IDs to return projects for.
try {
BatchListProjectsResponse result = apiInstance.batchListProjects(projectIds);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CMLServiceApi#batchListProjects");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CMLServiceApi;
public class CMLServiceApiExample {
public static void main(String[] args) {
CMLServiceApi apiInstance = new CMLServiceApi();
array[String] projectIds = ; // array[String] | The list of project IDs to return projects for.
try {
BatchListProjectsResponse result = apiInstance.batchListProjects(projectIds);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CMLServiceApi#batchListProjects");
e.printStackTrace();
}
}
}
array[String] *projectIds = ; // The list of project IDs to return projects for. (optional)
CMLServiceApi *apiInstance = [[CMLServiceApi alloc] init];
// Return a list of projects given a list of project IDs. This method will only return
projects that the calling user has access to, and can be used in situations where
information about a subset of projects (like project names) is needed.
[apiInstance batchListProjectsWith:projectIds
completionHandler: ^(BatchListProjectsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Mlapiv2apiproto = require('mlapiv2apiproto');
var api = new Mlapiv2apiproto.CMLServiceApi()
var opts = {
'projectIds': // {{array[String]}} The list of project IDs to return projects for.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.batchListProjects(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class batchListProjectsExample
{
public void main()
{
var apiInstance = new CMLServiceApi();
var projectIds = new array[String](); // array[String] | The list of project IDs to return projects for. (optional)
try
{
// Return a list of projects given a list of project IDs. This method will only return
projects that the calling user has access to, and can be used in situations where
information about a subset of projects (like project names) is needed.
BatchListProjectsResponse result = apiInstance.batchListProjects(projectIds);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CMLServiceApi.batchListProjects: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiCMLServiceApi();
$projectIds = ; // array[String] | The list of project IDs to return projects for.
try {
$result = $api_instance->batchListProjects($projectIds);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CMLServiceApi->batchListProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CMLServiceApi;
my $api_instance = WWW::SwaggerClient::CMLServiceApi->new();
my $projectIds = []; # array[String] | The list of project IDs to return projects for.
eval {
my $result = $api_instance->batchListProjects(projectIds => $projectIds);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CMLServiceApi->batchListProjects: $@\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.CMLServiceApi()
projectIds = # array[String] | The list of project IDs to return projects for. (optional)
try:
# Return a list of projects given a list of project IDs. This method will only return
projects that the calling user has access to, and can be used in situations where
information about a subset of projects (like project names) is needed.
api_response = api_instance.batch_list_projects(projectIds=projectIds)
pprint(api_response)
except ApiException as e:
print("Exception when calling CMLServiceApi->batchListProjects: %s\n" % e)
Parameters
Name | Description |
---|---|
project_ids |
array[String]
The list of project IDs to return projects for.
|
Responses
Status: 200 - A successful response.
Respons object for listing projects given a list of IDs.