addProjectCollaborator
Add a project collaborator
/api/v2/projects/{project_id}/collaborators/{username}
Usage and SDK Samples
curl -X PUT\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//api/v2/projects/{project_id}/collaborators/{username}"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();
        AddProjectCollaboratorRequest body = ; // AddProjectCollaboratorRequest | 
        String projectId = projectId_example; // String | The identifier of the project.
        String username = username_example; // String | The username of the collaborator to add.
        try {
            AddProjectCollaboratorResponse result = apiInstance.addProjectCollaborator(body, projectId, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CMLServiceApi#addProjectCollaborator");
            e.printStackTrace();
        }
    }
}import io.swagger.client.api.CMLServiceApi;
public class CMLServiceApiExample {
    public static void main(String[] args) {
        CMLServiceApi apiInstance = new CMLServiceApi();
        AddProjectCollaboratorRequest body = ; // AddProjectCollaboratorRequest | 
        String projectId = projectId_example; // String | The identifier of the project.
        String username = username_example; // String | The username of the collaborator to add.
        try {
            AddProjectCollaboratorResponse result = apiInstance.addProjectCollaborator(body, projectId, username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CMLServiceApi#addProjectCollaborator");
            e.printStackTrace();
        }
    }
}AddProjectCollaboratorRequest *body = ; // 
String *projectId = projectId_example; // The identifier of the project.
String *username = username_example; // The username of the collaborator to add.
CMLServiceApi *apiInstance = [[CMLServiceApi alloc] init];
// Add a project collaborator
[apiInstance addProjectCollaboratorWith:body
    projectId:projectId
    username:username
              completionHandler: ^(AddProjectCollaboratorResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Mlapiv2apiproto = require('mlapiv2apiproto');
var api = new Mlapiv2apiproto.CMLServiceApi()
var body = ; // {{AddProjectCollaboratorRequest}} 
var projectId = projectId_example; // {{String}} The identifier of the project.
var username = username_example; // {{String}} The username of the collaborator to add.
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addProjectCollaborator(bodyprojectIdusername, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
    public class addProjectCollaboratorExample
    {
        public void main()
        {
            var apiInstance = new CMLServiceApi();
            var body = new AddProjectCollaboratorRequest(); // AddProjectCollaboratorRequest | 
            var projectId = projectId_example;  // String | The identifier of the project.
            var username = username_example;  // String | The username of the collaborator to add.
            try
            {
                // Add a project collaborator
                AddProjectCollaboratorResponse result = apiInstance.addProjectCollaborator(body, projectId, username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CMLServiceApi.addProjectCollaborator: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiCMLServiceApi();
$body = ; // AddProjectCollaboratorRequest | 
$projectId = projectId_example; // String | The identifier of the project.
$username = username_example; // String | The username of the collaborator to add.
try {
    $result = $api_instance->addProjectCollaborator($body, $projectId, $username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CMLServiceApi->addProjectCollaborator: ', $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::AddProjectCollaboratorRequest->new(); # AddProjectCollaboratorRequest | 
my $projectId = projectId_example; # String | The identifier of the project.
my $username = username_example; # String | The username of the collaborator to add.
eval { 
    my $result = $api_instance->addProjectCollaborator(body => $body, projectId => $projectId, username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CMLServiceApi->addProjectCollaborator: $@\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 =  # AddProjectCollaboratorRequest | 
projectId = projectId_example # String | The identifier of the project.
username = username_example # String | The username of the collaborator to add.
try: 
    # Add a project collaborator
    api_response = api_instance.add_project_collaborator(body, projectId, username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CMLServiceApi->addProjectCollaborator: %s\n" % e)Parameters
| Name | Description | 
|---|---|
| project_id* | 
                                                  
                                                      String
                                                  
                                  
                                                       
                                                          The identifier of the project.
                                                       
                                                      Required
                                                   | 
| username* | 
                                                  
                                                      String
                                                  
                                  
                                                       
                                                          The username of the collaborator to add.
                                                       
                                                      Required
                                                   | 
| Name | Description | 
|---|---|
| body * |