createProject
Create a project
Create a new project within a given organization
/projects
Usage and SDK Samples
curl -X POST \
-H "API-Key: [[apiKey]]" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://api.curiogenomics.com/v1/projects" \
-d '{
"organizationId" : "organizationId",
"name" : "name",
"description" : "description"
}'
import com.curiogenomics.client.*;
import com.curiogenomics.client.auth.*;
import com.curiogenomics.client.model.*;
import com.curiogenomics.client.api.ProjectsApi;
import java.io.File;
import java.util.*;
public class ProjectsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: API-Key
ApiKeyAuth API-Key = (ApiKeyAuth) defaultClient.getAuthentication("API-Key");
API-Key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.setApiKeyPrefix("Token");
// Create an instance of the API class
ProjectsApi apiInstance = new ProjectsApi();
CreateProjectRequest createProjectRequest = ; // CreateProjectRequest |
try {
Project result = apiInstance.createProject(createProjectRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#createProject");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final CreateProjectRequest createProjectRequest = new CreateProjectRequest(); // CreateProjectRequest |
try {
final result = await api_instance.createProject(createProjectRequest);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createProject: $e\n');
}
import com.curiogenomics.client.api.ProjectsApi;
public class ProjectsApiExample {
public static void main(String[] args) {
ProjectsApi apiInstance = new ProjectsApi();
CreateProjectRequest createProjectRequest = ; // CreateProjectRequest |
try {
Project result = apiInstance.createProject(createProjectRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#createProject");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: API-Key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"API-Key"];
// Create an instance of the API class
ProjectsApi *apiInstance = [[ProjectsApi alloc] init];
CreateProjectRequest *createProjectRequest = ; //
// Create a project
[apiInstance createProjectWith:createProjectRequest
completionHandler: ^(Project output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CurioGenomicsServicesApi = require('curio_genomics_services_api');
var defaultClient = CurioGenomicsServicesApi.ApiClient.instance;
// Configure API key authorization: API-Key
var API-Key = defaultClient.authentications['API-Key'];
API-Key.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.apiKeyPrefix['API-Key'] = "Token";
// Create an instance of the API class
var api = new CurioGenomicsServicesApi.ProjectsApi()
var createProjectRequest = ; // {CreateProjectRequest}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createProject(createProjectRequest, callback);
using System;
using System.Diagnostics;
using Com.CurioGenomics.Api;
using Com.CurioGenomics.Client;
using Com.CurioGenomics.Model;
namespace Example
{
public class createProjectExample
{
public void main()
{
// Configure API key authorization: API-Key
Configuration.Default.ApiKey.Add("API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("API-Key", "Bearer");
// Create an instance of the API class
var apiInstance = new ProjectsApi();
var createProjectRequest = new CreateProjectRequest(); // CreateProjectRequest |
try {
// Create a project
Project result = apiInstance.createProject(createProjectRequest);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling ProjectsApi.createProject: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API-Key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('API-Key', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ProjectsApi();
$createProjectRequest = ; // CreateProjectRequest |
try {
$result = $api_instance->createProject($createProjectRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->createProject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ProjectsApi;
# Configure API key authorization: API-Key
$WWW::OPenAPIClient::Configuration::api_key->{'API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'API-Key'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ProjectsApi->new();
my $createProjectRequest = WWW::OPenAPIClient::Object::CreateProjectRequest->new(); # CreateProjectRequest |
eval {
my $result = $api_instance->createProject(createProjectRequest => $createProjectRequest);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ProjectsApi->createProject: $@\n";
}
from __future__ import print_statement
import time
import curio_genomics_client
from curio_genomics_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: API-Key
curio_genomics_client.configuration.api_key['API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# curio_genomics_client.configuration.api_key_prefix['API-Key'] = 'Bearer'
# Create an instance of the API class
api_instance = curio_genomics_client.ProjectsApi()
createProjectRequest = # CreateProjectRequest |
try:
# Create a project
api_response = api_instance.create_project(createProjectRequest)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProjectsApi->createProject: %s\n" % e)
extern crate ProjectsApi;
pub fn main() {
let createProjectRequest = ; // CreateProjectRequest
let mut context = ProjectsApi::Context::default();
let result = client.createProject(createProjectRequest, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
createProjectRequest * |
The set of properties to be associated with the new project |