Tinq\Workflows

Official Tinq.ai PHP SDK.

All URIs are relative to https://tinq.ai/api/v2, except if the operation defines another base path.

MethodHTTP requestDescription
createWorkflowPOST /workflowsCreate workflow
executeWorkflowPOST /workflows//executeExecute workflow
getOneWorkflowGET /workflows/Get one workflow
getWorkflowsGET /workflowsGet workflows

createWorkflow()

createWorkflow($content_type, $accept, $body)

Create workflow

Create a workflow.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Workflows(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$content_type = application/json; // string
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

try {
    $apiInstance->createWorkflow($content_type, $accept, $body);
} catch (Exception $e) {
    echo 'Exception when calling Workflows->createWorkflow: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
content_typestring[optional]
acceptstring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

executeWorkflow()

executeWorkflow($workflow_slug, $content_type, $accept, $body)

Execute workflow

Execute a workflow

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Workflows(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$workflow_slug = 'workflow_slug_example'; // string
$content_type = application/json; // string
$accept = application/json; // string
$body = array('key' => new \stdClass); // object

try {
    $apiInstance->executeWorkflow($workflow_slug, $content_type, $accept, $body);
} catch (Exception $e) {
    echo 'Exception when calling Workflows->executeWorkflow: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
workflow_slugstring
content_typestring[optional]
acceptstring[optional]
bodyobject[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getOneWorkflow()

getOneWorkflow($workflow_slug, $accept, $content_type)

Get one workflow

Get one workflow

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Workflows(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$workflow_slug = 'workflow_slug_example'; // string
$accept = application/json; // string
$content_type = application/json; // string

try {
    $apiInstance->getOneWorkflow($workflow_slug, $accept, $content_type);
} catch (Exception $e) {
    echo 'Exception when calling Workflows->getOneWorkflow: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
workflow_slugstring
acceptstring[optional]
content_typestring[optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkflows()

getWorkflows()

Get workflows

List all user’s workflows

Example

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


// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Tinq\Api\Workflows(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $apiInstance->getWorkflows();
} catch (Exception $e) {
    echo 'Exception when calling Workflows->getWorkflows: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]