cMLServiceCreateApplication
Create an application and implicitly start it immediately.
/api/v2/projects/{project_id}/applications
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//api/v2/projects/{project_id}/applications"
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();
CreateApplicationRequest body = ; // CreateApplicationRequest |
String projectId = projectId_example; // String | The project's identifier
try {
Application result = apiInstance.cMLServiceCreateApplication(body, projectId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CMLServiceApi#cMLServiceCreateApplication");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CMLServiceApi;
public class CMLServiceApiExample {
public static void main(String[] args) {
CMLServiceApi apiInstance = new CMLServiceApi();
CreateApplicationRequest body = ; // CreateApplicationRequest |
String projectId = projectId_example; // String | The project's identifier
try {
Application result = apiInstance.cMLServiceCreateApplication(body, projectId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CMLServiceApi#cMLServiceCreateApplication");
e.printStackTrace();
}
}
}
CreateApplicationRequest *body = ; //
String *projectId = projectId_example; // The project's identifier
CMLServiceApi *apiInstance = [[CMLServiceApi alloc] init];
// Create an application and implicitly start it immediately.
[apiInstance cMLServiceCreateApplicationWith:body
projectId:projectId
completionHandler: ^(Application output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Mlapiv2apiproto = require('mlapiv2apiproto');
var api = new Mlapiv2apiproto.CMLServiceApi()
var body = ; // {{CreateApplicationRequest}}
var projectId = projectId_example; // {{String}} The project's identifier
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.cMLServiceCreateApplication(bodyprojectId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class cMLServiceCreateApplicationExample
{
public void main()
{
var apiInstance = new CMLServiceApi();
var body = new CreateApplicationRequest(); // CreateApplicationRequest |
var projectId = projectId_example; // String | The project's identifier
try
{
// Create an application and implicitly start it immediately.
Application result = apiInstance.cMLServiceCreateApplication(body, projectId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CMLServiceApi.cMLServiceCreateApplication: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiCMLServiceApi();
$body = ; // CreateApplicationRequest |
$projectId = projectId_example; // String | The project's identifier
try {
$result = $api_instance->cMLServiceCreateApplication($body, $projectId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CMLServiceApi->cMLServiceCreateApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CMLServiceApi;
my $api_instance = WWW::SwaggerClient::CMLServiceApi->new();
my $body = WWW::SwaggerClient::Object::CreateApplicationRequest->new(); # CreateApplicationRequest |
my $projectId = projectId_example; # String | The project's identifier
eval {
my $result = $api_instance->cMLServiceCreateApplication(body => $body, projectId => $projectId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CMLServiceApi->cMLServiceCreateApplication: $@\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()
body = # CreateApplicationRequest |
projectId = projectId_example # String | The project's identifier
try:
# Create an application and implicitly start it immediately.
api_response = api_instance.c_ml_service_create_application(body, projectId)
pprint(api_response)
except ApiException as e:
print("Exception when calling CMLServiceApi->cMLServiceCreateApplication: %s\n" % e)
Parameters
Name | Description |
---|---|
project_id* |
String
The project's identifier
Required
|
Name | Description |
---|---|
body * |
{
Parameters to create an applications.
project_id:
The project's identifier
string
subdomain:
environment:
kernel:
bypass_authentication:
|
Responses
Status: 200 - A successful response.
A single application.
APPLICATION_UNKNOWN
, APPLICATION_STARTING
, APPLICATION_RUNNING
, APPLICATION_STOPPING
, APPLICATION_STOPPED
, APPLICATION_FAILED