# Inventory Service - Project - REST API

## API and SDK Documentation

Version: 1.0.0

REST API for Inventory Service

# Project

# createProject

Creates new Project

    /projects

### Usage and SDK Samples

    curl -X POST "https://localhost/inventory-service/api/v1/projects"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.ProjectApi;

    import java.io.File;
    import java.util.*;

    public class ProjectApiExample {

        public static void main(String[] args) {

            ProjectApi apiInstance = new ProjectApi();
            Project body = ; // Project | Project object that needs to be created
            try {
                Project result = apiInstance.createProject(body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#createProject");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ProjectApi;

    public class ProjectApiExample {

        public static void main(String[] args) {
            ProjectApi apiInstance = new ProjectApi();
            Project body = ; // Project | Project object that needs to be created
            try {
                Project result = apiInstance.createProject(body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#createProject");
                e.printStackTrace();
            }
        }
    }

    Project *body = ; // Project object that needs to be created

    ProjectApi *apiInstance = [[ProjectApi alloc] init];

    // Creates new Project
    [apiInstance createProjectWith:body
                  completionHandler: ^(Project output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceProjectRestApi = require('inventory_service___project___rest_api');

    var api = new InventoryServiceProjectRestApi.ProjectApi()

    var body = ; // {Project} Project object that needs to be created

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.createProject(body, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class createProjectExample
        {
            public void main()
            {

                var apiInstance = new ProjectApi();
                var body = new Project(); // Project | Project object that needs to be created

                try
                {
                    // Creates new Project
                    Project result = apiInstance.createProject(body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ProjectApi.createProject: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\ProjectApi();
    $body = ; // Project | Project object that needs to be created

    try {
        $result = $api_instance->createProject($body);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling ProjectApi->createProject: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::ProjectApi;

    my $api_instance = WWW::SwaggerClient::ProjectApi->new();
    my $body = WWW::SwaggerClient::Object::Project->new(); # Project | Project object that needs to be created

    eval {
        my $result = $api_instance->createProject(body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling ProjectApi->createProject: $@\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.ProjectApi()
    body =  # Project | Project object that needs to be created

    try:
        # Creates new Project
        api_response = api_instance.create_project(body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->createProject: %s\n" % e)

## Parameters

Body parameters

Name | Description
--- | ---
body * |

## Responses

### Status: 201 - Project created

### Status: 405 - Invalid input

# deleteProject

Deletes an Project

    /projects/{projectId}

### Usage and SDK Samples

    curl -X DELETE "https://localhost/inventory-service/api/v1/projects/{projectId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.ProjectApi;

    import java.io.File;
    import java.util.*;

    public class ProjectApiExample {

        public static void main(String[] args) {

            ProjectApi apiInstance = new ProjectApi();
            Long projectId = 789; // Long | Project's id
            try {
                apiInstance.deleteProject(projectId);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#deleteProject");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ProjectApi;

    public class ProjectApiExample {

        public static void main(String[] args) {
            ProjectApi apiInstance = new ProjectApi();
            Long projectId = 789; // Long | Project's id
            try {
                apiInstance.deleteProject(projectId);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#deleteProject");
                e.printStackTrace();
            }
        }
    }

    Long *projectId = 789; // Project's id

    ProjectApi *apiInstance = [[ProjectApi alloc] init];

    // Deletes an Project
    [apiInstance deleteProjectWith:projectId
                  completionHandler: ^(NSError* error) {
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceProjectRestApi = require('inventory_service___project___rest_api');

    var api = new InventoryServiceProjectRestApi.ProjectApi()

    var projectId = 789; // {Long} Project's id

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully.');
      }
    };
    api.deleteProject(projectId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class deleteProjectExample
        {
            public void main()
            {

                var apiInstance = new ProjectApi();
                var projectId = 789;  // Long | Project's id

                try
                {
                    // Deletes an Project
                    apiInstance.deleteProject(projectId);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ProjectApi.deleteProject: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\ProjectApi();
    $projectId = 789; // Long | Project's id

    try {
        $api_instance->deleteProject($projectId);
    } catch (Exception $e) {
        echo 'Exception when calling ProjectApi->deleteProject: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::ProjectApi;

    my $api_instance = WWW::SwaggerClient::ProjectApi->new();
    my $projectId = 789; # Long | Project's id

    eval {
        $api_instance->deleteProject(projectId => $projectId);
    };
    if ($@) {
        warn "Exception when calling ProjectApi->deleteProject: $@\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.ProjectApi()
    projectId = 789 # Long | Project's id

    try:
        # Deletes an Project
        api_instance.delete_project(projectId)
    except ApiException as e:
        print("Exception when calling ProjectApi->deleteProject: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
projectId* | Long (int64) Project's id Required

## Responses

### Status: 200 - Project was deleted.

### Status: 404 - Specified Project does not exist.

# getProject

Gets Project based on projectId

    /projects/{projectId}

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/projects/{projectId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.ProjectApi;

    import java.io.File;
    import java.util.*;

    public class ProjectApiExample {

        public static void main(String[] args) {

            ProjectApi apiInstance = new ProjectApi();
            Long projectId = 789; // Long | Project's id
            try {
                Project result = apiInstance.getProject(projectId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#getProject");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ProjectApi;

    public class ProjectApiExample {

        public static void main(String[] args) {
            ProjectApi apiInstance = new ProjectApi();
            Long projectId = 789; // Long | Project's id
            try {
                Project result = apiInstance.getProject(projectId);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#getProject");
                e.printStackTrace();
            }
        }
    }

    Long *projectId = 789; // Project's id

    ProjectApi *apiInstance = [[ProjectApi alloc] init];

    // Gets Project based on projectId
    [apiInstance getProjectWith:projectId
                  completionHandler: ^(Project output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceProjectRestApi = require('inventory_service___project___rest_api');

    var api = new InventoryServiceProjectRestApi.ProjectApi()

    var projectId = 789; // {Long} Project's id

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getProject(projectId, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class getProjectExample
        {
            public void main()
            {

                var apiInstance = new ProjectApi();
                var projectId = 789;  // Long | Project's id

                try
                {
                    // Gets Project based on projectId
                    Project result = apiInstance.getProject(projectId);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ProjectApi.getProject: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\ProjectApi();
    $projectId = 789; // Long | Project's id

    try {
        $result = $api_instance->getProject($projectId);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling ProjectApi->getProject: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::ProjectApi;

    my $api_instance = WWW::SwaggerClient::ProjectApi->new();
    my $projectId = 789; # Long | Project's id

    eval {
        my $result = $api_instance->getProject(projectId => $projectId);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling ProjectApi->getProject: $@\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.ProjectApi()
    projectId = 789 # Long | Project's id

    try:
        # Gets Project based on projectId
        api_response = api_instance.get_project(projectId)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->getProject: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
projectId* | Long (int64) Project's id Required

## Responses

### Status: 200 - The Project

### Status: 404 - Requested Project does not exist.

# getProjects

Gets all Projects

    /projects

### Usage and SDK Samples

    curl -X GET "https://localhost/inventory-service/api/v1/projects"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.ProjectApi;

    import java.io.File;
    import java.util.*;

    public class ProjectApiExample {

        public static void main(String[] args) {

            ProjectApi apiInstance = new ProjectApi();
            try {
                array[Project] result = apiInstance.getProjects();
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#getProjects");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ProjectApi;

    public class ProjectApiExample {

        public static void main(String[] args) {
            ProjectApi apiInstance = new ProjectApi();
            try {
                array[Project] result = apiInstance.getProjects();
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#getProjects");
                e.printStackTrace();
            }
        }
    }

    ProjectApi *apiInstance = [[ProjectApi alloc] init];

    // Gets all Projects
    [apiInstance getProjectsWithCompletionHandler:
                  ^(array[Project] output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceProjectRestApi = require('inventory_service___project___rest_api');

    var api = new InventoryServiceProjectRestApi.ProjectApi()

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.getProjects(callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class getProjectsExample
        {
            public void main()
            {

                var apiInstance = new ProjectApi();

                try
                {
                    // Gets all Projects
                    array[Project] result = apiInstance.getProjects();
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ProjectApi.getProjects: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\ProjectApi();

    try {
        $result = $api_instance->getProjects();
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling ProjectApi->getProjects: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::ProjectApi;

    my $api_instance = WWW::SwaggerClient::ProjectApi->new();

    eval {
        my $result = $api_instance->getProjects();
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling ProjectApi->getProjects: $@\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.ProjectApi()

    try:
        # Gets all Projects
        api_response = api_instance.get_projects()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->getProjects: %s\n" % e)

## Parameters

## Responses

### Status: 200 - All Projects

# updateProject

Updates Project based on projectId

    /projects/{projectId}

### Usage and SDK Samples

    curl -X PUT "https://localhost/inventory-service/api/v1/projects/{projectId}"

    import io.swagger.client.*;
    import io.swagger.client.auth.*;
    import io.swagger.client.model.*;
    import io.swagger.client.api.ProjectApi;

    import java.io.File;
    import java.util.*;

    public class ProjectApiExample {

        public static void main(String[] args) {

            ProjectApi apiInstance = new ProjectApi();
            Long projectId = 789; // Long | Project's id
            Project body = ; // Project | Project object that needs to be updated
            try {
                Project result = apiInstance.updateProject(projectId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#updateProject");
                e.printStackTrace();
            }
        }
    }

    import io.swagger.client.api.ProjectApi;

    public class ProjectApiExample {

        public static void main(String[] args) {
            ProjectApi apiInstance = new ProjectApi();
            Long projectId = 789; // Long | Project's id
            Project body = ; // Project | Project object that needs to be updated
            try {
                Project result = apiInstance.updateProject(projectId, body);
                System.out.println(result);
            } catch (ApiException e) {
                System.err.println("Exception when calling ProjectApi#updateProject");
                e.printStackTrace();
            }
        }
    }

    Long *projectId = 789; // Project's id
    Project *body = ; // Project object that needs to be updated

    ProjectApi *apiInstance = [[ProjectApi alloc] init];

    // Updates Project based on projectId
    [apiInstance updateProjectWith:projectId
        body:body
                  completionHandler: ^(Project output, NSError* error) {
                                if (output) {
                                    NSLog(@"%@", output);
                                }
                                if (error) {
                                    NSLog(@"Error: %@", error);
                                }
                            }];

    var InventoryServiceProjectRestApi = require('inventory_service___project___rest_api');

    var api = new InventoryServiceProjectRestApi.ProjectApi()

    var projectId = 789; // {Long} Project's id

    var body = ; // {Project} Project object that needs to be updated

    var callback = function(error, data, response) {
      if (error) {
        console.error(error);
      } else {
        console.log('API called successfully. Returned data: ' + data);
      }
    };
    api.updateProject(projectId, body, callback);

    using System;
    using System.Diagnostics;
    using IO.Swagger.Api;
    using IO.Swagger.Client;
    using IO.Swagger.Model;

    namespace Example
    {
        public class updateProjectExample
        {
            public void main()
            {

                var apiInstance = new ProjectApi();
                var projectId = 789;  // Long | Project's id
                var body = new Project(); // Project | Project object that needs to be updated

                try
                {
                    // Updates Project based on projectId
                    Project result = apiInstance.updateProject(projectId, body);
                    Debug.WriteLine(result);
                }
                catch (Exception e)
                {
                    Debug.Print("Exception when calling ProjectApi.updateProject: " + e.Message );
                }
            }
        }
    }

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');

    $api_instance = new Swagger\Client\Api\ProjectApi();
    $projectId = 789; // Long | Project's id
    $body = ; // Project | Project object that needs to be updated

    try {
        $result = $api_instance->updateProject($projectId, $body);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling ProjectApi->updateProject: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    use Data::Dumper;
    use WWW::SwaggerClient::Configuration;
    use WWW::SwaggerClient::ProjectApi;

    my $api_instance = WWW::SwaggerClient::ProjectApi->new();
    my $projectId = 789; # Long | Project's id
    my $body = WWW::SwaggerClient::Object::Project->new(); # Project | Project object that needs to be updated

    eval {
        my $result = $api_instance->updateProject(projectId => $projectId, body => $body);
        print Dumper($result);
    };
    if ($@) {
        warn "Exception when calling ProjectApi->updateProject: $@\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.ProjectApi()
    projectId = 789 # Long | Project's id
    body =  # Project | Project object that needs to be updated

    try:
        # Updates Project based on projectId
        api_response = api_instance.update_project(projectId, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ProjectApi->updateProject: %s\n" % e)

## Parameters

Path parameters

Name | Description
--- | ---
projectId* | Long (int64) Project's id Required

Body parameters

Name | Description
--- | ---
body * |

## Responses

### Status: 200 - The Project

### Status: 404 - Requested Project does not exist.

Generated 2018-12-11T17:24:07.852+01:00