curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"column_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"group_membership": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_output": false
}
]
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/"
payload = {
"column_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"group_membership": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_output": False
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
column_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
group_membership: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_output: false
}
]
})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/', 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://api.getoneprofile.ai/tables/{table_id}/columns/reorder/",
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([
'column_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'group_membership' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_output' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.getoneprofile.ai/tables/{table_id}/columns/reorder/"
payload := strings.NewReader("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"group_membership\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_output\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.getoneprofile.ai/tables/{table_id}/columns/reorder/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"group_membership\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_output\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"group_membership\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_output\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"column_type": "text",
"created_at": "2023-11-07T05:31:56Z",
"data_type": "string",
"definition": {
"default_value": "<string>",
"kind": "manual"
},
"definition_version": 123,
"depends_on_column_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"description": "<string>",
"display_name": "<string>",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_group_output": true,
"kind": "manual",
"position": 123,
"supported_filter_operators": [
"eq"
],
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type_options": {
"choices": [
{
"value": "<string>",
"color": "<string>"
}
],
"type": "select"
},
"ui_prefs": {
"color": "gray",
"hidden": true,
"pinned": true,
"width": 123
},
"updated_at": "2023-11-07T05:31:56Z",
"ai_made": false,
"auto_run": true,
"pending_recompute": false,
"refresh_interval_hours": 0,
"run_condition": {
"default_value": "<string>",
"kind": "manual"
},
"run_condition_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_condition_view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_delay_seconds": 0
}
],
"total_count": 123,
"groups": [
{
"collapsed": true,
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"members": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_output": true
}
],
"name": "<string>",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ui_color": "gray",
"updated_at": "2023-11-07T05:31:56Z",
"run_condition": {
"default_value": "<string>",
"kind": "manual"
}
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Reorder table columns
Reorder a table’s columns. The request must contain every column of the table exactly once. Cosmetic: no version bumps and no recompute run. Pass group_membership to move columns in or out of a column group in the same request, which is what dragging a column into a group does: the new order and the new membership land together, so the group is never momentarily split.
curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"column_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"group_membership": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_output": false
}
]
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/"
payload = {
"column_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"group_membership": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_output": False
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
column_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
group_membership: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_output: false
}
]
})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/', 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://api.getoneprofile.ai/tables/{table_id}/columns/reorder/",
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([
'column_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'group_membership' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_output' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.getoneprofile.ai/tables/{table_id}/columns/reorder/"
payload := strings.NewReader("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"group_membership\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_output\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.getoneprofile.ai/tables/{table_id}/columns/reorder/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"group_membership\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_output\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/columns/reorder/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"column_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"group_membership\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_output\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"columns": [
{
"column_type": "text",
"created_at": "2023-11-07T05:31:56Z",
"data_type": "string",
"definition": {
"default_value": "<string>",
"kind": "manual"
},
"definition_version": 123,
"depends_on_column_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"description": "<string>",
"display_name": "<string>",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_group_output": true,
"kind": "manual",
"position": 123,
"supported_filter_operators": [
"eq"
],
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type_options": {
"choices": [
{
"value": "<string>",
"color": "<string>"
}
],
"type": "select"
},
"ui_prefs": {
"color": "gray",
"hidden": true,
"pinned": true,
"width": 123
},
"updated_at": "2023-11-07T05:31:56Z",
"ai_made": false,
"auto_run": true,
"pending_recompute": false,
"refresh_interval_hours": 0,
"run_condition": {
"default_value": "<string>",
"kind": "manual"
},
"run_condition_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_condition_view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_delay_seconds": 0
}
],
"total_count": 123,
"groups": [
{
"collapsed": true,
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"members": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_output": true
}
],
"name": "<string>",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ui_color": "gray",
"updated_at": "2023-11-07T05:31:56Z",
"run_condition": {
"default_value": "<string>",
"kind": "manual"
}
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
Request body for reordering a table's columns (full permutation).
Every column of the table exactly once, in the new display order.
1 - 100 elementsColumns this reorder also moves in or out of a column group; columns left out keep the group they are in. This is how a drag that drops a column between two members of a group makes it a member: the new order and the new membership land together, so the group is never momentarily split. A group the list would leave with no member, or with no output, is refused rather than repaired.
Show child attributes
Show child attributes
Response
Successful Response
Was this page helpful?