Fablabs.io API

Admin

createUser

Create a new user

Create a new user in the system. The user will receive a welcome email and will be able to set the password at first login


/users

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;

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

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AdminApi apiInstance = new AdminApi();
        Body body = ; // Body | Data for the user to create
        try {
            apiInstance.createUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#createUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminApi;

public class AdminApiExample {

    public static void main(String[] args) {
        AdminApi apiInstance = new AdminApi();
        Body body = ; // Body | Data for the user to create
        try {
            apiInstance.createUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#createUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body *body = ; // Data for the user to create

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

// Create a new user
[apiInstance createUserWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.AdminApi()

var body = ; // {Body} Data for the user to create


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createUser(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUserExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AdminApi();
            var body = new Body(); // Body | Data for the user to create

            try
            {
                // Create a new user
                apiInstance.createUser(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminApi.createUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\AdminApi();
$body = ; // Body | Data for the user to create

try {
    $api_instance->createUser($body);
} catch (Exception $e) {
    echo 'Exception when calling AdminApi->createUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AdminApi->new();
my $body = WWW::SwaggerClient::Object::Body->new(); # Body | Data for the user to create

eval { 
    $api_instance->createUser(body => $body);
};
if ($@) {
    warn "Exception when calling AdminApi->createUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AdminApi()
body =  # Body | Data for the user to create

try: 
    # Create a new user
    api_instance.create_user(body)
except ApiException as e:
    print("Exception when calling AdminApi->createUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad request: A required parameter is missing


getUser

Get a user by username

This method allows to get a specific user by username


/users/{username}

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/users/{username}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;

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

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AdminApi apiInstance = new AdminApi();
        String username = username_example; // String | Username for the requested user
        try {
            inline_response_200_2 result = apiInstance.getUser(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminApi;

public class AdminApiExample {

    public static void main(String[] args) {
        AdminApi apiInstance = new AdminApi();
        String username = username_example; // String | Username for the requested user
        try {
            inline_response_200_2 result = apiInstance.getUser(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#getUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *username = username_example; // Username for the requested user

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

// Get a user by username
[apiInstance getUserWith:username
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.AdminApi()

var username = username_example; // {String} Username for the requested user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUser(username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AdminApi();
            var username = username_example;  // String | Username for the requested user

            try
            {
                // Get a user by username
                inline_response_200_2 result = apiInstance.getUser(username);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\AdminApi();
$username = username_example; // String | Username for the requested user

try {
    $result = $api_instance->getUser($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AdminApi->new();
my $username = username_example; # String | Username for the requested user

eval { 
    my $result = $api_instance->getUser(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminApi->getUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AdminApi()
username = username_example # String | Username for the requested user

try: 
    # Get a user by username
    api_response = api_instance.get_user(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminApi->getUser: %s\n" % e)

Parameters

Path parameters
Name Description
username*
String
Username for the requested user
Required

Responses

Status: 200 - User Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


listUsers

List all users


/users

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/users?page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;

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

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AdminApi apiInstance = new AdminApi();
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_1 result = apiInstance.listUsers(page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#listUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminApi;

public class AdminApiExample {

    public static void main(String[] args) {
        AdminApi apiInstance = new AdminApi();
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_1 result = apiInstance.listUsers(page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#listUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// List all users
[apiInstance listUsersWith:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.AdminApi()

var opts = { 
  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listUsers(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listUsersExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AdminApi();
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // List all users
                inline_response_200_1 result = apiInstance.listUsers(page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminApi.listUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\AdminApi();
$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->listUsers($page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminApi->listUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AdminApi->new();
my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->listUsers(page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminApi->listUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AdminApi()
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # List all users
    api_response = api_instance.list_users(page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminApi->listUsers: %s\n" % e)

Parameters

Query parameters
Name Description
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Users list


searchUsers

Search for a user

This method allows to search for a specific user by username or email


/users/search

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/users/search"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;

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

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        AdminApi apiInstance = new AdminApi();
        Body_2 body = ; // Body_2 | Username or email in a dictionary
        try {
            inline_response_200_2 result = apiInstance.searchUsers(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#searchUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminApi;

public class AdminApiExample {

    public static void main(String[] args) {
        AdminApi apiInstance = new AdminApi();
        Body_2 body = ; // Body_2 | Username or email in a dictionary
        try {
            inline_response_200_2 result = apiInstance.searchUsers(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#searchUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body_2 *body = ; // Username or email in a dictionary

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

// Search for a user
[apiInstance searchUsersWith:body
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.AdminApi()

var body = ; // {Body_2} Username or email in a dictionary


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchUsers(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchUsersExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AdminApi();
            var body = new Body_2(); // Body_2 | Username or email in a dictionary

            try
            {
                // Search for a user
                inline_response_200_2 result = apiInstance.searchUsers(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminApi.searchUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\AdminApi();
$body = ; // Body_2 | Username or email in a dictionary

try {
    $result = $api_instance->searchUsers($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminApi->searchUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::AdminApi->new();
my $body = WWW::SwaggerClient::Object::Body_2->new(); # Body_2 | Username or email in a dictionary

eval { 
    my $result = $api_instance->searchUsers(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminApi->searchUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.AdminApi()
body =  # Body_2 | Username or email in a dictionary

try: 
    # Search for a user
    api_response = api_instance.search_users(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminApi->searchUsers: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - User Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


Labs

addLabMachineById

Add a machine to a lab by id

This method allows to add a machine to a lab by id


/labs/{id}/relationships/machines

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/labs/{id}/relationships/machines"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        Body_5 body = ; // Body_5 | data to be updated
        try {
            RelationshipLink result = apiInstance.addLabMachineById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#addLabMachineById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        Body_5 body = ; // Body_5 | data to be updated
        try {
            RelationshipLink result = apiInstance.addLabMachineById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#addLabMachineById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested lab
Body_5 *body = ; // data to be updated

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

// Add a machine to a lab by id
[apiInstance addLabMachineByIdWith:id
    body:body
              completionHandler: ^(RelationshipLink output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var id = 789; // {Long} id for the requested lab

var body = ; // {Body_5} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addLabMachineById(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addLabMachineByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var id = 789;  // Long | id for the requested lab
            var body = new Body_5(); // Body_5 | data to be updated

            try
            {
                // Add a machine to a lab by id
                RelationshipLink result = apiInstance.addLabMachineById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.addLabMachineById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$id = 789; // Long | id for the requested lab
$body = ; // Body_5 | data to be updated

try {
    $result = $api_instance->addLabMachineById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->addLabMachineById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $id = 789; # Long | id for the requested lab
my $body = WWW::SwaggerClient::Object::Body_5->new(); # Body_5 | data to be updated

eval { 
    my $result = $api_instance->addLabMachineById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->addLabMachineById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
id = 789 # Long | id for the requested lab
body =  # Body_5 | data to be updated

try: 
    # Add a machine to a lab by id
    api_response = api_instance.add_lab_machine_by_id(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->addLabMachineById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested lab
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Generic response for relationships

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


createLab

Create a new lab

This method allows to create a new lab


/labs

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/labs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        Body_3 body = ; // Body_3 | data to be updated
        try {
            inline_response_200_4 result = apiInstance.createLab(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#createLab");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        Body_3 body = ; // Body_3 | data to be updated
        try {
            inline_response_200_4 result = apiInstance.createLab(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#createLab");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body_3 *body = ; // data to be updated

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

// Create a new lab 
[apiInstance createLabWith:body
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var body = ; // {Body_3} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLab(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createLabExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var body = new Body_3(); // Body_3 | data to be updated

            try
            {
                // Create a new lab 
                inline_response_200_4 result = apiInstance.createLab(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.createLab: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$body = ; // Body_3 | data to be updated

try {
    $result = $api_instance->createLab($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->createLab: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $body = WWW::SwaggerClient::Object::Body_3->new(); # Body_3 | data to be updated

eval { 
    my $result = $api_instance->createLab(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->createLab: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
body =  # Body_3 | data to be updated

try: 
    # Create a new lab 
    api_response = api_instance.create_lab(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->createLab: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Lab Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


getLabById

Get a lab by id

This method allows to get a specific lab by id


/labs/{id}

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/labs/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        try {
            inline_response_200_4 result = apiInstance.getLabById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#getLabById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        try {
            inline_response_200_4 result = apiInstance.getLabById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#getLabById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested lab

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

// Get a lab by id
[apiInstance getLabByIdWith:id
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var id = 789; // {Long} id for the requested lab


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLabById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLabByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var id = 789;  // Long | id for the requested lab

            try
            {
                // Get a lab by id
                inline_response_200_4 result = apiInstance.getLabById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.getLabById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$id = 789; // Long | id for the requested lab

try {
    $result = $api_instance->getLabById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->getLabById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $id = 789; # Long | id for the requested lab

eval { 
    my $result = $api_instance->getLabById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->getLabById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
id = 789 # Long | id for the requested lab

try: 
    # Get a lab by id
    api_response = api_instance.get_lab_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->getLabById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested lab
Required

Responses

Status: 200 - Lab Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


getLabMachinesById

Get machines belonging to a lab by id

This method allows to get machines belonging to a lab


/labs/{id}/relationships/machines

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/labs/{id}/relationships/machines"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        try {
            RelationshipLink result = apiInstance.getLabMachinesById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#getLabMachinesById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        try {
            RelationshipLink result = apiInstance.getLabMachinesById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#getLabMachinesById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested lab

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

// Get machines belonging to a lab by id
[apiInstance getLabMachinesByIdWith:id
              completionHandler: ^(RelationshipLink output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var id = 789; // {Long} id for the requested lab


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLabMachinesById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLabMachinesByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var id = 789;  // Long | id for the requested lab

            try
            {
                // Get machines belonging to a lab by id
                RelationshipLink result = apiInstance.getLabMachinesById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.getLabMachinesById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$id = 789; // Long | id for the requested lab

try {
    $result = $api_instance->getLabMachinesById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->getLabMachinesById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $id = 789; # Long | id for the requested lab

eval { 
    my $result = $api_instance->getLabMachinesById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->getLabMachinesById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
id = 789 # Long | id for the requested lab

try: 
    # Get machines belonging to a lab by id
    api_response = api_instance.get_lab_machines_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->getLabMachinesById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested lab
Required

Responses

Status: 200 - Generic response for relationships

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


listLabs

List all labs

This method allows to list labs


/labs

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/labs?sort=&sort_order=&page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_3 result = apiInstance.listLabs(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#listLabs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_3 result = apiInstance.listLabs(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#listLabs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *sort = sort_example; // Field for sorting (optional) (default to id)
String *sortOrder = sortOrder_example; // Ascending or descending sorting order (optional) (default to id)
BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// List all labs
[apiInstance listLabsWith:sort
    sortOrder:sortOrder
    page:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var opts = { 
  'sort': sort_example, // {String} Field for sorting
  'sortOrder': sortOrder_example, // {String} Ascending or descending sorting order
  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listLabs(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listLabsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var sort = sort_example;  // String | Field for sorting (optional)  (default to id)
            var sortOrder = sortOrder_example;  // String | Ascending or descending sorting order (optional)  (default to id)
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // List all labs
                inline_response_200_3 result = apiInstance.listLabs(sort, sortOrder, page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.listLabs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$sort = sort_example; // String | Field for sorting
$sortOrder = sortOrder_example; // String | Ascending or descending sorting order
$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->listLabs($sort, $sortOrder, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->listLabs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $sort = sort_example; # String | Field for sorting
my $sortOrder = sortOrder_example; # String | Ascending or descending sorting order
my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->listLabs(sort => $sort, sortOrder => $sortOrder, page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->listLabs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
sort = sort_example # String | Field for sorting (optional) (default to id)
sortOrder = sortOrder_example # String | Ascending or descending sorting order (optional) (default to id)
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # List all labs
    api_response = api_instance.list_labs(sort=sort, sortOrder=sortOrder, page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->listLabs: %s\n" % e)

Parameters

Query parameters
Name Description
sort
String
Field for sorting
sort_order
String
Ascending or descending sorting order
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Listings

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


mapLabs

Get a listing of coordinates for labs

This method allows to show a map of labs


/labs/map

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/labs/map"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        try {
            inline_response_200_5 result = apiInstance.mapLabs();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#mapLabs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        try {
            inline_response_200_5 result = apiInstance.mapLabs();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#mapLabs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


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

// Get a listing of coordinates for labs
[apiInstance mapLabsWithCompletionHandler: 
              ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.mapLabs(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class mapLabsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();

            try
            {
                // Get a listing of coordinates for labs
                inline_response_200_5 result = apiInstance.mapLabs();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.mapLabs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

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

try {
    $result = $api_instance->mapLabs();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->mapLabs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

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

eval { 
    my $result = $api_instance->mapLabs();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->mapLabs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()

try: 
    # Get a listing of coordinates for labs
    api_response = api_instance.map_labs()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->mapLabs: %s\n" % e)

Parameters

Responses

Status: 200 - Results listing

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


searchLabs

Search for labs

This method allows to search labs by different fields


/labs/search

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/labs/search?type=&q=&page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        String type = type_example; // String | Type of search
        String q = q_example; // String | Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead

        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_3 result = apiInstance.searchLabs(type, q, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#searchLabs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        String type = type_example; // String | Type of search
        String q = q_example; // String | Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead

        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_3 result = apiInstance.searchLabs(type, q, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#searchLabs");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *type = type_example; // Type of search (optional) (default to fulltext)
String *q = q_example; // Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead
 (optional)
BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// Search for labs
[apiInstance searchLabsWith:type
    q:q
    page:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var opts = { 
  'type': type_example, // {String} Type of search
  'q': q_example, // {String} Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead

  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchLabs(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchLabsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var type = type_example;  // String | Type of search (optional)  (default to fulltext)
            var q = q_example;  // String | Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead
 (optional) 
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // Search for labs
                inline_response_200_3 result = apiInstance.searchLabs(type, q, page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.searchLabs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$type = type_example; // String | Type of search
$q = q_example; // String | Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead

$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->searchLabs($type, $q, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->searchLabs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $type = type_example; # String | Type of search
my $q = q_example; # String | Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead

my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->searchLabs(type => $type, q => $q, page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->searchLabs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
type = type_example # String | Type of search (optional) (default to fulltext)
q = q_example # String | Query object, if type equals:
- fulltext: the string to search.
- location: use latitude:longitude instead
 (optional)
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # Search for labs
    api_response = api_instance.search_labs(type=type, q=q, page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->searchLabs: %s\n" % e)

Parameters

Query parameters
Name Description
type
String
Type of search
q
String
Query object, if type equals: - fulltext: the string to search. - location: use latitude:longitude instead
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Search Results

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


updateLabById

Update a lab by id

This method allows to update a specific lab by id


/labs/{id}

Usage and SDK Samples

curl -X PUT "http://api.fablabs.io/labs/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LabsApi;

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

public class LabsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        Body_4 body = ; // Body_4 | data to be updated
        try {
            inline_response_200_4 result = apiInstance.updateLabById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#updateLabById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LabsApi;

public class LabsApiExample {

    public static void main(String[] args) {
        LabsApi apiInstance = new LabsApi();
        Long id = 789; // Long | id for the requested lab
        Body_4 body = ; // Body_4 | data to be updated
        try {
            inline_response_200_4 result = apiInstance.updateLabById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LabsApi#updateLabById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested lab
Body_4 *body = ; // data to be updated

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

// Update a lab by id
[apiInstance updateLabByIdWith:id
    body:body
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.LabsApi()

var id = 789; // {Long} id for the requested lab

var body = ; // {Body_4} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLabById(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateLabByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LabsApi();
            var id = 789;  // Long | id for the requested lab
            var body = new Body_4(); // Body_4 | data to be updated

            try
            {
                // Update a lab by id
                inline_response_200_4 result = apiInstance.updateLabById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LabsApi.updateLabById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\LabsApi();
$id = 789; // Long | id for the requested lab
$body = ; // Body_4 | data to be updated

try {
    $result = $api_instance->updateLabById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LabsApi->updateLabById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LabsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::LabsApi->new();
my $id = 789; # Long | id for the requested lab
my $body = WWW::SwaggerClient::Object::Body_4->new(); # Body_4 | data to be updated

eval { 
    my $result = $api_instance->updateLabById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LabsApi->updateLabById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.LabsApi()
id = 789 # Long | id for the requested lab
body =  # Body_4 | data to be updated

try: 
    # Update a lab by id
    api_response = api_instance.update_lab_by_id(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LabsApi->updateLabById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested lab
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Lab Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


Machines

createMachine

Create a new machine

This method allows to create a new machine


/machines

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/machines"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MachinesApi;

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

public class MachinesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        MachinesApi apiInstance = new MachinesApi();
        Body_6 body = ; // Body_6 | data to be updated
        try {
            inline_response_200_7 result = apiInstance.createMachine(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#createMachine");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MachinesApi;

public class MachinesApiExample {

    public static void main(String[] args) {
        MachinesApi apiInstance = new MachinesApi();
        Body_6 body = ; // Body_6 | data to be updated
        try {
            inline_response_200_7 result = apiInstance.createMachine(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#createMachine");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body_6 *body = ; // data to be updated

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

// Create a new machine 
[apiInstance createMachineWith:body
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.MachinesApi()

var body = ; // {Body_6} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createMachine(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createMachineExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MachinesApi();
            var body = new Body_6(); // Body_6 | data to be updated

            try
            {
                // Create a new machine 
                inline_response_200_7 result = apiInstance.createMachine(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MachinesApi.createMachine: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\MachinesApi();
$body = ; // Body_6 | data to be updated

try {
    $result = $api_instance->createMachine($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachinesApi->createMachine: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MachinesApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MachinesApi->new();
my $body = WWW::SwaggerClient::Object::Body_6->new(); # Body_6 | data to be updated

eval { 
    my $result = $api_instance->createMachine(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachinesApi->createMachine: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MachinesApi()
body =  # Body_6 | data to be updated

try: 
    # Create a new machine 
    api_response = api_instance.create_machine(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachinesApi->createMachine: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Machine Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


getMachineById

Get a machine by id

This method allows to get a specific machine by id


/machines/{id}

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/machines/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MachinesApi;

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

public class MachinesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        MachinesApi apiInstance = new MachinesApi();
        Long id = 789; // Long | id for the requested machine
        try {
            inline_response_200_7 result = apiInstance.getMachineById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#getMachineById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MachinesApi;

public class MachinesApiExample {

    public static void main(String[] args) {
        MachinesApi apiInstance = new MachinesApi();
        Long id = 789; // Long | id for the requested machine
        try {
            inline_response_200_7 result = apiInstance.getMachineById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#getMachineById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested machine

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

// Get a machine by id
[apiInstance getMachineByIdWith:id
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.MachinesApi()

var id = 789; // {Long} id for the requested machine


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMachineById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMachineByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MachinesApi();
            var id = 789;  // Long | id for the requested machine

            try
            {
                // Get a machine by id
                inline_response_200_7 result = apiInstance.getMachineById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MachinesApi.getMachineById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\MachinesApi();
$id = 789; // Long | id for the requested machine

try {
    $result = $api_instance->getMachineById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachinesApi->getMachineById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MachinesApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MachinesApi->new();
my $id = 789; # Long | id for the requested machine

eval { 
    my $result = $api_instance->getMachineById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachinesApi->getMachineById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MachinesApi()
id = 789 # Long | id for the requested machine

try: 
    # Get a machine by id
    api_response = api_instance.get_machine_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachinesApi->getMachineById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested machine
Required

Responses

Status: 200 - Machine Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


listMachines

List all machines

This method allows to list machines


/machines

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/machines?sort=&sort_order=&page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MachinesApi;

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

public class MachinesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        MachinesApi apiInstance = new MachinesApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_6 result = apiInstance.listMachines(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#listMachines");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MachinesApi;

public class MachinesApiExample {

    public static void main(String[] args) {
        MachinesApi apiInstance = new MachinesApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_6 result = apiInstance.listMachines(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#listMachines");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *sort = sort_example; // Field for sorting (optional) (default to id)
String *sortOrder = sortOrder_example; // Ascending or descending sorting order (optional) (default to id)
BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// List all machines
[apiInstance listMachinesWith:sort
    sortOrder:sortOrder
    page:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.MachinesApi()

var opts = { 
  'sort': sort_example, // {String} Field for sorting
  'sortOrder': sortOrder_example, // {String} Ascending or descending sorting order
  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listMachines(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listMachinesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MachinesApi();
            var sort = sort_example;  // String | Field for sorting (optional)  (default to id)
            var sortOrder = sortOrder_example;  // String | Ascending or descending sorting order (optional)  (default to id)
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // List all machines
                inline_response_200_6 result = apiInstance.listMachines(sort, sortOrder, page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MachinesApi.listMachines: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\MachinesApi();
$sort = sort_example; // String | Field for sorting
$sortOrder = sortOrder_example; // String | Ascending or descending sorting order
$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->listMachines($sort, $sortOrder, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachinesApi->listMachines: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MachinesApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MachinesApi->new();
my $sort = sort_example; # String | Field for sorting
my $sortOrder = sortOrder_example; # String | Ascending or descending sorting order
my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->listMachines(sort => $sort, sortOrder => $sortOrder, page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachinesApi->listMachines: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MachinesApi()
sort = sort_example # String | Field for sorting (optional) (default to id)
sortOrder = sortOrder_example # String | Ascending or descending sorting order (optional) (default to id)
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # List all machines
    api_response = api_instance.list_machines(sort=sort, sortOrder=sortOrder, page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachinesApi->listMachines: %s\n" % e)

Parameters

Query parameters
Name Description
sort
String
Field for sorting
sort_order
String
Ascending or descending sorting order
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Listings

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


updateMachineById

Update a machine by id

This method allows to update a specific machine by id


/machines/{id}

Usage and SDK Samples

curl -X PUT "http://api.fablabs.io/machines/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MachinesApi;

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

public class MachinesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        MachinesApi apiInstance = new MachinesApi();
        Long id = 789; // Long | id for the requested machine
        Body_7 body = ; // Body_7 | data to be updated
        try {
            inline_response_200_7 result = apiInstance.updateMachineById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#updateMachineById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MachinesApi;

public class MachinesApiExample {

    public static void main(String[] args) {
        MachinesApi apiInstance = new MachinesApi();
        Long id = 789; // Long | id for the requested machine
        Body_7 body = ; // Body_7 | data to be updated
        try {
            inline_response_200_7 result = apiInstance.updateMachineById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachinesApi#updateMachineById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested machine
Body_7 *body = ; // data to be updated

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

// Update a machine by id
[apiInstance updateMachineByIdWith:id
    body:body
              completionHandler: ^(inline_response_200_7 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.MachinesApi()

var id = 789; // {Long} id for the requested machine

var body = ; // {Body_7} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateMachineById(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateMachineByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MachinesApi();
            var id = 789;  // Long | id for the requested machine
            var body = new Body_7(); // Body_7 | data to be updated

            try
            {
                // Update a machine by id
                inline_response_200_7 result = apiInstance.updateMachineById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MachinesApi.updateMachineById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\MachinesApi();
$id = 789; // Long | id for the requested machine
$body = ; // Body_7 | data to be updated

try {
    $result = $api_instance->updateMachineById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachinesApi->updateMachineById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MachinesApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MachinesApi->new();
my $id = 789; # Long | id for the requested machine
my $body = WWW::SwaggerClient::Object::Body_7->new(); # Body_7 | data to be updated

eval { 
    my $result = $api_instance->updateMachineById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachinesApi->updateMachineById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MachinesApi()
id = 789 # Long | id for the requested machine
body =  # Body_7 | data to be updated

try: 
    # Update a machine by id
    api_response = api_instance.update_machine_by_id(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachinesApi->updateMachineById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested machine
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Machine Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


Oauth

authorize

Provides a page with the authorization code.


/oauth/authorize/{code}

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/oauth/authorize/{code}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OauthApi;

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

public class OauthApiExample {

    public static void main(String[] args) {
        
        OauthApi apiInstance = new OauthApi();
        String code = code_example; // String | Authorization Code
        try {
            apiInstance.authorize(code);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#authorize");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OauthApi;

public class OauthApiExample {

    public static void main(String[] args) {
        OauthApi apiInstance = new OauthApi();
        String code = code_example; // String | Authorization Code
        try {
            apiInstance.authorize(code);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#authorize");
            e.printStackTrace();
        }
    }
}
String *code = code_example; // Authorization Code

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

// Provides a page with the authorization code.
[apiInstance authorizeWith:code
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');

var api = new FablabsioApi.OauthApi()

var code = code_example; // {String} Authorization Code


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.authorize(code, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class authorizeExample
    {
        public void main()
        {
            
            var apiInstance = new OauthApi();
            var code = code_example;  // String | Authorization Code

            try
            {
                // Provides a page with the authorization code.
                apiInstance.authorize(code);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OauthApi.authorize: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OauthApi();
$code = code_example; // String | Authorization Code

try {
    $api_instance->authorize($code);
} catch (Exception $e) {
    echo 'Exception when calling OauthApi->authorize: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OauthApi;

my $api_instance = WWW::SwaggerClient::OauthApi->new();
my $code = code_example; # String | Authorization Code

eval { 
    $api_instance->authorize(code => $code);
};
if ($@) {
    warn "Exception when calling OauthApi->authorize: $@\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.OauthApi()
code = code_example # String | Authorization Code

try: 
    # Provides a page with the authorization code.
    api_instance.authorize(code)
except ApiException as e:
    print("Exception when calling OauthApi->authorize: %s\n" % e)

Parameters

Path parameters
Name Description
code*
String
Authorization Code
Required

Responses

Status: 200 - Authorization successful


authorizeDelete

Revoke an authorization code

Will delete an authorization code


/oauth/authorize

Usage and SDK Samples

curl -X DELETE "http://api.fablabs.io/oauth/authorize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OauthApi;

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

public class OauthApiExample {

    public static void main(String[] args) {
        
        OauthApi apiInstance = new OauthApi();
        String clientId = clientId_example; // String | Client ID Code
        String clientSecret = clientSecret_example; // String | Client secret Code
        String redirectUri = redirectUri_example; // String | URL to redirect when done
        String accessToken = accessToken_example; // String | Access token
        try {
            apiInstance.authorizeDelete(clientId, clientSecret, redirectUri, accessToken);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#authorizeDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OauthApi;

public class OauthApiExample {

    public static void main(String[] args) {
        OauthApi apiInstance = new OauthApi();
        String clientId = clientId_example; // String | Client ID Code
        String clientSecret = clientSecret_example; // String | Client secret Code
        String redirectUri = redirectUri_example; // String | URL to redirect when done
        String accessToken = accessToken_example; // String | Access token
        try {
            apiInstance.authorizeDelete(clientId, clientSecret, redirectUri, accessToken);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#authorizeDelete");
            e.printStackTrace();
        }
    }
}
String *clientId = clientId_example; // Client ID Code
String *clientSecret = clientSecret_example; // Client secret Code
String *redirectUri = redirectUri_example; // URL to redirect when done (default to urn:ietf:wg:oauth:2.0:oob)
String *accessToken = accessToken_example; // Access token

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

// Revoke an authorization code

[apiInstance authorizeDeleteWith:clientId
    clientSecret:clientSecret
    redirectUri:redirectUri
    accessToken:accessToken
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');

var api = new FablabsioApi.OauthApi()

var clientId = clientId_example; // {String} Client ID Code

var clientSecret = clientSecret_example; // {String} Client secret Code

var redirectUri = redirectUri_example; // {String} URL to redirect when done

var accessToken = accessToken_example; // {String} Access token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.authorizeDelete(clientId, clientSecret, redirectUri, accessToken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class authorizeDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new OauthApi();
            var clientId = clientId_example;  // String | Client ID Code
            var clientSecret = clientSecret_example;  // String | Client secret Code
            var redirectUri = redirectUri_example;  // String | URL to redirect when done (default to urn:ietf:wg:oauth:2.0:oob)
            var accessToken = accessToken_example;  // String | Access token

            try
            {
                // Revoke an authorization code

                apiInstance.authorizeDelete(clientId, clientSecret, redirectUri, accessToken);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OauthApi.authorizeDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OauthApi();
$clientId = clientId_example; // String | Client ID Code
$clientSecret = clientSecret_example; // String | Client secret Code
$redirectUri = redirectUri_example; // String | URL to redirect when done
$accessToken = accessToken_example; // String | Access token

try {
    $api_instance->authorizeDelete($clientId, $clientSecret, $redirectUri, $accessToken);
} catch (Exception $e) {
    echo 'Exception when calling OauthApi->authorizeDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OauthApi;

my $api_instance = WWW::SwaggerClient::OauthApi->new();
my $clientId = clientId_example; # String | Client ID Code
my $clientSecret = clientSecret_example; # String | Client secret Code
my $redirectUri = redirectUri_example; # String | URL to redirect when done
my $accessToken = accessToken_example; # String | Access token

eval { 
    $api_instance->authorizeDelete(clientId => $clientId, clientSecret => $clientSecret, redirectUri => $redirectUri, accessToken => $accessToken);
};
if ($@) {
    warn "Exception when calling OauthApi->authorizeDelete: $@\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.OauthApi()
clientId = clientId_example # String | Client ID Code
clientSecret = clientSecret_example # String | Client secret Code
redirectUri = redirectUri_example # String | URL to redirect when done (default to urn:ietf:wg:oauth:2.0:oob)
accessToken = accessToken_example # String | Access token

try: 
    # Revoke an authorization code

    api_instance.authorize_delete(clientId, clientSecret, redirectUri, accessToken)
except ApiException as e:
    print("Exception when calling OauthApi->authorizeDelete: %s\n" % e)

Parameters

Form parameters
Name Description
client_id*
String
Client ID Code
Required
client_secret*
String
Client secret Code
Required
redirect_uri*
String
URL to redirect when done
Required
access_token*
String
Access token
Required

Responses

Status: 302 - Redirect to :redirect_uri


authorizePost

Generate and return an authorization code

Will create and return an authorization code, then edirect to GET /oauth/authorize/:code with the authorization code.


/oauth/authorize

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/oauth/authorize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OauthApi;

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

public class OauthApiExample {

    public static void main(String[] args) {
        
        OauthApi apiInstance = new OauthApi();
        String clientId = clientId_example; // String | Client ID Code
        String clientSecret = clientSecret_example; // String | Client secret Code
        String redirectUri = redirectUri_example; // String | URL to redirect after Auth
        String username = username_example; // String | Username
        try {
            apiInstance.authorizePost(clientId, clientSecret, redirectUri, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#authorizePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OauthApi;

public class OauthApiExample {

    public static void main(String[] args) {
        OauthApi apiInstance = new OauthApi();
        String clientId = clientId_example; // String | Client ID Code
        String clientSecret = clientSecret_example; // String | Client secret Code
        String redirectUri = redirectUri_example; // String | URL to redirect after Auth
        String username = username_example; // String | Username
        try {
            apiInstance.authorizePost(clientId, clientSecret, redirectUri, username);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#authorizePost");
            e.printStackTrace();
        }
    }
}
String *clientId = clientId_example; // Client ID Code
String *clientSecret = clientSecret_example; // Client secret Code
String *redirectUri = redirectUri_example; // URL to redirect after Auth (default to urn:ietf:wg:oauth:2.0:oob)
String *username = username_example; // Username

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

// Generate and return an authorization code

[apiInstance authorizePostWith:clientId
    clientSecret:clientSecret
    redirectUri:redirectUri
    username:username
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');

var api = new FablabsioApi.OauthApi()

var clientId = clientId_example; // {String} Client ID Code

var clientSecret = clientSecret_example; // {String} Client secret Code

var redirectUri = redirectUri_example; // {String} URL to redirect after Auth

var username = username_example; // {String} Username


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.authorizePost(clientId, clientSecret, redirectUri, username, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class authorizePostExample
    {
        public void main()
        {
            
            var apiInstance = new OauthApi();
            var clientId = clientId_example;  // String | Client ID Code
            var clientSecret = clientSecret_example;  // String | Client secret Code
            var redirectUri = redirectUri_example;  // String | URL to redirect after Auth (default to urn:ietf:wg:oauth:2.0:oob)
            var username = username_example;  // String | Username

            try
            {
                // Generate and return an authorization code

                apiInstance.authorizePost(clientId, clientSecret, redirectUri, username);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OauthApi.authorizePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OauthApi();
$clientId = clientId_example; // String | Client ID Code
$clientSecret = clientSecret_example; // String | Client secret Code
$redirectUri = redirectUri_example; // String | URL to redirect after Auth
$username = username_example; // String | Username

try {
    $api_instance->authorizePost($clientId, $clientSecret, $redirectUri, $username);
} catch (Exception $e) {
    echo 'Exception when calling OauthApi->authorizePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OauthApi;

my $api_instance = WWW::SwaggerClient::OauthApi->new();
my $clientId = clientId_example; # String | Client ID Code
my $clientSecret = clientSecret_example; # String | Client secret Code
my $redirectUri = redirectUri_example; # String | URL to redirect after Auth
my $username = username_example; # String | Username

eval { 
    $api_instance->authorizePost(clientId => $clientId, clientSecret => $clientSecret, redirectUri => $redirectUri, username => $username);
};
if ($@) {
    warn "Exception when calling OauthApi->authorizePost: $@\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.OauthApi()
clientId = clientId_example # String | Client ID Code
clientSecret = clientSecret_example # String | Client secret Code
redirectUri = redirectUri_example # String | URL to redirect after Auth (default to urn:ietf:wg:oauth:2.0:oob)
username = username_example # String | Username

try: 
    # Generate and return an authorization code

    api_instance.authorize_post(clientId, clientSecret, redirectUri, username)
except ApiException as e:
    print("Exception when calling OauthApi->authorizePost: %s\n" % e)

Parameters

Form parameters
Name Description
client_id*
String
Client ID Code
Required
client_secret*
String
Client secret Code
Required
redirect_uri*
String
URL to redirect after Auth
Required
username*
String
Username
Required

Responses

Status: 302 - Redirect to /oauth/authorize/:code


oauthTokenPost

Token Endpoint

Post here with authorization code for authorization code grant type or username and password for password grant type, or refresh token for refresh token type. This corresponds to the token endpoint, section 3.2 of the OAuth 2 RFC


/oauth/token

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/oauth/token"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OauthApi;

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

public class OauthApiExample {

    public static void main(String[] args) {
        
        OauthApi apiInstance = new OauthApi();
        String clientId = clientId_example; // String | Client ID Code
        String clientSecret = clientSecret_example; // String | Client secret Code
        String redirectUri = redirectUri_example; // String | URL to redirect after Auth
        String code = code_example; // String | token code
        String grantType = grantType_example; // String | Grant type
        try {
            inline_response_200 result = apiInstance.oauthTokenPost(clientId, clientSecret, redirectUri, code, grantType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#oauthTokenPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OauthApi;

public class OauthApiExample {

    public static void main(String[] args) {
        OauthApi apiInstance = new OauthApi();
        String clientId = clientId_example; // String | Client ID Code
        String clientSecret = clientSecret_example; // String | Client secret Code
        String redirectUri = redirectUri_example; // String | URL to redirect after Auth
        String code = code_example; // String | token code
        String grantType = grantType_example; // String | Grant type
        try {
            inline_response_200 result = apiInstance.oauthTokenPost(clientId, clientSecret, redirectUri, code, grantType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OauthApi#oauthTokenPost");
            e.printStackTrace();
        }
    }
}
String *clientId = clientId_example; // Client ID Code
String *clientSecret = clientSecret_example; // Client secret Code
String *redirectUri = redirectUri_example; // URL to redirect after Auth (default to urn:ietf:wg:oauth:2.0:oob)
String *code = code_example; // token code
String *grantType = grantType_example; // Grant type

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

// Token Endpoint

[apiInstance oauthTokenPostWith:clientId
    clientSecret:clientSecret
    redirectUri:redirectUri
    code:code
    grantType:grantType
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');

var api = new FablabsioApi.OauthApi()

var clientId = clientId_example; // {String} Client ID Code

var clientSecret = clientSecret_example; // {String} Client secret Code

var redirectUri = redirectUri_example; // {String} URL to redirect after Auth

var code = code_example; // {String} token code

var grantType = grantType_example; // {String} Grant type


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.oauthTokenPost(clientId, clientSecret, redirectUri, code, grantType, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class oauthTokenPostExample
    {
        public void main()
        {
            
            var apiInstance = new OauthApi();
            var clientId = clientId_example;  // String | Client ID Code
            var clientSecret = clientSecret_example;  // String | Client secret Code
            var redirectUri = redirectUri_example;  // String | URL to redirect after Auth (default to urn:ietf:wg:oauth:2.0:oob)
            var code = code_example;  // String | token code
            var grantType = grantType_example;  // String | Grant type

            try
            {
                // Token Endpoint

                inline_response_200 result = apiInstance.oauthTokenPost(clientId, clientSecret, redirectUri, code, grantType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OauthApi.oauthTokenPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\OauthApi();
$clientId = clientId_example; // String | Client ID Code
$clientSecret = clientSecret_example; // String | Client secret Code
$redirectUri = redirectUri_example; // String | URL to redirect after Auth
$code = code_example; // String | token code
$grantType = grantType_example; // String | Grant type

try {
    $result = $api_instance->oauthTokenPost($clientId, $clientSecret, $redirectUri, $code, $grantType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OauthApi->oauthTokenPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OauthApi;

my $api_instance = WWW::SwaggerClient::OauthApi->new();
my $clientId = clientId_example; # String | Client ID Code
my $clientSecret = clientSecret_example; # String | Client secret Code
my $redirectUri = redirectUri_example; # String | URL to redirect after Auth
my $code = code_example; # String | token code
my $grantType = grantType_example; # String | Grant type

eval { 
    my $result = $api_instance->oauthTokenPost(clientId => $clientId, clientSecret => $clientSecret, redirectUri => $redirectUri, code => $code, grantType => $grantType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OauthApi->oauthTokenPost: $@\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.OauthApi()
clientId = clientId_example # String | Client ID Code
clientSecret = clientSecret_example # String | Client secret Code
redirectUri = redirectUri_example # String | URL to redirect after Auth (default to urn:ietf:wg:oauth:2.0:oob)
code = code_example # String | token code
grantType = grantType_example # String | Grant type

try: 
    # Token Endpoint

    api_response = api_instance.oauth_token_post(clientId, clientSecret, redirectUri, code, grantType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OauthApi->oauthTokenPost: %s\n" % e)

Parameters

Form parameters
Name Description
client_id*
String
Client ID Code
Required
client_secret*
String
Client secret Code
Required
redirect_uri*
String
URL to redirect after Auth
Required
code*
String
token code
Required
grant_type*
String
Grant type
Required

Responses

Status: 200 - authorization_code object


Organizations

createOrganization

Create a new organization

This method allows to create a new organization


/organizations

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/organizations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;

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

public class OrganizationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationsApi apiInstance = new OrganizationsApi();
        Body_10 body = ; // Body_10 | data to be updated
        try {
            apiInstance.createOrganization(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#createOrganization");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationsApi;

public class OrganizationsApiExample {

    public static void main(String[] args) {
        OrganizationsApi apiInstance = new OrganizationsApi();
        Body_10 body = ; // Body_10 | data to be updated
        try {
            apiInstance.createOrganization(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#createOrganization");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body_10 *body = ; // data to be updated

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

// Create a new organization 
[apiInstance createOrganizationWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.OrganizationsApi()

var body = ; // {Body_10} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createOrganization(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOrganizationExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationsApi();
            var body = new Body_10(); // Body_10 | data to be updated

            try
            {
                // Create a new organization 
                apiInstance.createOrganization(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationsApi.createOrganization: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OrganizationsApi();
$body = ; // Body_10 | data to be updated

try {
    $api_instance->createOrganization($body);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->createOrganization: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $body = WWW::SwaggerClient::Object::Body_10->new(); # Body_10 | data to be updated

eval { 
    $api_instance->createOrganization(body => $body);
};
if ($@) {
    warn "Exception when calling OrganizationsApi->createOrganization: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
body =  # Body_10 | data to be updated

try: 
    # Create a new organization 
    api_instance.create_organization(body)
except ApiException as e:
    print("Exception when calling OrganizationsApi->createOrganization: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


getOrganizationLabsById

Get labs belonging to an organization by id

This method allows to get a specific organization's labs by id


/organizations/{id}/relationships/labs

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/organizations/{id}/relationships/labs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;

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

public class OrganizationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        try {
            RelationshipLink result = apiInstance.getOrganizationLabsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#getOrganizationLabsById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationsApi;

public class OrganizationsApiExample {

    public static void main(String[] args) {
        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        try {
            RelationshipLink result = apiInstance.getOrganizationLabsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#getOrganizationLabsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested organization

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

// Get labs belonging to an organization by id
[apiInstance getOrganizationLabsByIdWith:id
              completionHandler: ^(RelationshipLink output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.OrganizationsApi()

var id = 789; // {Long} id for the requested organization


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrganizationLabsById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrganizationLabsByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationsApi();
            var id = 789;  // Long | id for the requested organization

            try
            {
                // Get labs belonging to an organization by id
                RelationshipLink result = apiInstance.getOrganizationLabsById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationsApi.getOrganizationLabsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OrganizationsApi();
$id = 789; // Long | id for the requested organization

try {
    $result = $api_instance->getOrganizationLabsById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->getOrganizationLabsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $id = 789; # Long | id for the requested organization

eval { 
    my $result = $api_instance->getOrganizationLabsById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationsApi->getOrganizationLabsById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
id = 789 # Long | id for the requested organization

try: 
    # Get labs belonging to an organization by id
    api_response = api_instance.get_organization_labs_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->getOrganizationLabsById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested organization
Required

Responses

Status: 200 - Generic response for relationships

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


getOrganizationsById

Get an organization by id

This method allows to get a specific organization by id


/organizations/{id}

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/organizations/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;

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

public class OrganizationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        try {
            inline_response_200_11 result = apiInstance.getOrganizationsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#getOrganizationsById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationsApi;

public class OrganizationsApiExample {

    public static void main(String[] args) {
        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        try {
            inline_response_200_11 result = apiInstance.getOrganizationsById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#getOrganizationsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested organization

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

// Get an organization by id
[apiInstance getOrganizationsByIdWith:id
              completionHandler: ^(inline_response_200_11 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.OrganizationsApi()

var id = 789; // {Long} id for the requested organization


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrganizationsById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrganizationsByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationsApi();
            var id = 789;  // Long | id for the requested organization

            try
            {
                // Get an organization by id
                inline_response_200_11 result = apiInstance.getOrganizationsById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationsApi.getOrganizationsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OrganizationsApi();
$id = 789; // Long | id for the requested organization

try {
    $result = $api_instance->getOrganizationsById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->getOrganizationsById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $id = 789; # Long | id for the requested organization

eval { 
    my $result = $api_instance->getOrganizationsById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationsApi->getOrganizationsById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
id = 789 # Long | id for the requested organization

try: 
    # Get an organization by id
    api_response = api_instance.get_organizations_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->getOrganizationsById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested organization
Required

Responses

Status: 200 - Organization profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


listOrganizations

List all organizations

This method allows to list the organizations


/organizations

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/organizations?sort=&sort_order=&page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;

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

public class OrganizationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationsApi apiInstance = new OrganizationsApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_10 result = apiInstance.listOrganizations(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#listOrganizations");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationsApi;

public class OrganizationsApiExample {

    public static void main(String[] args) {
        OrganizationsApi apiInstance = new OrganizationsApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_10 result = apiInstance.listOrganizations(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#listOrganizations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *sort = sort_example; // Field for sorting (optional) (default to id)
String *sortOrder = sortOrder_example; // Ascending or descending sorting order (optional) (default to id)
BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// List all organizations
[apiInstance listOrganizationsWith:sort
    sortOrder:sortOrder
    page:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_10 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.OrganizationsApi()

var opts = { 
  'sort': sort_example, // {String} Field for sorting
  'sortOrder': sortOrder_example, // {String} Ascending or descending sorting order
  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listOrganizations(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listOrganizationsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationsApi();
            var sort = sort_example;  // String | Field for sorting (optional)  (default to id)
            var sortOrder = sortOrder_example;  // String | Ascending or descending sorting order (optional)  (default to id)
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // List all organizations
                inline_response_200_10 result = apiInstance.listOrganizations(sort, sortOrder, page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationsApi.listOrganizations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OrganizationsApi();
$sort = sort_example; // String | Field for sorting
$sortOrder = sortOrder_example; // String | Ascending or descending sorting order
$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->listOrganizations($sort, $sortOrder, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->listOrganizations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $sort = sort_example; # String | Field for sorting
my $sortOrder = sortOrder_example; # String | Ascending or descending sorting order
my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->listOrganizations(sort => $sort, sortOrder => $sortOrder, page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationsApi->listOrganizations: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
sort = sort_example # String | Field for sorting (optional) (default to id)
sortOrder = sortOrder_example # String | Ascending or descending sorting order (optional) (default to id)
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # List all organizations
    api_response = api_instance.list_organizations(sort=sort, sortOrder=sortOrder, page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->listOrganizations: %s\n" % e)

Parameters

Query parameters
Name Description
sort
String
Field for sorting
sort_order
String
Ascending or descending sorting order
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Listings

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


updateOrganizationById

Update an organization by id

This method allows to update a specific organization by id


/organizations/{id}

Usage and SDK Samples

curl -X PUT "http://api.fablabs.io/organizations/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;

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

public class OrganizationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        Body_11 body = ; // Body_11 | data to be updated
        try {
            inline_response_200_11 result = apiInstance.updateOrganizationById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#updateOrganizationById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationsApi;

public class OrganizationsApiExample {

    public static void main(String[] args) {
        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        Body_11 body = ; // Body_11 | data to be updated
        try {
            inline_response_200_11 result = apiInstance.updateOrganizationById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#updateOrganizationById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested organization
Body_11 *body = ; // data to be updated

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

// Update an organization by id
[apiInstance updateOrganizationByIdWith:id
    body:body
              completionHandler: ^(inline_response_200_11 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.OrganizationsApi()

var id = 789; // {Long} id for the requested organization

var body = ; // {Body_11} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateOrganizationById(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrganizationByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationsApi();
            var id = 789;  // Long | id for the requested organization
            var body = new Body_11(); // Body_11 | data to be updated

            try
            {
                // Update an organization by id
                inline_response_200_11 result = apiInstance.updateOrganizationById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationsApi.updateOrganizationById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OrganizationsApi();
$id = 789; // Long | id for the requested organization
$body = ; // Body_11 | data to be updated

try {
    $result = $api_instance->updateOrganizationById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->updateOrganizationById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $id = 789; # Long | id for the requested organization
my $body = WWW::SwaggerClient::Object::Body_11->new(); # Body_11 | data to be updated

eval { 
    my $result = $api_instance->updateOrganizationById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationsApi->updateOrganizationById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
id = 789 # Long | id for the requested organization
body =  # Body_11 | data to be updated

try: 
    # Update an organization by id
    api_response = api_instance.update_organization_by_id(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->updateOrganizationById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested organization
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Organization profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


updateOrganizationLabById

Add a lab to an organization by id

This method allows to update a specific organization's labs by id


/organizations/{id}/relationships/labs

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/organizations/{id}/relationships/labs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrganizationsApi;

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

public class OrganizationsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        Body_12 body = ; // Body_12 | data to be updated
        try {
            RelationshipLink result = apiInstance.updateOrganizationLabById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#updateOrganizationLabById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrganizationsApi;

public class OrganizationsApiExample {

    public static void main(String[] args) {
        OrganizationsApi apiInstance = new OrganizationsApi();
        Long id = 789; // Long | id for the requested organization
        Body_12 body = ; // Body_12 | data to be updated
        try {
            RelationshipLink result = apiInstance.updateOrganizationLabById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#updateOrganizationLabById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested organization
Body_12 *body = ; // data to be updated

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

// Add a lab to an organization by id
[apiInstance updateOrganizationLabByIdWith:id
    body:body
              completionHandler: ^(RelationshipLink output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.OrganizationsApi()

var id = 789; // {Long} id for the requested organization

var body = ; // {Body_12} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateOrganizationLabById(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOrganizationLabByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OrganizationsApi();
            var id = 789;  // Long | id for the requested organization
            var body = new Body_12(); // Body_12 | data to be updated

            try
            {
                // Add a lab to an organization by id
                RelationshipLink result = apiInstance.updateOrganizationLabById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrganizationsApi.updateOrganizationLabById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OrganizationsApi();
$id = 789; // Long | id for the requested organization
$body = ; // Body_12 | data to be updated

try {
    $result = $api_instance->updateOrganizationLabById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrganizationsApi->updateOrganizationLabById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrganizationsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OrganizationsApi->new();
my $id = 789; # Long | id for the requested organization
my $body = WWW::SwaggerClient::Object::Body_12->new(); # Body_12 | data to be updated

eval { 
    my $result = $api_instance->updateOrganizationLabById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganizationsApi->updateOrganizationLabById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OrganizationsApi()
id = 789 # Long | id for the requested organization
body =  # Body_12 | data to be updated

try: 
    # Add a lab to an organization by id
    api_response = api_instance.update_organization_lab_by_id(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->updateOrganizationLabById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested organization
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Generic response for relationships

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


Projects

createProject

Create a new project

This method allows to create a new project


/projects

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/projects"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectsApi;

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

public class ProjectsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        Body_8 body = ; // Body_8 | data to be updated
        try {
            inline_response_200_9 result = apiInstance.createProject(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#createProject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        Body_8 body = ; // Body_8 | data to be updated
        try {
            inline_response_200_9 result = apiInstance.createProject(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#createProject");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body_8 *body = ; // data to be updated

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

// Create a new project 
[apiInstance createProjectWith:body
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.ProjectsApi()

var body = ; // {Body_8} data to be updated


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()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var body = new Body_8(); // Body_8 | data to be updated

            try
            {
                // Create a new project 
                inline_response_200_9 result = apiInstance.createProject(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.createProject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ProjectsApi();
$body = ; // Body_8 | data to be updated

try {
    $result = $api_instance->createProject($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->createProject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $body = WWW::SwaggerClient::Object::Body_8->new(); # Body_8 | data to be updated

eval { 
    my $result = $api_instance->createProject(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectsApi->createProject: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
body =  # Body_8 | data to be updated

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

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Project profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


getProjectById

Get a project by id

This method allows to get a specific projects by id


/projects/{id}

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/projects/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectsApi;

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

public class ProjectsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        Long id = 789; // Long | id for the requested project
        try {
            inline_response_200_9 result = apiInstance.getProjectById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#getProjectById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        Long id = 789; // Long | id for the requested project
        try {
            inline_response_200_9 result = apiInstance.getProjectById(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#getProjectById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested project

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

// Get a project by id
[apiInstance getProjectByIdWith:id
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.ProjectsApi()

var id = 789; // {Long} id for the requested project


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProjectById(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProjectByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var id = 789;  // Long | id for the requested project

            try
            {
                // Get a project by id
                inline_response_200_9 result = apiInstance.getProjectById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.getProjectById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ProjectsApi();
$id = 789; // Long | id for the requested project

try {
    $result = $api_instance->getProjectById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->getProjectById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $id = 789; # Long | id for the requested project

eval { 
    my $result = $api_instance->getProjectById(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectsApi->getProjectById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
id = 789 # Long | id for the requested project

try: 
    # Get a project by id
    api_response = api_instance.get_project_by_id(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->getProjectById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested project
Required

Responses

Status: 200 - Project profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


listProjects

List all projects

This method allows to list projects


/projects

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/projects?sort=&sort_order=&page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectsApi;

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

public class ProjectsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_8 result = apiInstance.listProjects(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#listProjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        String sort = sort_example; // String | Field for sorting
        String sortOrder = sortOrder_example; // String | Ascending or descending sorting order
        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_8 result = apiInstance.listProjects(sort, sortOrder, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#listProjects");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *sort = sort_example; // Field for sorting (optional) (default to id)
String *sortOrder = sortOrder_example; // Ascending or descending sorting order (optional) (default to id)
BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// List all projects
[apiInstance listProjectsWith:sort
    sortOrder:sortOrder
    page:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.ProjectsApi()

var opts = { 
  'sort': sort_example, // {String} Field for sorting
  'sortOrder': sortOrder_example, // {String} Ascending or descending sorting order
  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listProjects(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class listProjectsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var sort = sort_example;  // String | Field for sorting (optional)  (default to id)
            var sortOrder = sortOrder_example;  // String | Ascending or descending sorting order (optional)  (default to id)
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // List all projects
                inline_response_200_8 result = apiInstance.listProjects(sort, sortOrder, page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.listProjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ProjectsApi();
$sort = sort_example; // String | Field for sorting
$sortOrder = sortOrder_example; // String | Ascending or descending sorting order
$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->listProjects($sort, $sortOrder, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->listProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $sort = sort_example; # String | Field for sorting
my $sortOrder = sortOrder_example; # String | Ascending or descending sorting order
my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->listProjects(sort => $sort, sortOrder => $sortOrder, page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectsApi->listProjects: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
sort = sort_example # String | Field for sorting (optional) (default to id)
sortOrder = sortOrder_example # String | Ascending or descending sorting order (optional) (default to id)
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # List all projects
    api_response = api_instance.list_projects(sort=sort, sortOrder=sortOrder, page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->listProjects: %s\n" % e)

Parameters

Query parameters
Name Description
sort
String
Field for sorting
sort_order
String
Ascending or descending sorting order
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Listings

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


searchProjects

Search for projects

This method allows to search projects by different fields


/projects/search

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/projects/search?type=&q=&page=&page_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectsApi;

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

public class ProjectsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        String type = type_example; // String | Type of search
        String q = q_example; // String | Query object, if type equals: - fulltext: the string to search.

        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_8 result = apiInstance.searchProjects(type, q, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#searchProjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        String type = type_example; // String | Type of search
        String q = q_example; // String | Query object, if type equals: - fulltext: the string to search.

        BigDecimal page = 8.14; // BigDecimal | Results page
        BigDecimal pageSize = 8.14; // BigDecimal | Results per page
        try {
            inline_response_200_8 result = apiInstance.searchProjects(type, q, page, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#searchProjects");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *type = type_example; // Type of search (optional) (default to fulltext)
String *q = q_example; // Query object, if type equals: - fulltext: the string to search.
 (optional)
BigDecimal *page = 8.14; // Results page (optional) (default to 0)
BigDecimal *pageSize = 8.14; // Results per page (optional) (default to 10)

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

// Search for projects
[apiInstance searchProjectsWith:type
    q:q
    page:page
    pageSize:pageSize
              completionHandler: ^(inline_response_200_8 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.ProjectsApi()

var opts = { 
  'type': type_example, // {String} Type of search
  'q': q_example, // {String} Query object, if type equals: - fulltext: the string to search.

  'page': 8.14, // {BigDecimal} Results page
  'pageSize': 8.14 // {BigDecimal} Results per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchProjects(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchProjectsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var type = type_example;  // String | Type of search (optional)  (default to fulltext)
            var q = q_example;  // String | Query object, if type equals: - fulltext: the string to search.
 (optional) 
            var page = 8.14;  // BigDecimal | Results page (optional)  (default to 0)
            var pageSize = 8.14;  // BigDecimal | Results per page (optional)  (default to 10)

            try
            {
                // Search for projects
                inline_response_200_8 result = apiInstance.searchProjects(type, q, page, pageSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.searchProjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ProjectsApi();
$type = type_example; // String | Type of search
$q = q_example; // String | Query object, if type equals: - fulltext: the string to search.

$page = 8.14; // BigDecimal | Results page
$pageSize = 8.14; // BigDecimal | Results per page

try {
    $result = $api_instance->searchProjects($type, $q, $page, $pageSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->searchProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $type = type_example; # String | Type of search
my $q = q_example; # String | Query object, if type equals: - fulltext: the string to search.

my $page = 8.14; # BigDecimal | Results page
my $pageSize = 8.14; # BigDecimal | Results per page

eval { 
    my $result = $api_instance->searchProjects(type => $type, q => $q, page => $page, pageSize => $pageSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectsApi->searchProjects: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
type = type_example # String | Type of search (optional) (default to fulltext)
q = q_example # String | Query object, if type equals: - fulltext: the string to search.
 (optional)
page = 8.14 # BigDecimal | Results page (optional) (default to 0)
pageSize = 8.14 # BigDecimal | Results per page (optional) (default to 10)

try: 
    # Search for projects
    api_response = api_instance.search_projects(type=type, q=q, page=page, pageSize=pageSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->searchProjects: %s\n" % e)

Parameters

Query parameters
Name Description
type
String
Type of search
q
String
Query object, if type equals: - fulltext: the string to search.
page
BigDecimal
Results page
page_size
BigDecimal
Results per page

Responses

Status: 200 - Search Results

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


updateProjectById

Update a project by id

This method allows to update a specific projects by id


/projects/{id}

Usage and SDK Samples

curl -X PUT "http://api.fablabs.io/projects/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectsApi;

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

public class ProjectsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        Long id = 789; // Long | id for the requested projects
        Body_9 body = ; // Body_9 | data to be updated
        try {
            inline_response_200_9 result = apiInstance.updateProjectById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#updateProjectById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        Long id = 789; // Long | id for the requested projects
        Body_9 body = ; // Body_9 | data to be updated
        try {
            inline_response_200_9 result = apiInstance.updateProjectById(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#updateProjectById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Long *id = 789; // id for the requested projects
Body_9 *body = ; // data to be updated

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

// Update a project by id
[apiInstance updateProjectByIdWith:id
    body:body
              completionHandler: ^(inline_response_200_9 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.ProjectsApi()

var id = 789; // {Long} id for the requested projects

var body = ; // {Body_9} data to be updated


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateProjectById(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateProjectByIdExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var id = 789;  // Long | id for the requested projects
            var body = new Body_9(); // Body_9 | data to be updated

            try
            {
                // Update a project by id
                inline_response_200_9 result = apiInstance.updateProjectById(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.updateProjectById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\ProjectsApi();
$id = 789; // Long | id for the requested projects
$body = ; // Body_9 | data to be updated

try {
    $result = $api_instance->updateProjectById($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->updateProjectById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $id = 789; # Long | id for the requested projects
my $body = WWW::SwaggerClient::Object::Body_9->new(); # Body_9 | data to be updated

eval { 
    my $result = $api_instance->updateProjectById(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectsApi->updateProjectById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
id = 789 # Long | id for the requested projects
body =  # Body_9 | data to be updated

try: 
    # Update a project by id
    api_response = api_instance.update_project_by_id(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->updateProjectById: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Long (int64)
id for the requested projects
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Project profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


User

currentUser

Read the current user's profile

This method allows to retrieve our user profile


/users/me

Usage and SDK Samples

curl -X GET "http://api.fablabs.io/users/me"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        UserApi apiInstance = new UserApi();
        try {
            inline_response_200_2 result = apiInstance.currentUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#currentUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        try {
            inline_response_200_2 result = apiInstance.currentUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#currentUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


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

// Read the current user's profile
[apiInstance currentUserWithCompletionHandler: 
              ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.UserApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.currentUser(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class currentUserExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserApi();

            try
            {
                // Read the current user's profile
                inline_response_200_2 result = apiInstance.currentUser();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.currentUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

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

try {
    $result = $api_instance->currentUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->currentUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

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

eval { 
    my $result = $api_instance->currentUser();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->currentUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserApi()

try: 
    # Read the current user's profile
    api_response = api_instance.current_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->currentUser: %s\n" % e)

Parameters

Responses

Status: 200 - User Profile

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found


updateUser

Update the current user's profile

This method allows to retrieve our user profile


/users/me

Usage and SDK Samples

curl -X POST "http://api.fablabs.io/users/me"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: OAuth2
        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
        OAuth2.setAccessToken("YOUR ACCESS TOKEN");

        UserApi apiInstance = new UserApi();
        Body_1 body = ; // Body_1 | Data for the user to create
        try {
            apiInstance.updateUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        Body_1 body = ; // Body_1 | Data for the user to create
        try {
            apiInstance.updateUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Body_1 *body = ; // Data for the user to create

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

// Update the current user's profile
[apiInstance updateUserWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FablabsioApi = require('fablabsio_api');
var defaultClient = FablabsioApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new FablabsioApi.UserApi()

var body = ; // {Body_1} Data for the user to create


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateUser(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateUserExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: OAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserApi();
            var body = new Body_1(); // Body_1 | Data for the user to create

            try
            {
                // Update the current user's profile
                apiInstance.updateUser(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.updateUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserApi();
$body = ; // Body_1 | Data for the user to create

try {
    $api_instance->updateUser($body);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

# Configure OAuth2 access token for authorization: OAuth2
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $body = WWW::SwaggerClient::Object::Body_1->new(); # Body_1 | Data for the user to create

eval { 
    $api_instance->updateUser(body => $body);
};
if ($@) {
    warn "Exception when calling UserApi->updateUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: OAuth2
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserApi()
body =  # Body_1 | Data for the user to create

try: 
    # Update the current user's profile
    api_instance.update_user(body)
except ApiException as e:
    print("Exception when calling UserApi->updateUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - User profile updated

Status: 400 - Bad request: A required parameter is missing

Status: 404 - Not found: The specified resource was not found