JavaScript
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const profile of client.workspaceAdmin.profiles.list()) {
console.log(profile.metadata);
}import os
from cadenya import Cadenya
client = Cadenya(
api_key=os.environ.get("CADENYA_API_KEY"), # This is the default and can be omitted
)
page = client.workspace_admin.profiles.list()
page = page.items[0]
print(page.metadata)package main
import (
"context"
"fmt"
"go.cadenya.com/cadenya-go"
"go.cadenya.com/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.WorkspaceAdmin.Profiles.List(context.TODO(), cadenya.WorkspaceAdminProfileListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
page = cadenya.workspace_admin.profiles.list
puts(page)cadenya workspace-admin:profiles list \
--api-key 'My API Key'curl --request GET \
--url https://api.cadenya.com/v1/account/profiles \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cadenya.com/v1/account/profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.cadenya.com/v1/account/profiles")
.header("Authorization", "Bearer <token>")
.asString();{
"items": [
{
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"name": "<string>",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"externalId": "<string>",
"labels": {},
"createdAt": "2023-11-07T05:31:56Z"
},
"spec": {
"email": "<string>",
"name": "<string>"
}
}
],
"pagination": {
"nextCursor": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Workspace Admin
Search account profiles
Searches the account’s profiles for a member picker, with free-form name/email search and an optional type filter. Account-scoped; admin only.
GET
/
v1
/
account
/
profiles
JavaScript
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const profile of client.workspaceAdmin.profiles.list()) {
console.log(profile.metadata);
}import os
from cadenya import Cadenya
client = Cadenya(
api_key=os.environ.get("CADENYA_API_KEY"), # This is the default and can be omitted
)
page = client.workspace_admin.profiles.list()
page = page.items[0]
print(page.metadata)package main
import (
"context"
"fmt"
"go.cadenya.com/cadenya-go"
"go.cadenya.com/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.WorkspaceAdmin.Profiles.List(context.TODO(), cadenya.WorkspaceAdminProfileListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
page = cadenya.workspace_admin.profiles.list
puts(page)cadenya workspace-admin:profiles list \
--api-key 'My API Key'curl --request GET \
--url https://api.cadenya.com/v1/account/profiles \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cadenya.com/v1/account/profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.cadenya.com/v1/account/profiles")
.header("Authorization", "Bearer <token>")
.asString();{
"items": [
{
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"name": "<string>",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"externalId": "<string>",
"labels": {},
"createdAt": "2023-11-07T05:31:56Z"
},
"spec": {
"email": "<string>",
"name": "<string>"
}
}
],
"pagination": {
"nextCursor": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}// query matches profile name and email, case-insensitive.
for await (const profile of client.workspaceAdmin.profiles.list({ query: 'sam' })) {
console.log(profile.metadata.id, profile.metadata.name);
}
// Query matches profile name and email, case-insensitive.
page, err := client.WorkspaceAdmin.Profiles.List(ctx,
cadenya.WorkspaceAdminProfileListParams{
Query: cadenya.String("sam"),
})
for _, profile := range page.Items {
fmt.Println(profile.Metadata.ID, profile.Metadata.Name)
}
# query matches profile name and email, case-insensitive.
page = cadenya.workspace_admin.profiles.list(query: "sam")
page.auto_paging_each do |profile|
puts "#{profile.metadata.id} #{profile.metadata.name}"
end
curl "https://api.cadenya.com/v1/account/profiles?query=sam" \
-H "Authorization: Bearer ${CADENYA_API_KEY}"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of results to return
Pagination cursor from previous response
Free-form search over profile name and email. Case-insensitive substring match; empty returns all profiles.
Filters by metadata labels. Comma-separated key=value pairs, e.g. "env=prod,team=ai". A resource matches only if every pair matches exactly (AND semantics).
⌘I