Skip to main content
POST
/
api
/
v3
/
axisSections
Create a new AxisSection
curl --request POST \
  --url https://{host}/api/v3/axisSections \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "multilingualName": {},
  "axisId": 123,
  "id": 2,
  "description": "<string>",
  "ownerId": 123,
  "endOn": "2023-11-07T05:31:56Z",
  "active": true,
  "isPublic": true,
  "departments": [
    {
      "id": 123
    }
  ],
  "legalEntities": [
    {
      "id": 123
    }
  ],
  "users": [
    {
      "id": 123
    }
  ],
  "parentAxisSections": [
    {
      "code": "<string>",
      "multilingualName": {},
      "axisId": 123,
      "id": 2,
      "description": "<string>",
      "ownerId": 123,
      "endOn": "2023-11-07T05:31:56Z",
      "active": true,
      "isPublic": true,
      "departments": [
        {
          "id": 123
        }
      ],
      "legalEntities": [
        {
          "id": 123
        }
      ],
      "users": [
        {
          "id": 123
        }
      ]
    }
  ],
  "childrenAxisSections": [
    {
      "code": "<string>",
      "multilingualName": {},
      "axisId": 123,
      "id": 2,
      "description": "<string>",
      "ownerId": 123,
      "endOn": "2023-11-07T05:31:56Z",
      "active": true,
      "isPublic": true,
      "departments": [
        {
          "id": 123
        }
      ],
      "legalEntities": [
        {
          "id": 123
        }
      ],
      "users": [
        {
          "id": 123
        }
      ]
    }
  ]
}
'
import requests

url = "https://{host}/api/v3/axisSections"

payload = {
"code": "<string>",
"multilingualName": {},
"axisId": 123,
"id": 2,
"description": "<string>",
"ownerId": 123,
"endOn": "2023-11-07T05:31:56Z",
"active": True,
"isPublic": True,
"departments": [{ "id": 123 }],
"legalEntities": [{ "id": 123 }],
"users": [{ "id": 123 }],
"parentAxisSections": [
{
"code": "<string>",
"multilingualName": {},
"axisId": 123,
"id": 2,
"description": "<string>",
"ownerId": 123,
"endOn": "2023-11-07T05:31:56Z",
"active": True,
"isPublic": True,
"departments": [{ "id": 123 }],
"legalEntities": [{ "id": 123 }],
"users": [{ "id": 123 }]
}
],
"childrenAxisSections": [
{
"code": "<string>",
"multilingualName": {},
"axisId": 123,
"id": 2,
"description": "<string>",
"ownerId": 123,
"endOn": "2023-11-07T05:31:56Z",
"active": True,
"isPublic": True,
"departments": [{ "id": 123 }],
"legalEntities": [{ "id": 123 }],
"users": [{ "id": 123 }]
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
multilingualName: {},
axisId: 123,
id: 2,
description: '<string>',
ownerId: 123,
endOn: '2023-11-07T05:31:56Z',
active: true,
isPublic: true,
departments: [{id: 123}],
legalEntities: [{id: 123}],
users: [{id: 123}],
parentAxisSections: [
{
code: '<string>',
multilingualName: {},
axisId: 123,
id: 2,
description: '<string>',
ownerId: 123,
endOn: '2023-11-07T05:31:56Z',
active: true,
isPublic: true,
departments: [{id: 123}],
legalEntities: [{id: 123}],
users: [{id: 123}]
}
],
childrenAxisSections: [
{
code: '<string>',
multilingualName: {},
axisId: 123,
id: 2,
description: '<string>',
ownerId: 123,
endOn: '2023-11-07T05:31:56Z',
active: true,
isPublic: true,
departments: [{id: 123}],
legalEntities: [{id: 123}],
users: [{id: 123}]
}
]
})
};

