Csharp (SDK)
using Meitner;
using Meitner.Models.Components;
using System;
using System.Collections.Generic;
var sdk = new MeitnerSDK(security: new Security() {
Option1 = new SecurityOption1() {
ClientCredentials = "<YOUR_API_KEY_HERE>",
ClientSecret = "<YOUR_API_KEY_HERE>",
},
});
Models.Requests.GroupSearchResponse? res = await sdk.Groups.SearchAsync(
groupSearch: new GroupSearchRequestBody() {
Filter = new GroupSearchFilter() {
Equals = new GroupSearchEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new GroupSearchEqualsMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
CreatedBy = "123e4567-e89b-12d3-a456-426614174000",
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedBy = "123e4567-e89b-12d3-a456-426614174000",
},
External = new GroupSearchEqualsExternal() {
SourceID = "example",
Source = "example",
},
SchoolID = "123e4567-e89b-12d3-a456-426614174000",
Title = "example",
ModeratorIDs = "123e4567-e89b-12d3-a456-426614174000",
MemberIDs = "123e4567-e89b-12d3-a456-426614174000",
},
NotEquals = new GroupSearchNotEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new GroupSearchNotEqualsMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
CreatedBy = "123e4567-e89b-12d3-a456-426614174000",
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedBy = "123e4567-e89b-12d3-a456-426614174000",
},
External = new GroupSearchNotEqualsExternal() {
SourceID = "example",
Source = "example",
},
SchoolID = "123e4567-e89b-12d3-a456-426614174000",
Title = "example",
ModeratorIDs = "123e4567-e89b-12d3-a456-426614174000",
MemberIDs = "123e4567-e89b-12d3-a456-426614174000",
},
GreaterThan = new GroupSearchGreaterThan() {
Meta = new GroupSearchGreaterThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
SmallerThan = new GroupSearchSmallerThan() {
Meta = new GroupSearchSmallerThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
GreaterOrEqual = new GroupSearchGreaterOrEqual() {
Meta = new GroupSearchGreaterOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
SmallerOrEqual = new GroupSearchSmallerOrEqual() {
Meta = new GroupSearchSmallerOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
Contains = new GroupSearchContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new GroupSearchContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new GroupSearchContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
SchoolID = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Title = new List<string>() {
"example",
},
ModeratorIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
MemberIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
NotContains = new GroupSearchNotContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new GroupSearchNotContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new GroupSearchNotContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
SchoolID = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Title = new List<string>() {
"example",
},
ModeratorIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
MemberIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
Like = new GroupSearchLike() {
External = new GroupSearchLikeExternal() {
SourceID = "example",
Source = "example",
},
Title = "example",
},
NotLike = new GroupSearchNotLike() {
External = new GroupSearchNotLikeExternal() {
SourceID = "example",
Source = "example",
},
Title = "example",
},
Null = new GroupSearchNull() {
Meta = new GroupSearchNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new GroupSearchNullExternal() {
SourceID = true,
Source = true,
},
Types = true,
ModeratorIDs = true,
MemberIDs = true,
},
NotNull = new GroupSearchNotNull() {
Meta = new GroupSearchNotNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new GroupSearchNotNullExternal() {
SourceID = true,
Source = true,
},
Types = true,
ModeratorIDs = true,
MemberIDs = true,
},
OrCondition = true,
},
},
limit: 1,
offset: 0
);
while(res != null)
{
// handle items
res = await res.Next!();
}from meitner import Meitner, models
from meitner.utils import parse_datetime
import os
with Meitner(
security=models.Security(
option1=models.SecurityOption1(
client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
),
),
) as m_client:
res = m_client.groups.search(filter_={
"equals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_by": "123e4567-e89b-12d3-a456-426614174000",
},
"external": {
"source_id": "example",
"source": "example",
},
"school_id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderator_i_ds": "123e4567-e89b-12d3-a456-426614174000",
"member_i_ds": "123e4567-e89b-12d3-a456-426614174000",
},
"not_equals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_by": "123e4567-e89b-12d3-a456-426614174000",
},
"external": {
"source_id": "example",
"source": "example",
},
"school_id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderator_i_ds": "123e4567-e89b-12d3-a456-426614174000",
"member_i_ds": "123e4567-e89b-12d3-a456-426614174000",
},
"greater_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"smaller_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"greater_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"smaller_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"contains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"meta": {
"created_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
"updated_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"external": {
"source_id": [
"example",
],
"source": [
"example",
],
},
"school_id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"title": [
"example",
],
"moderator_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
"member_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"not_contains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"meta": {
"created_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
"updated_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"external": {
"source_id": [
"example",
],
"source": [
"example",
],
},
"school_id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"title": [
"example",
],
"moderator_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
"member_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"like": {
"external": {
"source_id": "example",
"source": "example",
},
"title": "example",
},
"not_like": {
"external": {
"source_id": "example",
"source": "example",
},
"title": "example",
},
"null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"types": True,
"moderator_i_ds": True,
"member_i_ds": True,
},
"not_null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"types": True,
"moderator_i_ds": True,
"member_i_ds": True,
},
"or_condition": True,
}, limit=1, offset=0)
while res is not None:
# Handle items
res = res.next()curl --request POST \
--url https://api.meitner.se/directory/v1/group/_search \
--header 'Client-ID: <api-key>' \
--header 'Client-Secret: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"equals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "123e4567-e89b-12d3-a456-426614174000",
"updatedAt": "2024-01-15T10:30:00Z",
"updatedBy": "123e4567-e89b-12d3-a456-426614174000"
},
"external": {
"sourceID": "example",
"source": "example"
},
"schoolID": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderatorIDs": "123e4567-e89b-12d3-a456-426614174000",
"memberIDs": "123e4567-e89b-12d3-a456-426614174000"
},
"notEquals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "123e4567-e89b-12d3-a456-426614174000",
"updatedAt": "2024-01-15T10:30:00Z",
"updatedBy": "123e4567-e89b-12d3-a456-426614174000"
},
"external": {
"sourceID": "example",
"source": "example"
},
"schoolID": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderatorIDs": "123e4567-e89b-12d3-a456-426614174000",
"memberIDs": "123e4567-e89b-12d3-a456-426614174000"
},
"greaterThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"smallerThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"greaterOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"smallerOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"contains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000"
],
"meta": {
"createdBy": [
"123e4567-e89b-12d3-a456-426614174000"
],
"updatedBy": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"external": {
"sourceID": [
"example"
],
"source": [
"example"
]
},
"schoolID": [
"123e4567-e89b-12d3-a456-426614174000"
],
"title": [
"example"
],
"moderatorIDs": [
"123e4567-e89b-12d3-a456-426614174000"
],
"memberIDs": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"notContains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000"
],
"meta": {
"createdBy": [
"123e4567-e89b-12d3-a456-426614174000"
],
"updatedBy": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"external": {
"sourceID": [
"example"
],
"source": [
"example"
]
},
"schoolID": [
"123e4567-e89b-12d3-a456-426614174000"
],
"title": [
"example"
],
"moderatorIDs": [
"123e4567-e89b-12d3-a456-426614174000"
],
"memberIDs": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"like": {
"external": {
"sourceID": "example",
"source": "example"
},
"title": "example"
},
"notLike": {
"external": {
"sourceID": "example",
"source": "example"
},
"title": "example"
},
"null": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"types": true,
"moderatorIDs": true,
"memberIDs": true
},
"notNull": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"types": true,
"moderatorIDs": true,
"memberIDs": true
},
"orCondition": true
}
}
'const options = {
method: 'POST',
headers: {
'Client-ID': '<api-key>',
'Client-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filter: {
equals: {
id: '123e4567-e89b-12d3-a456-426614174000',
meta: {
createdAt: '2024-01-15T10:30:00Z',
createdBy: '123e4567-e89b-12d3-a456-426614174000',
updatedAt: '2024-01-15T10:30:00Z',
updatedBy: '123e4567-e89b-12d3-a456-426614174000'
},
external: {sourceID: 'example', source: 'example'},
schoolID: '123e4567-e89b-12d3-a456-426614174000',
title: 'example',
moderatorIDs: '123e4567-e89b-12d3-a456-426614174000',
memberIDs: '123e4567-e89b-12d3-a456-426614174000'
},
notEquals: {
id: '123e4567-e89b-12d3-a456-426614174000',
meta: {
createdAt: '2024-01-15T10:30:00Z',
createdBy: '123e4567-e89b-12d3-a456-426614174000',
updatedAt: '2024-01-15T10:30:00Z',
updatedBy: '123e4567-e89b-12d3-a456-426614174000'
},
external: {sourceID: 'example', source: 'example'},
schoolID: '123e4567-e89b-12d3-a456-426614174000',
title: 'example',
moderatorIDs: '123e4567-e89b-12d3-a456-426614174000',
memberIDs: '123e4567-e89b-12d3-a456-426614174000'
},
greaterThan: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
smallerThan: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
greaterOrEqual: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
smallerOrEqual: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
contains: {
id: ['123e4567-e89b-12d3-a456-426614174000'],
meta: {
createdBy: ['123e4567-e89b-12d3-a456-426614174000'],
updatedBy: ['123e4567-e89b-12d3-a456-426614174000']
},
external: {sourceID: ['example'], source: ['example']},
schoolID: ['123e4567-e89b-12d3-a456-426614174000'],
title: ['example'],
moderatorIDs: ['123e4567-e89b-12d3-a456-426614174000'],
memberIDs: ['123e4567-e89b-12d3-a456-426614174000']
},
notContains: {
id: ['123e4567-e89b-12d3-a456-426614174000'],
meta: {
createdBy: ['123e4567-e89b-12d3-a456-426614174000'],
updatedBy: ['123e4567-e89b-12d3-a456-426614174000']
},
external: {sourceID: ['example'], source: ['example']},
schoolID: ['123e4567-e89b-12d3-a456-426614174000'],
title: ['example'],
moderatorIDs: ['123e4567-e89b-12d3-a456-426614174000'],
memberIDs: ['123e4567-e89b-12d3-a456-426614174000']
},
like: {external: {sourceID: 'example', source: 'example'}, title: 'example'},
notLike: {external: {sourceID: 'example', source: 'example'}, title: 'example'},
null: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
types: true,
moderatorIDs: true,
memberIDs: true
},
notNull: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
types: true,
moderatorIDs: true,
memberIDs: true
},
orCondition: true
}
})
};
fetch('https://api.meitner.se/directory/v1/group/_search', 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.meitner.se/directory/v1/group/_search",
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([
'filter' => [
'equals' => [
'id' => '123e4567-e89b-12d3-a456-426614174000',
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'createdBy' => '123e4567-e89b-12d3-a456-426614174000',
'updatedAt' => '2024-01-15T10:30:00Z',
'updatedBy' => '123e4567-e89b-12d3-a456-426614174000'
],
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'schoolID' => '123e4567-e89b-12d3-a456-426614174000',
'title' => 'example',
'moderatorIDs' => '123e4567-e89b-12d3-a456-426614174000',
'memberIDs' => '123e4567-e89b-12d3-a456-426614174000'
],
'notEquals' => [
'id' => '123e4567-e89b-12d3-a456-426614174000',
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'createdBy' => '123e4567-e89b-12d3-a456-426614174000',
'updatedAt' => '2024-01-15T10:30:00Z',
'updatedBy' => '123e4567-e89b-12d3-a456-426614174000'
],
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'schoolID' => '123e4567-e89b-12d3-a456-426614174000',
'title' => 'example',
'moderatorIDs' => '123e4567-e89b-12d3-a456-426614174000',
'memberIDs' => '123e4567-e89b-12d3-a456-426614174000'
],
'greaterThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'smallerThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'greaterOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'smallerOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'contains' => [
'id' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'meta' => [
'createdBy' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'updatedBy' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'external' => [
'sourceID' => [
'example'
],
'source' => [
'example'
]
],
'schoolID' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'title' => [
'example'
],
'moderatorIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'memberIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'notContains' => [
'id' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'meta' => [
'createdBy' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'updatedBy' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'external' => [
'sourceID' => [
'example'
],
'source' => [
'example'
]
],
'schoolID' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'title' => [
'example'
],
'moderatorIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'memberIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'like' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'title' => 'example'
],
'notLike' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'title' => 'example'
],
'null' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'types' => true,
'moderatorIDs' => true,
'memberIDs' => true
],
'notNull' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'types' => true,
'moderatorIDs' => true,
'memberIDs' => true
],
'orCondition' => true
]
]),
CURLOPT_HTTPHEADER => [
"Client-ID: <api-key>",
"Client-Secret: <api-key>",
"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.meitner.se/directory/v1/group/_search"
payload := strings.NewReader("{\n \"filter\": {\n \"equals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"notEquals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"contains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"notContains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"null\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"notNull\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"orCondition\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Client-ID", "<api-key>")
req.Header.Add("Client-Secret", "<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.meitner.se/directory/v1/group/_search")
.header("Client-ID", "<api-key>")
.header("Client-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"equals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"notEquals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"contains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"notContains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"null\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"notNull\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"orCondition\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meitner.se/directory/v1/group/_search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Client-ID"] = '<api-key>'
request["Client-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"equals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"notEquals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"contains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"notContains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"null\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"notNull\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"orCondition\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
"updatedAt": "2024-01-15T14:45:00Z",
"updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
},
"external": {
"sourceID": "12345678",
"source": "ExternalIntegrationAPI"
},
"schoolID": "123e4567-e89b-12d3-a456-426614174000",
"category": "Education",
"title": "1A",
"types": [
"Class"
],
"moderatorIDs": [
"123e4567-e89b-12d3-a456-426614174000"
],
"memberIDs": [
"123e4567-e89b-12d3-a456-426614174000"
]
}
],
"pagination": {
"offset": 0,
"limit": 1,
"total": 100
}
}{
"error": {
"code": "BadRequest",
"message": "The request contains invalid parameters or malformed data",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Forbidden",
"message": "You do not have permission to perform this operation",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NotFound",
"message": "The requested resource could not be found",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Conflict",
"message": "The request conflicts with the current state of the resource",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "UnprocessableEntity",
"message": "Validation failed for Group Search endpoint",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "RateLimited",
"message": "Too many requests - rate limit exceeded",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Internal",
"message": "An unexpected server error occurred",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}Group
Search Groups
Search for Groups with filtering capabilities.
POST
/
group
/
_search
Csharp (SDK)
using Meitner;
using Meitner.Models.Components;
using System;
using System.Collections.Generic;
var sdk = new MeitnerSDK(security: new Security() {
Option1 = new SecurityOption1() {
ClientCredentials = "<YOUR_API_KEY_HERE>",
ClientSecret = "<YOUR_API_KEY_HERE>",
},
});
Models.Requests.GroupSearchResponse? res = await sdk.Groups.SearchAsync(
groupSearch: new GroupSearchRequestBody() {
Filter = new GroupSearchFilter() {
Equals = new GroupSearchEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new GroupSearchEqualsMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
CreatedBy = "123e4567-e89b-12d3-a456-426614174000",
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedBy = "123e4567-e89b-12d3-a456-426614174000",
},
External = new GroupSearchEqualsExternal() {
SourceID = "example",
Source = "example",
},
SchoolID = "123e4567-e89b-12d3-a456-426614174000",
Title = "example",
ModeratorIDs = "123e4567-e89b-12d3-a456-426614174000",
MemberIDs = "123e4567-e89b-12d3-a456-426614174000",
},
NotEquals = new GroupSearchNotEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new GroupSearchNotEqualsMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
CreatedBy = "123e4567-e89b-12d3-a456-426614174000",
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedBy = "123e4567-e89b-12d3-a456-426614174000",
},
External = new GroupSearchNotEqualsExternal() {
SourceID = "example",
Source = "example",
},
SchoolID = "123e4567-e89b-12d3-a456-426614174000",
Title = "example",
ModeratorIDs = "123e4567-e89b-12d3-a456-426614174000",
MemberIDs = "123e4567-e89b-12d3-a456-426614174000",
},
GreaterThan = new GroupSearchGreaterThan() {
Meta = new GroupSearchGreaterThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
SmallerThan = new GroupSearchSmallerThan() {
Meta = new GroupSearchSmallerThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
GreaterOrEqual = new GroupSearchGreaterOrEqual() {
Meta = new GroupSearchGreaterOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
SmallerOrEqual = new GroupSearchSmallerOrEqual() {
Meta = new GroupSearchSmallerOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
},
Contains = new GroupSearchContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new GroupSearchContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new GroupSearchContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
SchoolID = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Title = new List<string>() {
"example",
},
ModeratorIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
MemberIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
NotContains = new GroupSearchNotContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new GroupSearchNotContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new GroupSearchNotContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
SchoolID = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Title = new List<string>() {
"example",
},
ModeratorIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
MemberIDs = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
Like = new GroupSearchLike() {
External = new GroupSearchLikeExternal() {
SourceID = "example",
Source = "example",
},
Title = "example",
},
NotLike = new GroupSearchNotLike() {
External = new GroupSearchNotLikeExternal() {
SourceID = "example",
Source = "example",
},
Title = "example",
},
Null = new GroupSearchNull() {
Meta = new GroupSearchNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new GroupSearchNullExternal() {
SourceID = true,
Source = true,
},
Types = true,
ModeratorIDs = true,
MemberIDs = true,
},
NotNull = new GroupSearchNotNull() {
Meta = new GroupSearchNotNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new GroupSearchNotNullExternal() {
SourceID = true,
Source = true,
},
Types = true,
ModeratorIDs = true,
MemberIDs = true,
},
OrCondition = true,
},
},
limit: 1,
offset: 0
);
while(res != null)
{
// handle items
res = await res.Next!();
}from meitner import Meitner, models
from meitner.utils import parse_datetime
import os
with Meitner(
security=models.Security(
option1=models.SecurityOption1(
client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
),
),
) as m_client:
res = m_client.groups.search(filter_={
"equals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_by": "123e4567-e89b-12d3-a456-426614174000",
},
"external": {
"source_id": "example",
"source": "example",
},
"school_id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderator_i_ds": "123e4567-e89b-12d3-a456-426614174000",
"member_i_ds": "123e4567-e89b-12d3-a456-426614174000",
},
"not_equals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_by": "123e4567-e89b-12d3-a456-426614174000",
},
"external": {
"source_id": "example",
"source": "example",
},
"school_id": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderator_i_ds": "123e4567-e89b-12d3-a456-426614174000",
"member_i_ds": "123e4567-e89b-12d3-a456-426614174000",
},
"greater_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"smaller_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"greater_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"smaller_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
},
"contains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"meta": {
"created_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
"updated_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"external": {
"source_id": [
"example",
],
"source": [
"example",
],
},
"school_id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"title": [
"example",
],
"moderator_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
"member_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"not_contains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"meta": {
"created_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
"updated_by": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"external": {
"source_id": [
"example",
],
"source": [
"example",
],
},
"school_id": [
"123e4567-e89b-12d3-a456-426614174000",
],
"title": [
"example",
],
"moderator_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
"member_i_ds": [
"123e4567-e89b-12d3-a456-426614174000",
],
},
"like": {
"external": {
"source_id": "example",
"source": "example",
},
"title": "example",
},
"not_like": {
"external": {
"source_id": "example",
"source": "example",
},
"title": "example",
},
"null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"types": True,
"moderator_i_ds": True,
"member_i_ds": True,
},
"not_null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"types": True,
"moderator_i_ds": True,
"member_i_ds": True,
},
"or_condition": True,
}, limit=1, offset=0)
while res is not None:
# Handle items
res = res.next()curl --request POST \
--url https://api.meitner.se/directory/v1/group/_search \
--header 'Client-ID: <api-key>' \
--header 'Client-Secret: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"equals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "123e4567-e89b-12d3-a456-426614174000",
"updatedAt": "2024-01-15T10:30:00Z",
"updatedBy": "123e4567-e89b-12d3-a456-426614174000"
},
"external": {
"sourceID": "example",
"source": "example"
},
"schoolID": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderatorIDs": "123e4567-e89b-12d3-a456-426614174000",
"memberIDs": "123e4567-e89b-12d3-a456-426614174000"
},
"notEquals": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "123e4567-e89b-12d3-a456-426614174000",
"updatedAt": "2024-01-15T10:30:00Z",
"updatedBy": "123e4567-e89b-12d3-a456-426614174000"
},
"external": {
"sourceID": "example",
"source": "example"
},
"schoolID": "123e4567-e89b-12d3-a456-426614174000",
"title": "example",
"moderatorIDs": "123e4567-e89b-12d3-a456-426614174000",
"memberIDs": "123e4567-e89b-12d3-a456-426614174000"
},
"greaterThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"smallerThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"greaterOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"smallerOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
},
"contains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000"
],
"meta": {
"createdBy": [
"123e4567-e89b-12d3-a456-426614174000"
],
"updatedBy": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"external": {
"sourceID": [
"example"
],
"source": [
"example"
]
},
"schoolID": [
"123e4567-e89b-12d3-a456-426614174000"
],
"title": [
"example"
],
"moderatorIDs": [
"123e4567-e89b-12d3-a456-426614174000"
],
"memberIDs": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"notContains": {
"id": [
"123e4567-e89b-12d3-a456-426614174000"
],
"meta": {
"createdBy": [
"123e4567-e89b-12d3-a456-426614174000"
],
"updatedBy": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"external": {
"sourceID": [
"example"
],
"source": [
"example"
]
},
"schoolID": [
"123e4567-e89b-12d3-a456-426614174000"
],
"title": [
"example"
],
"moderatorIDs": [
"123e4567-e89b-12d3-a456-426614174000"
],
"memberIDs": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"like": {
"external": {
"sourceID": "example",
"source": "example"
},
"title": "example"
},
"notLike": {
"external": {
"sourceID": "example",
"source": "example"
},
"title": "example"
},
"null": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"types": true,
"moderatorIDs": true,
"memberIDs": true
},
"notNull": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"types": true,
"moderatorIDs": true,
"memberIDs": true
},
"orCondition": true
}
}
'const options = {
method: 'POST',
headers: {
'Client-ID': '<api-key>',
'Client-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filter: {
equals: {
id: '123e4567-e89b-12d3-a456-426614174000',
meta: {
createdAt: '2024-01-15T10:30:00Z',
createdBy: '123e4567-e89b-12d3-a456-426614174000',
updatedAt: '2024-01-15T10:30:00Z',
updatedBy: '123e4567-e89b-12d3-a456-426614174000'
},
external: {sourceID: 'example', source: 'example'},
schoolID: '123e4567-e89b-12d3-a456-426614174000',
title: 'example',
moderatorIDs: '123e4567-e89b-12d3-a456-426614174000',
memberIDs: '123e4567-e89b-12d3-a456-426614174000'
},
notEquals: {
id: '123e4567-e89b-12d3-a456-426614174000',
meta: {
createdAt: '2024-01-15T10:30:00Z',
createdBy: '123e4567-e89b-12d3-a456-426614174000',
updatedAt: '2024-01-15T10:30:00Z',
updatedBy: '123e4567-e89b-12d3-a456-426614174000'
},
external: {sourceID: 'example', source: 'example'},
schoolID: '123e4567-e89b-12d3-a456-426614174000',
title: 'example',
moderatorIDs: '123e4567-e89b-12d3-a456-426614174000',
memberIDs: '123e4567-e89b-12d3-a456-426614174000'
},
greaterThan: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
smallerThan: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
greaterOrEqual: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
smallerOrEqual: {meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'}},
contains: {
id: ['123e4567-e89b-12d3-a456-426614174000'],
meta: {
createdBy: ['123e4567-e89b-12d3-a456-426614174000'],
updatedBy: ['123e4567-e89b-12d3-a456-426614174000']
},
external: {sourceID: ['example'], source: ['example']},
schoolID: ['123e4567-e89b-12d3-a456-426614174000'],
title: ['example'],
moderatorIDs: ['123e4567-e89b-12d3-a456-426614174000'],
memberIDs: ['123e4567-e89b-12d3-a456-426614174000']
},
notContains: {
id: ['123e4567-e89b-12d3-a456-426614174000'],
meta: {
createdBy: ['123e4567-e89b-12d3-a456-426614174000'],
updatedBy: ['123e4567-e89b-12d3-a456-426614174000']
},
external: {sourceID: ['example'], source: ['example']},
schoolID: ['123e4567-e89b-12d3-a456-426614174000'],
title: ['example'],
moderatorIDs: ['123e4567-e89b-12d3-a456-426614174000'],
memberIDs: ['123e4567-e89b-12d3-a456-426614174000']
},
like: {external: {sourceID: 'example', source: 'example'}, title: 'example'},
notLike: {external: {sourceID: 'example', source: 'example'}, title: 'example'},
null: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
types: true,
moderatorIDs: true,
memberIDs: true
},
notNull: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
types: true,
moderatorIDs: true,
memberIDs: true
},
orCondition: true
}
})
};
fetch('https://api.meitner.se/directory/v1/group/_search', 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.meitner.se/directory/v1/group/_search",
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([
'filter' => [
'equals' => [
'id' => '123e4567-e89b-12d3-a456-426614174000',
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'createdBy' => '123e4567-e89b-12d3-a456-426614174000',
'updatedAt' => '2024-01-15T10:30:00Z',
'updatedBy' => '123e4567-e89b-12d3-a456-426614174000'
],
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'schoolID' => '123e4567-e89b-12d3-a456-426614174000',
'title' => 'example',
'moderatorIDs' => '123e4567-e89b-12d3-a456-426614174000',
'memberIDs' => '123e4567-e89b-12d3-a456-426614174000'
],
'notEquals' => [
'id' => '123e4567-e89b-12d3-a456-426614174000',
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'createdBy' => '123e4567-e89b-12d3-a456-426614174000',
'updatedAt' => '2024-01-15T10:30:00Z',
'updatedBy' => '123e4567-e89b-12d3-a456-426614174000'
],
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'schoolID' => '123e4567-e89b-12d3-a456-426614174000',
'title' => 'example',
'moderatorIDs' => '123e4567-e89b-12d3-a456-426614174000',
'memberIDs' => '123e4567-e89b-12d3-a456-426614174000'
],
'greaterThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'smallerThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'greaterOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'smallerOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
]
],
'contains' => [
'id' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'meta' => [
'createdBy' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'updatedBy' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'external' => [
'sourceID' => [
'example'
],
'source' => [
'example'
]
],
'schoolID' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'title' => [
'example'
],
'moderatorIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'memberIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'notContains' => [
'id' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'meta' => [
'createdBy' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'updatedBy' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'external' => [
'sourceID' => [
'example'
],
'source' => [
'example'
]
],
'schoolID' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'title' => [
'example'
],
'moderatorIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
],
'memberIDs' => [
'123e4567-e89b-12d3-a456-426614174000'
]
],
'like' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'title' => 'example'
],
'notLike' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'title' => 'example'
],
'null' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'types' => true,
'moderatorIDs' => true,
'memberIDs' => true
],
'notNull' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'types' => true,
'moderatorIDs' => true,
'memberIDs' => true
],
'orCondition' => true
]
]),
CURLOPT_HTTPHEADER => [
"Client-ID: <api-key>",
"Client-Secret: <api-key>",
"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.meitner.se/directory/v1/group/_search"
payload := strings.NewReader("{\n \"filter\": {\n \"equals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"notEquals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"contains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"notContains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"null\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"notNull\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"orCondition\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Client-ID", "<api-key>")
req.Header.Add("Client-Secret", "<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.meitner.se/directory/v1/group/_search")
.header("Client-ID", "<api-key>")
.header("Client-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"equals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"notEquals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"contains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"notContains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"null\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"notNull\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"orCondition\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meitner.se/directory/v1/group/_search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Client-ID"] = '<api-key>'
request["Client-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"equals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"notEquals\": {\n \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"createdBy\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\",\n \"updatedBy\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"schoolID\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"title\": \"example\",\n \"moderatorIDs\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"memberIDs\": \"123e4567-e89b-12d3-a456-426614174000\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n }\n },\n \"contains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"notContains\": {\n \"id\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"meta\": {\n \"createdBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"updatedBy\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"external\": {\n \"sourceID\": [\n \"example\"\n ],\n \"source\": [\n \"example\"\n ]\n },\n \"schoolID\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"title\": [\n \"example\"\n ],\n \"moderatorIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ],\n \"memberIDs\": [\n \"123e4567-e89b-12d3-a456-426614174000\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"title\": \"example\"\n },\n \"null\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"notNull\": {\n \"meta\": {\n \"createdBy\": true,\n \"updatedAt\": true,\n \"updatedBy\": true\n },\n \"external\": {\n \"sourceID\": true,\n \"source\": true\n },\n \"types\": true,\n \"moderatorIDs\": true,\n \"memberIDs\": true\n },\n \"orCondition\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
"updatedAt": "2024-01-15T14:45:00Z",
"updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
},
"external": {
"sourceID": "12345678",
"source": "ExternalIntegrationAPI"
},
"schoolID": "123e4567-e89b-12d3-a456-426614174000",
"category": "Education",
"title": "1A",
"types": [
"Class"
],
"moderatorIDs": [
"123e4567-e89b-12d3-a456-426614174000"
],
"memberIDs": [
"123e4567-e89b-12d3-a456-426614174000"
]
}
],
"pagination": {
"offset": 0,
"limit": 1,
"total": 100
}
}{
"error": {
"code": "BadRequest",
"message": "The request contains invalid parameters or malformed data",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Forbidden",
"message": "You do not have permission to perform this operation",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NotFound",
"message": "The requested resource could not be found",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Conflict",
"message": "The request conflicts with the current state of the resource",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "UnprocessableEntity",
"message": "Validation failed for Group Search endpoint",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "RateLimited",
"message": "Too many requests - rate limit exceeded",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "Internal",
"message": "An unexpected server error occurred",
"requestID": "550e8400-e29b-41d4-a716-446655440000"
}
}Authorizations
ClientCredentials & ClientSecretOAuth2
Query Parameters
The maximum number of Groups to return (default: 50) when searching Groups
Example:
1
The number of Groups to skip before starting to return results (default: 0) when searching Groups
Example:
0
Body
application/json
Request body
Filter criteria to search for specific records
Show child attributes
Show child attributes
Example:
{ "equals": { "id": "123e4567-e89b-12d3-a456-426614174000", "meta": { "createdAt": "2024-01-15T10:30:00Z", "createdBy": "123e4567-e89b-12d3-a456-426614174000", "updatedAt": "2024-01-15T10:30:00Z", "updatedBy": "123e4567-e89b-12d3-a456-426614174000" }, "external": { "sourceID": "example", "source": "example" }, "schoolID": "123e4567-e89b-12d3-a456-426614174000", "title": "example", "moderatorIDs": "123e4567-e89b-12d3-a456-426614174000", "memberIDs": "123e4567-e89b-12d3-a456-426614174000" }, "notEquals": { "id": "123e4567-e89b-12d3-a456-426614174000", "meta": { "createdAt": "2024-01-15T10:30:00Z", "createdBy": "123e4567-e89b-12d3-a456-426614174000", "updatedAt": "2024-01-15T10:30:00Z", "updatedBy": "123e4567-e89b-12d3-a456-426614174000" }, "external": { "sourceID": "example", "source": "example" }, "schoolID": "123e4567-e89b-12d3-a456-426614174000", "title": "example", "moderatorIDs": "123e4567-e89b-12d3-a456-426614174000", "memberIDs": "123e4567-e89b-12d3-a456-426614174000" }, "greaterThan": { "meta": { "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }, "smallerThan": { "meta": { "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }, "greaterOrEqual": { "meta": { "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }, "smallerOrEqual": { "meta": { "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } }, "contains": { "id": ["123e4567-e89b-12d3-a456-426614174000"], "meta": { "createdBy": ["123e4567-e89b-12d3-a456-426614174000"], "updatedBy": ["123e4567-e89b-12d3-a456-426614174000"] }, "external": { "sourceID": ["example"], "source": ["example"] }, "schoolID": ["123e4567-e89b-12d3-a456-426614174000"], "title": ["example"], "moderatorIDs": ["123e4567-e89b-12d3-a456-426614174000"], "memberIDs": ["123e4567-e89b-12d3-a456-426614174000"] }, "notContains": { "id": ["123e4567-e89b-12d3-a456-426614174000"], "meta": { "createdBy": ["123e4567-e89b-12d3-a456-426614174000"], "updatedBy": ["123e4567-e89b-12d3-a456-426614174000"] }, "external": { "sourceID": ["example"], "source": ["example"] }, "schoolID": ["123e4567-e89b-12d3-a456-426614174000"], "title": ["example"], "moderatorIDs": ["123e4567-e89b-12d3-a456-426614174000"], "memberIDs": ["123e4567-e89b-12d3-a456-426614174000"] }, "like": { "external": { "sourceID": "example", "source": "example" }, "title": "example" }, "notLike": { "external": { "sourceID": "example", "source": "example" }, "title": "example" }, "null": { "meta": { "createdBy": true, "updatedAt": true, "updatedBy": true }, "external": { "sourceID": true, "source": true }, "types": true, "moderatorIDs": true, "memberIDs": true }, "notNull": { "meta": { "createdBy": true, "updatedAt": true, "updatedBy": true }, "external": { "sourceID": true, "source": true }, "types": true, "moderatorIDs": true, "memberIDs": true }, "orCondition": true }
Response
Response for Group Search operation - returns filtered Group results
Array of Group objects
Show child attributes
Show child attributes
Example:
[ { "id": "123e4567-e89b-12d3-a456-426614174000", "meta": { "createdAt": "2024-01-15T10:30:00Z", "createdBy": "987fcdeb-51a2-43d1-b567-123456789abc", "updatedAt": "2024-01-15T14:45:00Z", "updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc" }, "external": { "sourceID": "12345678", "source": "ExternalIntegrationAPI" }, "schoolID": "123e4567-e89b-12d3-a456-426614174000", "category": "Education", "title": "1A", "types": ["Class"], "moderatorIDs": ["123e4567-e89b-12d3-a456-426614174000"], "memberIDs": ["123e4567-e89b-12d3-a456-426614174000"] } ]
Pagination information
Show child attributes
Show child attributes
Example:
{ "offset": 0, "limit": 1, "total": 100 }
⌘I