Profiles
Create a profile for a Fluid OS definition
Create a new profile for a Fluid OS definition
POST
/
api
/
company
/
fluid_os
/
definitions
/
{definition_id}
/
profiles
Create a profile for a Fluid OS definition
curl --request POST \
--url https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile": {
"mobile_navigation_id": 123,
"name": "<string>",
"navigation_id": 123,
"default": true,
"theme_ids": [
123
],
"permissions": {
"countries": [
123
],
"ranks": [
123
],
"roles": [
"<string>"
],
"platform": [
"<string>"
]
}
}
}
'import requests
url = "https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles"
payload = { "profile": {
"mobile_navigation_id": 123,
"name": "<string>",
"navigation_id": 123,
"default": True,
"theme_ids": [123],
"permissions": {
"countries": [123],
"ranks": [123],
"roles": ["<string>"],
"platform": ["<string>"]
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile: {
mobile_navigation_id: 123,
name: '<string>',
navigation_id: 123,
default: true,
theme_ids: [123],
permissions: {countries: [123], ranks: [123], roles: ['<string>'], platform: ['<string>']}
}
})
};
fetch('https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles', 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.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles",
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([
'profile' => [
'mobile_navigation_id' => 123,
'name' => '<string>',
'navigation_id' => 123,
'default' => true,
'theme_ids' => [
123
],
'permissions' => [
'countries' => [
123
],
'ranks' => [
123
],
'roles' => [
'<string>'
],
'platform' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles"
payload := strings.NewReader("{\n \"profile\": {\n \"mobile_navigation_id\": 123,\n \"name\": \"<string>\",\n \"navigation_id\": 123,\n \"default\": true,\n \"theme_ids\": [\n 123\n ],\n \"permissions\": {\n \"countries\": [\n 123\n ],\n \"ranks\": [\n 123\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"platform\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"profile\": {\n \"mobile_navigation_id\": 123,\n \"name\": \"<string>\",\n \"navigation_id\": 123,\n \"default\": true,\n \"theme_ids\": [\n 123\n ],\n \"permissions\": {\n \"countries\": [\n 123\n ],\n \"ranks\": [\n 123\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"platform\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile\": {\n \"mobile_navigation_id\": 123,\n \"name\": \"<string>\",\n \"navigation_id\": 123,\n \"default\": true,\n \"theme_ids\": [\n 123\n ],\n \"permissions\": {\n \"countries\": [\n 123\n ],\n \"ranks\": [\n 123\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"platform\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"profile": {
"id": 123,
"definition_id": 123,
"name": "<string>",
"default": true,
"permissions": {},
"navigation": {
"id": 123,
"definition_id": 123,
"platform": "web",
"name": "<string>",
"navigation_items": [
{
"id": 123,
"icon": "<string>",
"label": "<string>",
"parent_id": 123,
"position": 123,
"screen_id": 123,
"slug": "<string>",
"source": "user",
"children": "<array>"
}
]
},
"mobile_navigation": {
"id": 123,
"definition_id": 123,
"platform": "web",
"name": "<string>",
"navigation_items": [
{
"id": 123,
"icon": "<string>",
"label": "<string>",
"parent_id": 123,
"position": 123,
"screen_id": 123,
"slug": "<string>",
"source": "user",
"children": "<array>"
}
]
},
"themes": [
{
"id": 123,
"definition_id": 123,
"config": {},
"active": true,
"name": "<string>"
}
]
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Path Parameters
Definition ID
Body
application/json
Request payload
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
⌘I
Create a profile for a Fluid OS definition
curl --request POST \
--url https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile": {
"mobile_navigation_id": 123,
"name": "<string>",
"navigation_id": 123,
"default": true,
"theme_ids": [
123
],
"permissions": {
"countries": [
123
],
"ranks": [
123
],
"roles": [
"<string>"
],
"platform": [
"<string>"
]
}
}
}
'import requests
url = "https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles"
payload = { "profile": {
"mobile_navigation_id": 123,
"name": "<string>",
"navigation_id": 123,
"default": True,
"theme_ids": [123],
"permissions": {
"countries": [123],
"ranks": [123],
"roles": ["<string>"],
"platform": ["<string>"]
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile: {
mobile_navigation_id: 123,
name: '<string>',
navigation_id: 123,
default: true,
theme_ids: [123],
permissions: {countries: [123], ranks: [123], roles: ['<string>'], platform: ['<string>']}
}
})
};
fetch('https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles', 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.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles",
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([
'profile' => [
'mobile_navigation_id' => 123,
'name' => '<string>',
'navigation_id' => 123,
'default' => true,
'theme_ids' => [
123
],
'permissions' => [
'countries' => [
123
],
'ranks' => [
123
],
'roles' => [
'<string>'
],
'platform' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles"
payload := strings.NewReader("{\n \"profile\": {\n \"mobile_navigation_id\": 123,\n \"name\": \"<string>\",\n \"navigation_id\": 123,\n \"default\": true,\n \"theme_ids\": [\n 123\n ],\n \"permissions\": {\n \"countries\": [\n 123\n ],\n \"ranks\": [\n 123\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"platform\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"profile\": {\n \"mobile_navigation_id\": 123,\n \"name\": \"<string>\",\n \"navigation_id\": 123,\n \"default\": true,\n \"theme_ids\": [\n 123\n ],\n \"permissions\": {\n \"countries\": [\n 123\n ],\n \"ranks\": [\n 123\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"platform\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/fluid_os/definitions/{definition_id}/profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile\": {\n \"mobile_navigation_id\": 123,\n \"name\": \"<string>\",\n \"navigation_id\": 123,\n \"default\": true,\n \"theme_ids\": [\n 123\n ],\n \"permissions\": {\n \"countries\": [\n 123\n ],\n \"ranks\": [\n 123\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"platform\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"profile": {
"id": 123,
"definition_id": 123,
"name": "<string>",
"default": true,
"permissions": {},
"navigation": {
"id": 123,
"definition_id": 123,
"platform": "web",
"name": "<string>",
"navigation_items": [
{
"id": 123,
"icon": "<string>",
"label": "<string>",
"parent_id": 123,
"position": 123,
"screen_id": 123,
"slug": "<string>",
"source": "user",
"children": "<array>"
}
]
},
"mobile_navigation": {
"id": 123,
"definition_id": 123,
"platform": "web",
"name": "<string>",
"navigation_items": [
{
"id": 123,
"icon": "<string>",
"label": "<string>",
"parent_id": 123,
"position": 123,
"screen_id": 123,
"slug": "<string>",
"source": "user",
"children": "<array>"
}
]
},
"themes": [
{
"id": 123,
"definition_id": 123,
"config": {},
"active": true,
"name": "<string>"
}
]
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}