fetch('https://{host}/api/v3/axisSections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/v3/axisSections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'multilingualName' => [

],
'axisId' => 123,
'id' => 2,
'description' => '<string>',
'ownerId' => 123,
'endOn' => '2023-11-07T05:31:56Z',
'active' => true,
'isPublic' => true,
'departments' => [
[
'id' => 123
]
],
'legalEntities' => [
[
'id' => 123
]
],
'users' => [
[
'id' => 123
]
],
'parentAxisSections' => [
[
'code' => '<string>',
'multilingualName' => [

],
'axisId' => 123,
'id' => 2,
'description' => '<string>',
'ownerId' => 123,
'endOn' => '2023-11-07T05:31:56Z',
'active' => true,
'isPublic' => true,
'departments' => [
[
'id' => 123
]
],
'legalEntities' => [
[
'id' => 123
]
],
'users' => [
[
'id' => 123
]
]
]
],
'childrenAxisSections' => [
[
'code' => '<string>',
'multilingualName' => [

],
'axisId' => 123,
'id' => 2,
'description' => '<string>',
'ownerId' => 123,
'endOn' => '2023-11-07T05:31:56Z',
'active' => true,
'isPublic' => true,
'departments' => [
[
'id' => 123
]
],
'legalEntities' => [
[
'id' => 123
]
],
'users' => [
[
'id' => 123
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{host}/api/v3/axisSections"

payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ],\n \"parentAxisSections\": [\n {\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ]\n }\n ],\n \"childrenAxisSections\": [\n {\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ]\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{host}/api/v3/axisSections")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ],\n \"parentAxisSections\": [\n {\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ]\n }\n ],\n \"childrenAxisSections\": [\n {\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ]\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/api/v3/axisSections")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ],\n \"parentAxisSections\": [\n {\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ]\n }\n ],\n \"childrenAxisSections\": [\n {\n \"code\": \"<string>\",\n \"multilingualName\": {},\n \"axisId\": 123,\n \"id\": 2,\n \"description\": \"<string>\",\n \"ownerId\": 123,\n \"endOn\": \"2023-11-07T05:31:56Z\",\n \"active\": true,\n \"isPublic\": true,\n \"departments\": [\n {\n \"id\": 123\n }\n ],\n \"legalEntities\": [\n {\n \"id\": 123\n }\n ],\n \"users\": [\n {\n \"id\": 123\n }\n ]\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "code": "<string>",
    "multilingualName": {},
    "axisId": 123,
    "id": 2,
    "name": "<string>",
    "url": "<string>",
    "description": "<string>",
    "ownerId": 123,
    "startOn": "2023-11-07T05:31:56Z",
    "endOn": "2023-11-07T05:31:56Z",
    "active": true,
    "isPublic": true,
    "departments": [
      {
        "id": 123
      }
    ],
    "legalEntities": [
      {
        "id": 123
      }
    ],
    "users": [
      {
        "id": 123
      }
    ],
    "parentAxisSections": [
      {
        "code": "<string>",
        "multilingualName": {},
        "axisId": 123,
        "id": 2,
        "name": "<string>",
        "url": "<string>",
        "description": "<string>",
        "ownerId": 123,
        "startOn": "2023-11-07T05:31:56Z",
        "endOn": "2023-11-07T05:31:56Z",
        "active": true,
        "isPublic": true,
        "departments": [
          {
            "id": 123
          }
        ],
        "legalEntities": [
          {
            "id": 123
          }
        ],
        "users": [
          {
            "id": 123
          }
        ]
      }
    ],
    "childrenAxisSections": [
      {
        "code": "<string>",
        "multilingualName": {},
        "axisId": 123,
        "id": 2,
        "name": "<string>",
        "url": "<string>",
        "description": "<string>",
        "ownerId": 123,
        "startOn": "2023-11-07T05:31:56Z",
        "endOn": "2023-11-07T05:31:56Z",
        "active": true,
        "isPublic": true,
        "departments": [
          {
            "id": 123
          }
        ],
        "legalEntities": [
          {
            "id": 123
          }
        ],
        "users": [
          {
            "id": 123
          }
        ]
      }
    ]
  }
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Body

application/json
code
string
required
multilingualName
required

The following characters should be avoided in the actual name of the axis-sections: "[", "]" and "|". Besides, slashes "/" and backslashes "\" might also cause problems.

To learn more about this, please refer to Get Started With Axis-Sections.

axisId
integer
required
id
integer
Required range: x >= 1
description
string | null
ownerId
integer | null
endOn
string<date-time> | null
active
boolean
default:true
isPublic
boolean
default:true
departments
object[]

List of departments associated with this axis-section. Only applicable when isPublic is false.

List of legal entities associated with this axis-section. Only applicable when isPublic is false.

users
object[]

List of users associated with this axis-section. Only applicable when isPublic is false.

parentAxisSections
AxisSectionTreeless · object[]
childrenAxisSections
AxisSectionTreeless · object[]

Response

OK

data
The Axis Section resource · object