createFormIntance
Create a new form instance.
Add a new instance to the instance collection of a specific form.
/forms/{idForm}/instances
Usage and SDK Samples
curl -X POST "https://tuservicio.deyel.com/v1.0/forms/{idForm}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: application
OAuth application = (OAuth) defaultClient.getAuthentication("application");
application.setAccessToken("YOUR ACCESS TOKEN");
DefaultApi apiInstance = new DefaultApi();
String authorization = authorization_example; // String | Authorization token obtained with POST /token
String accept = accept_example; // String |
String contentType = contentType_example; // String |
String idForm = idForm_example; // String | Form identification
InstanceValues body = ; // InstanceValues |
try {
InstanceValue result = apiInstance.createFormIntance(authorization, accept, contentType, idForm, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createFormIntance");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String authorization = authorization_example; // String | Authorization token obtained with POST /token
String accept = accept_example; // String |
String contentType = contentType_example; // String |
String idForm = idForm_example; // String | Form identification
InstanceValues body = ; // InstanceValues |
try {
InstanceValue result = apiInstance.createFormIntance(authorization, accept, contentType, idForm, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createFormIntance");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: application)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *authorization = authorization_example; // Authorization token obtained with POST /token
String *accept = accept_example; //
String *contentType = contentType_example; //
String *idForm = idForm_example; // Form identification
InstanceValues *body = ; //
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Create a new form instance.
[apiInstance createFormIntanceWith:authorization
accept:accept
contentType:contentType
idForm:idForm
body:body
completionHandler: ^(InstanceValue output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var DeyelApplication = require('deyel_application');
var defaultClient = DeyelApplication.ApiClient.instance;
// Configure OAuth2 access token for authorization: application
var application = defaultClient.authentications['application'];
application.accessToken = "YOUR ACCESS TOKEN"
var api = new DeyelApplication.DefaultApi()
var authorization = authorization_example; // {String} Authorization token obtained with POST /token
var accept = accept_example; // {String}
var contentType = contentType_example; // {String}
var idForm = idForm_example; // {String} Form identification
var body = ; // {InstanceValues}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createFormIntance(authorization, accept, contentType, idForm, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createFormIntanceExample
{
public void main()
{
// Configure OAuth2 access token for authorization: application
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new DefaultApi();
var authorization = authorization_example; // String | Authorization token obtained with POST /token
var accept = accept_example; // String |
var contentType = contentType_example; // String |
var idForm = idForm_example; // String | Form identification
var body = new InstanceValues(); // InstanceValues |
try
{
// Create a new form instance.
InstanceValue result = apiInstance.createFormIntance(authorization, accept, contentType, idForm, body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.createFormIntance: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: application
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\DefaultApi();
$authorization = authorization_example; // String | Authorization token obtained with POST /token
$accept = accept_example; // String |
$contentType = contentType_example; // String |
$idForm = idForm_example; // String | Form identification
$body = ; // InstanceValues |
try {
$result = $api_instance->createFormIntance($authorization, $accept, $contentType, $idForm, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->createFormIntance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
# Configure OAuth2 access token for authorization: application
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $authorization = authorization_example; # String | Authorization token obtained with POST /token
my $accept = accept_example; # String |
my $contentType = contentType_example; # String |
my $idForm = idForm_example; # String | Form identification
my $body = WWW::SwaggerClient::Object::InstanceValues->new(); # InstanceValues |
eval {
my $result = $api_instance->createFormIntance(authorization => $authorization, accept => $accept, contentType => $contentType, idForm => $idForm, body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->createFormIntance: $@\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: application
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
authorization = authorization_example # String | Authorization token obtained with POST /token
accept = accept_example # String |
contentType = contentType_example # String |
idForm = idForm_example # String | Form identification
body = # InstanceValues |
try:
# Create a new form instance.
api_response = api_instance.create_form_intance(authorization, accept, contentType, idForm, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->createFormIntance: %s\n" % e)
Parameters
Name | Description |
---|---|
idForm* |
String
Form identification
Required
|
Name | Description |
---|---|
Authorization* | |
Accept* |
String
Required
|
Content-Type* |
String
Required
|
Name | Description |
---|---|
body * |