Corex API

Projects

addProjects

Add a new projects to the store


/projects

Usage and SDK Samples

curl -X POST "https://api.corexads.com/v1//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: projectsstore_auth
        OAuth projectsstore_auth = (OAuth) defaultClient.getAuthentication("projectsstore_auth");
        projectsstore_auth.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        Projects body = ; // Projects | Projects object that needs to be added to the store
        try {
            apiInstance.addProjects(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#addProjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        Projects body = ; // Projects | Projects object that needs to be added to the store
        try {
            apiInstance.addProjects(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#addProjects");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: projectsstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Projects *body = ; // Projects object that needs to be added to the store

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

// Add a new projects to the store
[apiInstance addProjectsWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorexApi = require('corex_api');
var defaultClient = CorexApi.ApiClient.instance;

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

var api = new CorexApi.ProjectsApi()
var body = ; // {{Projects}} Projects object that needs to be added to the store

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

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

            // Configure OAuth2 access token for authorization: projectsstore_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var body = new Projects(); // Projects | Projects object that needs to be added to the store

            try
            {
                // Add a new projects to the store
                apiInstance.addProjects(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.addProjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProjectsApi();
$body = ; // Projects | Projects object that needs to be added to the store

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

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

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $body = WWW::SwaggerClient::Object::Projects->new(); # Projects | Projects object that needs to be added to the store

eval { 
    $api_instance->addProjects(body => $body);
};
if ($@) {
    warn "Exception when calling ProjectsApi->addProjects: $@\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: projectsstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
body =  # Projects | Projects object that needs to be added to the store

try: 
    # Add a new projects to the store
    api_instance.add_projects(body)
except ApiException as e:
    print("Exception when calling ProjectsApi->addProjects: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input


findProjectssByStatus

Finds Projectss by status

Multiple status values can be provided with comma separated strings


/projects/findByStatus

Usage and SDK Samples

curl -X GET "https://api.corexads.com/v1//projects/findByStatus?status="
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: projectsstore_auth
        OAuth projectsstore_auth = (OAuth) defaultClient.getAuthentication("projectsstore_auth");
        projectsstore_auth.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        array[String] status = ; // array[String] | Status values that need to be considered for filter
        try {
            array[Projects] result = apiInstance.findProjectssByStatus(status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#findProjectssByStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        array[String] status = ; // array[String] | Status values that need to be considered for filter
        try {
            array[Projects] result = apiInstance.findProjectssByStatus(status);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#findProjectssByStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: projectsstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
array[String] *status = ; // Status values that need to be considered for filter

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

// Finds Projectss by status
[apiInstance findProjectssByStatusWith:status
              completionHandler: ^(array[Projects] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorexApi = require('corex_api');
var defaultClient = CorexApi.ApiClient.instance;

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

var api = new CorexApi.ProjectsApi()
var status = ; // {{array[String]}} Status values that need to be considered for filter

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

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

            // Configure OAuth2 access token for authorization: projectsstore_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var status = new array[String](); // array[String] | Status values that need to be considered for filter

            try
            {
                // Finds Projectss by status
                array[Projects] result = apiInstance.findProjectssByStatus(status);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.findProjectssByStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProjectsApi();
$status = ; // array[String] | Status values that need to be considered for filter

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

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

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $status = []; # array[String] | Status values that need to be considered for filter

eval { 
    my $result = $api_instance->findProjectssByStatus(status => $status);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectsApi->findProjectssByStatus: $@\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: projectsstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
status =  # array[String] | Status values that need to be considered for filter

try: 
    # Finds Projectss by status
    api_response = api_instance.find_projectss_by_status(status)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->findProjectssByStatus: %s\n" % e)

Parameters

Query parameters
Name Description
status*
array[String]
Status values that need to be considered for filter
Required

Responses

Status: 200 - successful operation

Status: 400 - Invalid status value


getProjectsById

Find projects by ID

Returns a single projects


/projects/{projectsId}

Usage and SDK Samples

curl -X GET -H "api_key: [[apiKey]]" "https://api.corexads.com/v1//projects/{projectsId}"
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 API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ProjectsApi apiInstance = new ProjectsApi();
        Long projectsId = 789; // Long | ID of projects to return
        try {
            Projects result = apiInstance.getProjectsById(projectsId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#getProjectsById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        Long projectsId = 789; // Long | ID of projects to return
        try {
            Projects result = apiInstance.getProjectsById(projectsId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#getProjectsById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
Long *projectsId = 789; // ID of projects to return

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

// Find projects by ID
[apiInstance getProjectsByIdWith:projectsId
              completionHandler: ^(Projects output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorexApi = require('corex_api');
var defaultClient = CorexApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['api_key'] = "Token"

var api = new CorexApi.ProjectsApi()
var projectsId = 789; // {{Long}} ID of projects to return

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new ProjectsApi();
            var projectsId = 789;  // Long | ID of projects to return

            try
            {
                // Find projects by ID
                Projects result = apiInstance.getProjectsById(projectsId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.getProjectsById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiProjectsApi();
$projectsId = 789; // Long | ID of projects to return

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $projectsId = 789; # Long | ID of projects to return

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
projectsId = 789 # Long | ID of projects to return

try: 
    # Find projects by ID
    api_response = api_instance.get_projects_by_id(projectsId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->getProjectsById: %s\n" % e)

Parameters

Path parameters
Name Description
projectsId*
Long (int64)
ID of projects to return
Required

Responses

Status: 200 - successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Projects not found


updateProjectsWithForm

Updates a projects in the store with form data


/projects/{projectsId}

Usage and SDK Samples

curl -X POST "https://api.corexads.com/v1//projects/{projectsId}"
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: projectsstore_auth
        OAuth projectsstore_auth = (OAuth) defaultClient.getAuthentication("projectsstore_auth");
        projectsstore_auth.setAccessToken("YOUR ACCESS TOKEN");

        ProjectsApi apiInstance = new ProjectsApi();
        Long projectsId = 789; // Long | ID of projects that needs to be updated
        String name = name_example; // String | 
        String status = status_example; // String | 
        try {
            apiInstance.updateProjectsWithForm(projectsId, name, status);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#updateProjectsWithForm");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectsApi;

public class ProjectsApiExample {

    public static void main(String[] args) {
        ProjectsApi apiInstance = new ProjectsApi();
        Long projectsId = 789; // Long | ID of projects that needs to be updated
        String name = name_example; // String | 
        String status = status_example; // String | 
        try {
            apiInstance.updateProjectsWithForm(projectsId, name, status);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectsApi#updateProjectsWithForm");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: projectsstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Long *projectsId = 789; // ID of projects that needs to be updated
String *name = name_example; //  (optional)
String *status = status_example; //  (optional)

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

// Updates a projects in the store with form data
[apiInstance updateProjectsWithFormWith:projectsId
    name:name
    status:status
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CorexApi = require('corex_api');
var defaultClient = CorexApi.ApiClient.instance;

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

var api = new CorexApi.ProjectsApi()
var projectsId = 789; // {{Long}} ID of projects that needs to be updated

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

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

            // Configure OAuth2 access token for authorization: projectsstore_auth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProjectsApi();
            var projectsId = 789;  // Long | ID of projects that needs to be updated
            var name = name_example;  // String |  (optional) 
            var status = status_example;  // String |  (optional) 

            try
            {
                // Updates a projects in the store with form data
                apiInstance.updateProjectsWithForm(projectsId, name, status);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectsApi.updateProjectsWithForm: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\ApiProjectsApi();
$projectsId = 789; // Long | ID of projects that needs to be updated
$name = name_example; // String | 
$status = status_example; // String | 

try {
    $api_instance->updateProjectsWithForm($projectsId, $name, $status);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->updateProjectsWithForm: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;

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

my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $projectsId = 789; # Long | ID of projects that needs to be updated
my $name = name_example; # String | 
my $status = status_example; # String | 

eval { 
    $api_instance->updateProjectsWithForm(projectsId => $projectsId, name => $name, status => $status);
};
if ($@) {
    warn "Exception when calling ProjectsApi->updateProjectsWithForm: $@\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: projectsstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
projectsId = 789 # Long | ID of projects that needs to be updated
name = name_example # String |  (optional)
status = status_example # String |  (optional)

try: 
    # Updates a projects in the store with form data
    api_instance.update_projects_with_form(projectsId, name=name, status=status)
except ApiException as e:
    print("Exception when calling ProjectsApi->updateProjectsWithForm: %s\n" % e)

Parameters

Path parameters
Name Description
projectsId*
Long (int64)
ID of projects that needs to be updated
Required
Form parameters
Name Description
name
String
status
String

Responses

Status: 405 - Invalid input