cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/component" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"component": {
"name": "service_contract",
"description": "Support contracts"
}
}'from exsited import build_client
client = build_client()
response = client.custom_components.create_component(
{"component": {"name": "service_contract", "description": "Support contracts"}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.customComponents.createComponent({
component: {name: 'service_contract', description: 'Support contracts'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->customComponents->createComponent([
'component' => ['name' => 'service_contract', 'description' => 'Support contracts'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.custom_components.custom_components_dto.CustomComponentsDto.Component;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Component> response = client.customComponents().createComponent(
Map.of("component", Map.of("name", "service_contract", "description", "Support contracts")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.CustomComponents.CreateComponentAsync(new Dictionary<string, object?>
{
["component"] = new Dictionary<string, object?>
{
["name"] = "service_contract",
["description"] = "Support contracts",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.customComponents.createComponent({
'component': {
'name': 'service_contract',
'description': 'Support contracts',
},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.CustomComponents().CreateComponent(context.Background(), map[string]any{
"component": map[string]any{
"name": "service_contract",
"description": "Support contracts",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"component": {
"object": "<string>",
"id": "<string>",
"status": "<string>",
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"use_in": "<string>",
"relation": "<string>",
"custom_component": "<unknown>",
"custom_objects": [
{}
],
"custom_forms": [
{
"column_count": 123,
"data": {
"firstColumnAttribute": [
{
"canEncrypt": true,
"description": "<string>",
"displayName": "<string>",
"enabled": true,
"encryptData": true,
"entity": "<unknown>",
"fieldRequired": true,
"formMaxLengthInputed": true,
"formMinLengthInputed": true,
"id": 123,
"ids": 123,
"isRequired": true,
"isUnique": true,
"maxLength": "<unknown>",
"metaData": "<string>",
"minLength": "<unknown>",
"name": "<string>",
"options": [
{
"id": "<string>",
"name": "<string>"
}
],
"position": "<string>",
"showInListView": true,
"timeFormat": "<unknown>",
"type": "<string>",
"typeValue": "<string>",
"validationMessage": "<string>",
"validationMessageRequired": true,
"value": "<string>"
}
],
"secondColumnAttribute": [
{
"displayName": "<string>",
"fieldEnabled": true,
"fieldRequired": true,
"ids": 123,
"name": "<string>",
"showInListView": true,
"type": "<string>",
"typeActual": {
"key": "<string>",
"value": "<string>"
},
"validationMessageRequired": true
}
],
"thirdColumnAttribute": [
{}
]
},
"id": "<string>",
"object": "<string>",
"template_name": "<string>"
}
],
"child_custom_components": [
{}
],
"activity_logs": [
{}
],
"created_on": "<string>",
"last_updated_on": "<string>",
"created_by": "<unknown>",
"last_updated_by": "<unknown>",
"version": 123,
"href": "<string>"
}
}Custom components
Create a component definition
Creates a component definition and returns it, under component.
POST
/
component
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/component" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"component": {
"name": "service_contract",
"description": "Support contracts"
}
}'from exsited import build_client
client = build_client()
response = client.custom_components.create_component(
{"component": {"name": "service_contract", "description": "Support contracts"}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.customComponents.createComponent({
component: {name: 'service_contract', description: 'Support contracts'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->customComponents->createComponent([
'component' => ['name' => 'service_contract', 'description' => 'Support contracts'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.custom_components.custom_components_dto.CustomComponentsDto.Component;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Component> response = client.customComponents().createComponent(
Map.of("component", Map.of("name", "service_contract", "description", "Support contracts")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.CustomComponents.CreateComponentAsync(new Dictionary<string, object?>
{
["component"] = new Dictionary<string, object?>
{
["name"] = "service_contract",
["description"] = "Support contracts",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.customComponents.createComponent({
'component': {
'name': 'service_contract',
'description': 'Support contracts',
},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.CustomComponents().CreateComponent(context.Background(), map[string]any{
"component": map[string]any{
"name": "service_contract",
"description": "Support contracts",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"component": {
"object": "<string>",
"id": "<string>",
"status": "<string>",
"name": "<string>",
"display_name": "<string>",
"description": "<string>",
"use_in": "<string>",
"relation": "<string>",
"custom_component": "<unknown>",
"custom_objects": [
{}
],
"custom_forms": [
{
"column_count": 123,
"data": {
"firstColumnAttribute": [
{
"canEncrypt": true,
"description": "<string>",
"displayName": "<string>",
"enabled": true,
"encryptData": true,
"entity": "<unknown>",
"fieldRequired": true,
"formMaxLengthInputed": true,
"formMinLengthInputed": true,
"id": 123,
"ids": 123,
"isRequired": true,
"isUnique": true,
"maxLength": "<unknown>",
"metaData": "<string>",
"minLength": "<unknown>",
"name": "<string>",
"options": [
{
"id": "<string>",
"name": "<string>"
}
],
"position": "<string>",
"showInListView": true,
"timeFormat": "<unknown>",
"type": "<string>",
"typeValue": "<string>",
"validationMessage": "<string>",
"validationMessageRequired": true,
"value": "<string>"
}
],
"secondColumnAttribute": [
{
"displayName": "<string>",
"fieldEnabled": true,
"fieldRequired": true,
"ids": 123,
"name": "<string>",
"showInListView": true,
"type": "<string>",
"typeActual": {
"key": "<string>",
"value": "<string>"
},
"validationMessageRequired": true
}
],
"thirdColumnAttribute": [
{}
]
},
"id": "<string>",
"object": "<string>",
"template_name": "<string>"
}
],
"child_custom_components": [
{}
],
"activity_logs": [
{}
],
"created_on": "<string>",
"last_updated_on": "<string>",
"created_by": "<unknown>",
"last_updated_by": "<unknown>",
"version": 123,
"href": "<string>"
}
}Defines a new component. Send its fields under
component; name is required and is an identifier written with underscores. If you send use_in, send relation with it. The new definition comes back with its cmp_ id and an empty activity_logs.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Body
application/json
Show child attributes
Show child attributes
Response
201 - application/json
The new component definition, under component.
Show child attributes
Show child attributes