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.EmployeeSearchResponse? res = await sdk.Employees.SearchAsync(
employeeSearch: new EmployeeSearchRequestBody() {
Filter = new EmployeeSearchFilter() {
Equals = new EmployeeSearchEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new EmployeeSearchEqualsMeta() {
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 EmployeeSearchEqualsExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
IdentityTemporary = true,
FirstName = "example",
LastName = "example",
DateOfBirth = DateOnly.Parse("2024-01-15"),
Address = new EmployeeSearchEqualsAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
NotEquals = new EmployeeSearchNotEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new EmployeeSearchNotEqualsMeta() {
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 EmployeeSearchNotEqualsExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
IdentityTemporary = true,
FirstName = "example",
LastName = "example",
DateOfBirth = DateOnly.Parse("2024-01-15"),
Address = new EmployeeSearchNotEqualsAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
GreaterThan = new EmployeeSearchGreaterThan() {
Meta = new EmployeeSearchGreaterThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
SmallerThan = new EmployeeSearchSmallerThan() {
Meta = new EmployeeSearchSmallerThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
GreaterOrEqual = new EmployeeSearchGreaterOrEqual() {
Meta = new EmployeeSearchGreaterOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
SmallerOrEqual = new EmployeeSearchSmallerOrEqual() {
Meta = new EmployeeSearchSmallerOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
Contains = new EmployeeSearchContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new EmployeeSearchContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new EmployeeSearchContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
IdentityNumber = new List<string>() {
"example",
},
IdentityTemporary = new List<bool>() {
true,
},
FirstName = new List<string>() {
"example",
},
LastName = new List<string>() {
"example",
},
DateOfBirth = new List<DateOnly>() {
DateOnly.Parse("2024-01-15"),
},
Address = new EmployeeSearchContainsAddress() {
PostalAddress = new List<string>() {
"example",
},
PostalCode = new List<string>() {
"example",
},
PostalCity = new List<string>() {
"example",
},
CountryCode = new List<string>() {
"example",
},
MunicipalityCode = new List<string>() {
"example",
},
},
EmailAddress1 = new List<string>() {
"example",
},
EmailAddress2 = new List<string>() {
"example",
},
PhoneNumber1 = new List<string>() {
"example",
},
PhoneNumber2 = new List<string>() {
"example",
},
EduPersonPrincipalName = new List<string>() {
"example",
},
},
NotContains = new EmployeeSearchNotContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new EmployeeSearchNotContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new EmployeeSearchNotContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
IdentityNumber = new List<string>() {
"example",
},
IdentityTemporary = new List<bool>() {
true,
},
FirstName = new List<string>() {
"example",
},
LastName = new List<string>() {
"example",
},
DateOfBirth = new List<DateOnly>() {
DateOnly.Parse("2024-01-15"),
},
Address = new EmployeeSearchNotContainsAddress() {
PostalAddress = new List<string>() {
"example",
},
PostalCode = new List<string>() {
"example",
},
PostalCity = new List<string>() {
"example",
},
CountryCode = new List<string>() {
"example",
},
MunicipalityCode = new List<string>() {
"example",
},
},
EmailAddress1 = new List<string>() {
"example",
},
EmailAddress2 = new List<string>() {
"example",
},
PhoneNumber1 = new List<string>() {
"example",
},
PhoneNumber2 = new List<string>() {
"example",
},
EduPersonPrincipalName = new List<string>() {
"example",
},
},
Like = new EmployeeSearchLike() {
External = new EmployeeSearchLikeExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
FirstName = "example",
LastName = "example",
Address = new EmployeeSearchLikeAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
NotLike = new EmployeeSearchNotLike() {
External = new EmployeeSearchNotLikeExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
FirstName = "example",
LastName = "example",
Address = new EmployeeSearchNotLikeAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
Null = new EmployeeSearchNull() {
Meta = new EmployeeSearchNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new EmployeeSearchNullExternal() {
SourceID = true,
Source = true,
},
Gender = true,
DateOfBirth = true,
Address = new EmployeeSearchNullAddress() {
PostalAddress = true,
PostalCode = true,
PostalCity = true,
CountryCode = true,
MunicipalityCode = true,
},
EmailAddress1 = true,
EmailAddress2 = true,
PhoneNumber1 = true,
PhoneNumber2 = true,
EduPersonPrincipalName = true,
},
NotNull = new EmployeeSearchNotNull() {
Meta = new EmployeeSearchNotNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new EmployeeSearchNotNullExternal() {
SourceID = true,
Source = true,
},
Gender = true,
DateOfBirth = true,
Address = new EmployeeSearchNotNullAddress() {
PostalAddress = true,
PostalCode = true,
PostalCity = true,
CountryCode = true,
MunicipalityCode = true,
},
EmailAddress1 = true,
EmailAddress2 = true,
PhoneNumber1 = true,
PhoneNumber2 = true,
EduPersonPrincipalName = true,
},
OrCondition = true,
},
},
limit: 1,
offset: 0
);
while(res != null)
{
// handle items
res = await res.Next!();
}from datetime import date
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.employees.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",
},
"identity_number": "example",
"identity_temporary": True,
"first_name": "example",
"last_name": "example",
"date_of_birth": date.fromisoformat("2024-01-15"),
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"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",
},
"identity_number": "example",
"identity_temporary": True,
"first_name": "example",
"last_name": "example",
"date_of_birth": date.fromisoformat("2024-01-15"),
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"greater_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"smaller_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"greater_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"smaller_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"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",
],
},
"identity_number": [
"example",
],
"identity_temporary": [
True,
],
"first_name": [
"example",
],
"last_name": [
"example",
],
"date_of_birth": [
date.fromisoformat("2024-01-15"),
],
"address": {
"postal_address": [
"example",
],
"postal_code": [
"example",
],
"postal_city": [
"example",
],
"country_code": [
"example",
],
"municipality_code": [
"example",
],
},
"email_address1": [
"example",
],
"email_address2": [
"example",
],
"phone_number1": [
"example",
],
"phone_number2": [
"example",
],
"edu_person_principal_name": [
"example",
],
},
"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",
],
},
"identity_number": [
"example",
],
"identity_temporary": [
True,
],
"first_name": [
"example",
],
"last_name": [
"example",
],
"date_of_birth": [
date.fromisoformat("2024-01-15"),
],
"address": {
"postal_address": [
"example",
],
"postal_code": [
"example",
],
"postal_city": [
"example",
],
"country_code": [
"example",
],
"municipality_code": [
"example",
],
},
"email_address1": [
"example",
],
"email_address2": [
"example",
],
"phone_number1": [
"example",
],
"phone_number2": [
"example",
],
"edu_person_principal_name": [
"example",
],
},
"like": {
"external": {
"source_id": "example",
"source": "example",
},
"identity_number": "example",
"first_name": "example",
"last_name": "example",
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"not_like": {
"external": {
"source_id": "example",
"source": "example",
},
"identity_number": "example",
"first_name": "example",
"last_name": "example",
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"gender": True,
"date_of_birth": True,
"address": {
"postal_address": True,
"postal_code": True,
"postal_city": True,
"country_code": True,
"municipality_code": True,
},
"email_address1": True,
"email_address2": True,
"phone_number1": True,
"phone_number2": True,
"edu_person_principal_name": True,
},
"not_null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"gender": True,
"date_of_birth": True,
"address": {
"postal_address": True,
"postal_code": True,
"postal_city": True,
"country_code": True,
"municipality_code": True,
},
"email_address1": True,
"email_address2": True,
"phone_number1": True,
"phone_number2": True,
"edu_person_principal_name": 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/employee/_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"
},
"identityNumber": "example",
"identityTemporary": true,
"firstName": "example",
"lastName": "example",
"dateOfBirth": "2024-01-15",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"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"
},
"identityNumber": "example",
"identityTemporary": true,
"firstName": "example",
"lastName": "example",
"dateOfBirth": "2024-01-15",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"greaterThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"smallerThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"greaterOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"smallerOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"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"
]
},
"identityNumber": [
"example"
],
"identityTemporary": [
true
],
"firstName": [
"example"
],
"lastName": [
"example"
],
"dateOfBirth": [
"2024-01-15"
],
"address": {
"postalAddress": [
"example"
],
"postalCode": [
"example"
],
"postalCity": [
"example"
],
"countryCode": [
"example"
],
"municipalityCode": [
"example"
]
},
"emailAddress1": [
"example"
],
"emailAddress2": [
"example"
],
"phoneNumber1": [
"example"
],
"phoneNumber2": [
"example"
],
"eduPersonPrincipalName": [
"example"
]
},
"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"
]
},
"identityNumber": [
"example"
],
"identityTemporary": [
true
],
"firstName": [
"example"
],
"lastName": [
"example"
],
"dateOfBirth": [
"2024-01-15"
],
"address": {
"postalAddress": [
"example"
],
"postalCode": [
"example"
],
"postalCity": [
"example"
],
"countryCode": [
"example"
],
"municipalityCode": [
"example"
]
},
"emailAddress1": [
"example"
],
"emailAddress2": [
"example"
],
"phoneNumber1": [
"example"
],
"phoneNumber2": [
"example"
],
"eduPersonPrincipalName": [
"example"
]
},
"like": {
"external": {
"sourceID": "example",
"source": "example"
},
"identityNumber": "example",
"firstName": "example",
"lastName": "example",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"notLike": {
"external": {
"sourceID": "example",
"source": "example"
},
"identityNumber": "example",
"firstName": "example",
"lastName": "example",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"null": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"gender": true,
"dateOfBirth": true,
"address": {
"postalAddress": true,
"postalCode": true,
"postalCity": true,
"countryCode": true,
"municipalityCode": true
},
"emailAddress1": true,
"emailAddress2": true,
"phoneNumber1": true,
"phoneNumber2": true,
"eduPersonPrincipalName": true
},
"notNull": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"gender": true,
"dateOfBirth": true,
"address": {
"postalAddress": true,
"postalCode": true,
"postalCity": true,
"countryCode": true,
"municipalityCode": true
},
"emailAddress1": true,
"emailAddress2": true,
"phoneNumber1": true,
"phoneNumber2": true,
"eduPersonPrincipalName": 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'},
identityNumber: 'example',
identityTemporary: true,
firstName: 'example',
lastName: 'example',
dateOfBirth: '2024-01-15',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
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'},
identityNumber: 'example',
identityTemporary: true,
firstName: 'example',
lastName: 'example',
dateOfBirth: '2024-01-15',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
greaterThan: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
smallerThan: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
greaterOrEqual: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
smallerOrEqual: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
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']},
identityNumber: ['example'],
identityTemporary: [true],
firstName: ['example'],
lastName: ['example'],
dateOfBirth: ['2024-01-15'],
address: {
postalAddress: ['example'],
postalCode: ['example'],
postalCity: ['example'],
countryCode: ['example'],
municipalityCode: ['example']
},
emailAddress1: ['example'],
emailAddress2: ['example'],
phoneNumber1: ['example'],
phoneNumber2: ['example'],
eduPersonPrincipalName: ['example']
},
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']},
identityNumber: ['example'],
identityTemporary: [true],
firstName: ['example'],
lastName: ['example'],
dateOfBirth: ['2024-01-15'],
address: {
postalAddress: ['example'],
postalCode: ['example'],
postalCity: ['example'],
countryCode: ['example'],
municipalityCode: ['example']
},
emailAddress1: ['example'],
emailAddress2: ['example'],
phoneNumber1: ['example'],
phoneNumber2: ['example'],
eduPersonPrincipalName: ['example']
},
like: {
external: {sourceID: 'example', source: 'example'},
identityNumber: 'example',
firstName: 'example',
lastName: 'example',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
notLike: {
external: {sourceID: 'example', source: 'example'},
identityNumber: 'example',
firstName: 'example',
lastName: 'example',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
null: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
gender: true,
dateOfBirth: true,
address: {
postalAddress: true,
postalCode: true,
postalCity: true,
countryCode: true,
municipalityCode: true
},
emailAddress1: true,
emailAddress2: true,
phoneNumber1: true,
phoneNumber2: true,
eduPersonPrincipalName: true
},
notNull: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
gender: true,
dateOfBirth: true,
address: {
postalAddress: true,
postalCode: true,
postalCity: true,
countryCode: true,
municipalityCode: true
},
emailAddress1: true,
emailAddress2: true,
phoneNumber1: true,
phoneNumber2: true,
eduPersonPrincipalName: true
},
orCondition: true
}
})
};
fetch('https://api.meitner.se/directory/v1/employee/_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/employee/_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'
],
'identityNumber' => 'example',
'identityTemporary' => true,
'firstName' => 'example',
'lastName' => 'example',
'dateOfBirth' => '2024-01-15',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'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'
],
'identityNumber' => 'example',
'identityTemporary' => true,
'firstName' => 'example',
'lastName' => 'example',
'dateOfBirth' => '2024-01-15',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'greaterThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'smallerThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'greaterOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'smallerOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'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'
]
],
'identityNumber' => [
'example'
],
'identityTemporary' => [
true
],
'firstName' => [
'example'
],
'lastName' => [
'example'
],
'dateOfBirth' => [
'2024-01-15'
],
'address' => [
'postalAddress' => [
'example'
],
'postalCode' => [
'example'
],
'postalCity' => [
'example'
],
'countryCode' => [
'example'
],
'municipalityCode' => [
'example'
]
],
'emailAddress1' => [
'example'
],
'emailAddress2' => [
'example'
],
'phoneNumber1' => [
'example'
],
'phoneNumber2' => [
'example'
],
'eduPersonPrincipalName' => [
'example'
]
],
'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'
]
],
'identityNumber' => [
'example'
],
'identityTemporary' => [
true
],
'firstName' => [
'example'
],
'lastName' => [
'example'
],
'dateOfBirth' => [
'2024-01-15'
],
'address' => [
'postalAddress' => [
'example'
],
'postalCode' => [
'example'
],
'postalCity' => [
'example'
],
'countryCode' => [
'example'
],
'municipalityCode' => [
'example'
]
],
'emailAddress1' => [
'example'
],
'emailAddress2' => [
'example'
],
'phoneNumber1' => [
'example'
],
'phoneNumber2' => [
'example'
],
'eduPersonPrincipalName' => [
'example'
]
],
'like' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'identityNumber' => 'example',
'firstName' => 'example',
'lastName' => 'example',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'notLike' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'identityNumber' => 'example',
'firstName' => 'example',
'lastName' => 'example',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'null' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'gender' => true,
'dateOfBirth' => true,
'address' => [
'postalAddress' => true,
'postalCode' => true,
'postalCity' => true,
'countryCode' => true,
'municipalityCode' => true
],
'emailAddress1' => true,
'emailAddress2' => true,
'phoneNumber1' => true,
'phoneNumber2' => true,
'eduPersonPrincipalName' => true
],
'notNull' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'gender' => true,
'dateOfBirth' => true,
'address' => [
'postalAddress' => true,
'postalCode' => true,
'postalCity' => true,
'countryCode' => true,
'municipalityCode' => true
],
'emailAddress1' => true,
'emailAddress2' => true,
'phoneNumber1' => true,
'phoneNumber2' => true,
'eduPersonPrincipalName' => 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/employee/_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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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/employee/_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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": true\n },\n \"orCondition\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meitner.se/directory/v1/employee/_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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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"
},
"gender": "Female",
"identityNumber": "20191216-1234",
"identityTemporary": true,
"firstName": "Lise",
"lastName": "Meitner",
"dateOfBirth": "2019-12-16",
"address": {
"postalAddress": "Dalvägen 14",
"postalCode": "169 56",
"postalCity": "Solna",
"countryCode": "SWE",
"municipalityCode": "0184"
},
"emailAddress1": "lise@meitner.se",
"emailAddress2": "lise@gmail.com",
"phoneNumber1": "+46701234567",
"phoneNumber2": "+46701234567",
"eduPersonPrincipalName": "kalko@edu.goteborg.se"
}
],
"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 Employee 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"
}
}Employee
Search Employees
Search for Employees with filtering capabilities.
POST
/
employee
/
_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.EmployeeSearchResponse? res = await sdk.Employees.SearchAsync(
employeeSearch: new EmployeeSearchRequestBody() {
Filter = new EmployeeSearchFilter() {
Equals = new EmployeeSearchEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new EmployeeSearchEqualsMeta() {
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 EmployeeSearchEqualsExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
IdentityTemporary = true,
FirstName = "example",
LastName = "example",
DateOfBirth = DateOnly.Parse("2024-01-15"),
Address = new EmployeeSearchEqualsAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
NotEquals = new EmployeeSearchNotEquals() {
Id = "123e4567-e89b-12d3-a456-426614174000",
Meta = new EmployeeSearchNotEqualsMeta() {
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 EmployeeSearchNotEqualsExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
IdentityTemporary = true,
FirstName = "example",
LastName = "example",
DateOfBirth = DateOnly.Parse("2024-01-15"),
Address = new EmployeeSearchNotEqualsAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
GreaterThan = new EmployeeSearchGreaterThan() {
Meta = new EmployeeSearchGreaterThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
SmallerThan = new EmployeeSearchSmallerThan() {
Meta = new EmployeeSearchSmallerThanMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
GreaterOrEqual = new EmployeeSearchGreaterOrEqual() {
Meta = new EmployeeSearchGreaterOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
SmallerOrEqual = new EmployeeSearchSmallerOrEqual() {
Meta = new EmployeeSearchSmallerOrEqualMeta() {
CreatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
UpdatedAt = System.DateTime.Parse("2024-01-15T10:30:00Z").ToUniversalTime(),
},
DateOfBirth = DateOnly.Parse("2024-01-15"),
},
Contains = new EmployeeSearchContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new EmployeeSearchContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new EmployeeSearchContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
IdentityNumber = new List<string>() {
"example",
},
IdentityTemporary = new List<bool>() {
true,
},
FirstName = new List<string>() {
"example",
},
LastName = new List<string>() {
"example",
},
DateOfBirth = new List<DateOnly>() {
DateOnly.Parse("2024-01-15"),
},
Address = new EmployeeSearchContainsAddress() {
PostalAddress = new List<string>() {
"example",
},
PostalCode = new List<string>() {
"example",
},
PostalCity = new List<string>() {
"example",
},
CountryCode = new List<string>() {
"example",
},
MunicipalityCode = new List<string>() {
"example",
},
},
EmailAddress1 = new List<string>() {
"example",
},
EmailAddress2 = new List<string>() {
"example",
},
PhoneNumber1 = new List<string>() {
"example",
},
PhoneNumber2 = new List<string>() {
"example",
},
EduPersonPrincipalName = new List<string>() {
"example",
},
},
NotContains = new EmployeeSearchNotContains() {
Id = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
Meta = new EmployeeSearchNotContainsMeta() {
CreatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
UpdatedBy = new List<string>() {
"123e4567-e89b-12d3-a456-426614174000",
},
},
External = new EmployeeSearchNotContainsExternal() {
SourceID = new List<string>() {
"example",
},
Source = new List<string>() {
"example",
},
},
IdentityNumber = new List<string>() {
"example",
},
IdentityTemporary = new List<bool>() {
true,
},
FirstName = new List<string>() {
"example",
},
LastName = new List<string>() {
"example",
},
DateOfBirth = new List<DateOnly>() {
DateOnly.Parse("2024-01-15"),
},
Address = new EmployeeSearchNotContainsAddress() {
PostalAddress = new List<string>() {
"example",
},
PostalCode = new List<string>() {
"example",
},
PostalCity = new List<string>() {
"example",
},
CountryCode = new List<string>() {
"example",
},
MunicipalityCode = new List<string>() {
"example",
},
},
EmailAddress1 = new List<string>() {
"example",
},
EmailAddress2 = new List<string>() {
"example",
},
PhoneNumber1 = new List<string>() {
"example",
},
PhoneNumber2 = new List<string>() {
"example",
},
EduPersonPrincipalName = new List<string>() {
"example",
},
},
Like = new EmployeeSearchLike() {
External = new EmployeeSearchLikeExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
FirstName = "example",
LastName = "example",
Address = new EmployeeSearchLikeAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
NotLike = new EmployeeSearchNotLike() {
External = new EmployeeSearchNotLikeExternal() {
SourceID = "example",
Source = "example",
},
IdentityNumber = "example",
FirstName = "example",
LastName = "example",
Address = new EmployeeSearchNotLikeAddress() {
PostalAddress = "example",
PostalCode = "example",
PostalCity = "example",
CountryCode = "example",
MunicipalityCode = "example",
},
EmailAddress1 = "example",
EmailAddress2 = "example",
PhoneNumber1 = "example",
PhoneNumber2 = "example",
EduPersonPrincipalName = "example",
},
Null = new EmployeeSearchNull() {
Meta = new EmployeeSearchNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new EmployeeSearchNullExternal() {
SourceID = true,
Source = true,
},
Gender = true,
DateOfBirth = true,
Address = new EmployeeSearchNullAddress() {
PostalAddress = true,
PostalCode = true,
PostalCity = true,
CountryCode = true,
MunicipalityCode = true,
},
EmailAddress1 = true,
EmailAddress2 = true,
PhoneNumber1 = true,
PhoneNumber2 = true,
EduPersonPrincipalName = true,
},
NotNull = new EmployeeSearchNotNull() {
Meta = new EmployeeSearchNotNullMeta() {
CreatedBy = true,
UpdatedAt = true,
UpdatedBy = true,
},
External = new EmployeeSearchNotNullExternal() {
SourceID = true,
Source = true,
},
Gender = true,
DateOfBirth = true,
Address = new EmployeeSearchNotNullAddress() {
PostalAddress = true,
PostalCode = true,
PostalCity = true,
CountryCode = true,
MunicipalityCode = true,
},
EmailAddress1 = true,
EmailAddress2 = true,
PhoneNumber1 = true,
PhoneNumber2 = true,
EduPersonPrincipalName = true,
},
OrCondition = true,
},
},
limit: 1,
offset: 0
);
while(res != null)
{
// handle items
res = await res.Next!();
}from datetime import date
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.employees.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",
},
"identity_number": "example",
"identity_temporary": True,
"first_name": "example",
"last_name": "example",
"date_of_birth": date.fromisoformat("2024-01-15"),
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"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",
},
"identity_number": "example",
"identity_temporary": True,
"first_name": "example",
"last_name": "example",
"date_of_birth": date.fromisoformat("2024-01-15"),
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"greater_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"smaller_than": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"greater_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"smaller_or_equal": {
"meta": {
"created_at": parse_datetime("2024-01-15T10:30:00Z"),
"updated_at": parse_datetime("2024-01-15T10:30:00Z"),
},
"date_of_birth": date.fromisoformat("2024-01-15"),
},
"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",
],
},
"identity_number": [
"example",
],
"identity_temporary": [
True,
],
"first_name": [
"example",
],
"last_name": [
"example",
],
"date_of_birth": [
date.fromisoformat("2024-01-15"),
],
"address": {
"postal_address": [
"example",
],
"postal_code": [
"example",
],
"postal_city": [
"example",
],
"country_code": [
"example",
],
"municipality_code": [
"example",
],
},
"email_address1": [
"example",
],
"email_address2": [
"example",
],
"phone_number1": [
"example",
],
"phone_number2": [
"example",
],
"edu_person_principal_name": [
"example",
],
},
"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",
],
},
"identity_number": [
"example",
],
"identity_temporary": [
True,
],
"first_name": [
"example",
],
"last_name": [
"example",
],
"date_of_birth": [
date.fromisoformat("2024-01-15"),
],
"address": {
"postal_address": [
"example",
],
"postal_code": [
"example",
],
"postal_city": [
"example",
],
"country_code": [
"example",
],
"municipality_code": [
"example",
],
},
"email_address1": [
"example",
],
"email_address2": [
"example",
],
"phone_number1": [
"example",
],
"phone_number2": [
"example",
],
"edu_person_principal_name": [
"example",
],
},
"like": {
"external": {
"source_id": "example",
"source": "example",
},
"identity_number": "example",
"first_name": "example",
"last_name": "example",
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"not_like": {
"external": {
"source_id": "example",
"source": "example",
},
"identity_number": "example",
"first_name": "example",
"last_name": "example",
"address": {
"postal_address": "example",
"postal_code": "example",
"postal_city": "example",
"country_code": "example",
"municipality_code": "example",
},
"email_address1": "example",
"email_address2": "example",
"phone_number1": "example",
"phone_number2": "example",
"edu_person_principal_name": "example",
},
"null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"gender": True,
"date_of_birth": True,
"address": {
"postal_address": True,
"postal_code": True,
"postal_city": True,
"country_code": True,
"municipality_code": True,
},
"email_address1": True,
"email_address2": True,
"phone_number1": True,
"phone_number2": True,
"edu_person_principal_name": True,
},
"not_null": {
"meta": {
"created_by": True,
"updated_at": True,
"updated_by": True,
},
"external": {
"source_id": True,
"source": True,
},
"gender": True,
"date_of_birth": True,
"address": {
"postal_address": True,
"postal_code": True,
"postal_city": True,
"country_code": True,
"municipality_code": True,
},
"email_address1": True,
"email_address2": True,
"phone_number1": True,
"phone_number2": True,
"edu_person_principal_name": 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/employee/_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"
},
"identityNumber": "example",
"identityTemporary": true,
"firstName": "example",
"lastName": "example",
"dateOfBirth": "2024-01-15",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"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"
},
"identityNumber": "example",
"identityTemporary": true,
"firstName": "example",
"lastName": "example",
"dateOfBirth": "2024-01-15",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"greaterThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"smallerThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"greaterOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"smallerOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"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"
]
},
"identityNumber": [
"example"
],
"identityTemporary": [
true
],
"firstName": [
"example"
],
"lastName": [
"example"
],
"dateOfBirth": [
"2024-01-15"
],
"address": {
"postalAddress": [
"example"
],
"postalCode": [
"example"
],
"postalCity": [
"example"
],
"countryCode": [
"example"
],
"municipalityCode": [
"example"
]
},
"emailAddress1": [
"example"
],
"emailAddress2": [
"example"
],
"phoneNumber1": [
"example"
],
"phoneNumber2": [
"example"
],
"eduPersonPrincipalName": [
"example"
]
},
"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"
]
},
"identityNumber": [
"example"
],
"identityTemporary": [
true
],
"firstName": [
"example"
],
"lastName": [
"example"
],
"dateOfBirth": [
"2024-01-15"
],
"address": {
"postalAddress": [
"example"
],
"postalCode": [
"example"
],
"postalCity": [
"example"
],
"countryCode": [
"example"
],
"municipalityCode": [
"example"
]
},
"emailAddress1": [
"example"
],
"emailAddress2": [
"example"
],
"phoneNumber1": [
"example"
],
"phoneNumber2": [
"example"
],
"eduPersonPrincipalName": [
"example"
]
},
"like": {
"external": {
"sourceID": "example",
"source": "example"
},
"identityNumber": "example",
"firstName": "example",
"lastName": "example",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"notLike": {
"external": {
"sourceID": "example",
"source": "example"
},
"identityNumber": "example",
"firstName": "example",
"lastName": "example",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"null": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"gender": true,
"dateOfBirth": true,
"address": {
"postalAddress": true,
"postalCode": true,
"postalCity": true,
"countryCode": true,
"municipalityCode": true
},
"emailAddress1": true,
"emailAddress2": true,
"phoneNumber1": true,
"phoneNumber2": true,
"eduPersonPrincipalName": true
},
"notNull": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": {
"sourceID": true,
"source": true
},
"gender": true,
"dateOfBirth": true,
"address": {
"postalAddress": true,
"postalCode": true,
"postalCity": true,
"countryCode": true,
"municipalityCode": true
},
"emailAddress1": true,
"emailAddress2": true,
"phoneNumber1": true,
"phoneNumber2": true,
"eduPersonPrincipalName": 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'},
identityNumber: 'example',
identityTemporary: true,
firstName: 'example',
lastName: 'example',
dateOfBirth: '2024-01-15',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
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'},
identityNumber: 'example',
identityTemporary: true,
firstName: 'example',
lastName: 'example',
dateOfBirth: '2024-01-15',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
greaterThan: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
smallerThan: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
greaterOrEqual: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
smallerOrEqual: {
meta: {createdAt: '2024-01-15T10:30:00Z', updatedAt: '2024-01-15T10:30:00Z'},
dateOfBirth: '2024-01-15'
},
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']},
identityNumber: ['example'],
identityTemporary: [true],
firstName: ['example'],
lastName: ['example'],
dateOfBirth: ['2024-01-15'],
address: {
postalAddress: ['example'],
postalCode: ['example'],
postalCity: ['example'],
countryCode: ['example'],
municipalityCode: ['example']
},
emailAddress1: ['example'],
emailAddress2: ['example'],
phoneNumber1: ['example'],
phoneNumber2: ['example'],
eduPersonPrincipalName: ['example']
},
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']},
identityNumber: ['example'],
identityTemporary: [true],
firstName: ['example'],
lastName: ['example'],
dateOfBirth: ['2024-01-15'],
address: {
postalAddress: ['example'],
postalCode: ['example'],
postalCity: ['example'],
countryCode: ['example'],
municipalityCode: ['example']
},
emailAddress1: ['example'],
emailAddress2: ['example'],
phoneNumber1: ['example'],
phoneNumber2: ['example'],
eduPersonPrincipalName: ['example']
},
like: {
external: {sourceID: 'example', source: 'example'},
identityNumber: 'example',
firstName: 'example',
lastName: 'example',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
notLike: {
external: {sourceID: 'example', source: 'example'},
identityNumber: 'example',
firstName: 'example',
lastName: 'example',
address: {
postalAddress: 'example',
postalCode: 'example',
postalCity: 'example',
countryCode: 'example',
municipalityCode: 'example'
},
emailAddress1: 'example',
emailAddress2: 'example',
phoneNumber1: 'example',
phoneNumber2: 'example',
eduPersonPrincipalName: 'example'
},
null: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
gender: true,
dateOfBirth: true,
address: {
postalAddress: true,
postalCode: true,
postalCity: true,
countryCode: true,
municipalityCode: true
},
emailAddress1: true,
emailAddress2: true,
phoneNumber1: true,
phoneNumber2: true,
eduPersonPrincipalName: true
},
notNull: {
meta: {createdBy: true, updatedAt: true, updatedBy: true},
external: {sourceID: true, source: true},
gender: true,
dateOfBirth: true,
address: {
postalAddress: true,
postalCode: true,
postalCity: true,
countryCode: true,
municipalityCode: true
},
emailAddress1: true,
emailAddress2: true,
phoneNumber1: true,
phoneNumber2: true,
eduPersonPrincipalName: true
},
orCondition: true
}
})
};
fetch('https://api.meitner.se/directory/v1/employee/_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/employee/_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'
],
'identityNumber' => 'example',
'identityTemporary' => true,
'firstName' => 'example',
'lastName' => 'example',
'dateOfBirth' => '2024-01-15',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'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'
],
'identityNumber' => 'example',
'identityTemporary' => true,
'firstName' => 'example',
'lastName' => 'example',
'dateOfBirth' => '2024-01-15',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'greaterThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'smallerThan' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'greaterOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'smallerOrEqual' => [
'meta' => [
'createdAt' => '2024-01-15T10:30:00Z',
'updatedAt' => '2024-01-15T10:30:00Z'
],
'dateOfBirth' => '2024-01-15'
],
'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'
]
],
'identityNumber' => [
'example'
],
'identityTemporary' => [
true
],
'firstName' => [
'example'
],
'lastName' => [
'example'
],
'dateOfBirth' => [
'2024-01-15'
],
'address' => [
'postalAddress' => [
'example'
],
'postalCode' => [
'example'
],
'postalCity' => [
'example'
],
'countryCode' => [
'example'
],
'municipalityCode' => [
'example'
]
],
'emailAddress1' => [
'example'
],
'emailAddress2' => [
'example'
],
'phoneNumber1' => [
'example'
],
'phoneNumber2' => [
'example'
],
'eduPersonPrincipalName' => [
'example'
]
],
'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'
]
],
'identityNumber' => [
'example'
],
'identityTemporary' => [
true
],
'firstName' => [
'example'
],
'lastName' => [
'example'
],
'dateOfBirth' => [
'2024-01-15'
],
'address' => [
'postalAddress' => [
'example'
],
'postalCode' => [
'example'
],
'postalCity' => [
'example'
],
'countryCode' => [
'example'
],
'municipalityCode' => [
'example'
]
],
'emailAddress1' => [
'example'
],
'emailAddress2' => [
'example'
],
'phoneNumber1' => [
'example'
],
'phoneNumber2' => [
'example'
],
'eduPersonPrincipalName' => [
'example'
]
],
'like' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'identityNumber' => 'example',
'firstName' => 'example',
'lastName' => 'example',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'notLike' => [
'external' => [
'sourceID' => 'example',
'source' => 'example'
],
'identityNumber' => 'example',
'firstName' => 'example',
'lastName' => 'example',
'address' => [
'postalAddress' => 'example',
'postalCode' => 'example',
'postalCity' => 'example',
'countryCode' => 'example',
'municipalityCode' => 'example'
],
'emailAddress1' => 'example',
'emailAddress2' => 'example',
'phoneNumber1' => 'example',
'phoneNumber2' => 'example',
'eduPersonPrincipalName' => 'example'
],
'null' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'gender' => true,
'dateOfBirth' => true,
'address' => [
'postalAddress' => true,
'postalCode' => true,
'postalCity' => true,
'countryCode' => true,
'municipalityCode' => true
],
'emailAddress1' => true,
'emailAddress2' => true,
'phoneNumber1' => true,
'phoneNumber2' => true,
'eduPersonPrincipalName' => true
],
'notNull' => [
'meta' => [
'createdBy' => true,
'updatedAt' => true,
'updatedBy' => true
],
'external' => [
'sourceID' => true,
'source' => true
],
'gender' => true,
'dateOfBirth' => true,
'address' => [
'postalAddress' => true,
'postalCode' => true,
'postalCity' => true,
'countryCode' => true,
'municipalityCode' => true
],
'emailAddress1' => true,
'emailAddress2' => true,
'phoneNumber1' => true,
'phoneNumber2' => true,
'eduPersonPrincipalName' => 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/employee/_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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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/employee/_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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": true\n },\n \"orCondition\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meitner.se/directory/v1/employee/_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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\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 \"identityNumber\": \"example\",\n \"identityTemporary\": true,\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"dateOfBirth\": \"2024-01-15\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"greaterThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerThan\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"greaterOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\n },\n \"smallerOrEqual\": {\n \"meta\": {\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:00Z\"\n },\n \"dateOfBirth\": \"2024-01-15\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\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 \"identityNumber\": [\n \"example\"\n ],\n \"identityTemporary\": [\n true\n ],\n \"firstName\": [\n \"example\"\n ],\n \"lastName\": [\n \"example\"\n ],\n \"dateOfBirth\": [\n \"2024-01-15\"\n ],\n \"address\": {\n \"postalAddress\": [\n \"example\"\n ],\n \"postalCode\": [\n \"example\"\n ],\n \"postalCity\": [\n \"example\"\n ],\n \"countryCode\": [\n \"example\"\n ],\n \"municipalityCode\": [\n \"example\"\n ]\n },\n \"emailAddress1\": [\n \"example\"\n ],\n \"emailAddress2\": [\n \"example\"\n ],\n \"phoneNumber1\": [\n \"example\"\n ],\n \"phoneNumber2\": [\n \"example\"\n ],\n \"eduPersonPrincipalName\": [\n \"example\"\n ]\n },\n \"like\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"example\"\n },\n \"notLike\": {\n \"external\": {\n \"sourceID\": \"example\",\n \"source\": \"example\"\n },\n \"identityNumber\": \"example\",\n \"firstName\": \"example\",\n \"lastName\": \"example\",\n \"address\": {\n \"postalAddress\": \"example\",\n \"postalCode\": \"example\",\n \"postalCity\": \"example\",\n \"countryCode\": \"example\",\n \"municipalityCode\": \"example\"\n },\n \"emailAddress1\": \"example\",\n \"emailAddress2\": \"example\",\n \"phoneNumber1\": \"example\",\n \"phoneNumber2\": \"example\",\n \"eduPersonPrincipalName\": \"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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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 \"gender\": true,\n \"dateOfBirth\": true,\n \"address\": {\n \"postalAddress\": true,\n \"postalCode\": true,\n \"postalCity\": true,\n \"countryCode\": true,\n \"municipalityCode\": true\n },\n \"emailAddress1\": true,\n \"emailAddress2\": true,\n \"phoneNumber1\": true,\n \"phoneNumber2\": true,\n \"eduPersonPrincipalName\": 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"
},
"gender": "Female",
"identityNumber": "20191216-1234",
"identityTemporary": true,
"firstName": "Lise",
"lastName": "Meitner",
"dateOfBirth": "2019-12-16",
"address": {
"postalAddress": "Dalvägen 14",
"postalCode": "169 56",
"postalCity": "Solna",
"countryCode": "SWE",
"municipalityCode": "0184"
},
"emailAddress1": "lise@meitner.se",
"emailAddress2": "lise@gmail.com",
"phoneNumber1": "+46701234567",
"phoneNumber2": "+46701234567",
"eduPersonPrincipalName": "kalko@edu.goteborg.se"
}
],
"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 Employee 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 Employees to return (default: 50) when searching Employees
Example:
1
The number of Employees to skip before starting to return results (default: 0) when searching Employees
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"
},
"identityNumber": "example",
"identityTemporary": true,
"firstName": "example",
"lastName": "example",
"dateOfBirth": "2024-01-15",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"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"
},
"identityNumber": "example",
"identityTemporary": true,
"firstName": "example",
"lastName": "example",
"dateOfBirth": "2024-01-15",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"greaterThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"smallerThan": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"greaterOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"smallerOrEqual": {
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
"dateOfBirth": "2024-01-15"
},
"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"]
},
"identityNumber": ["example"],
"identityTemporary": [true],
"firstName": ["example"],
"lastName": ["example"],
"dateOfBirth": ["2024-01-15"],
"address": {
"postalAddress": ["example"],
"postalCode": ["example"],
"postalCity": ["example"],
"countryCode": ["example"],
"municipalityCode": ["example"]
},
"emailAddress1": ["example"],
"emailAddress2": ["example"],
"phoneNumber1": ["example"],
"phoneNumber2": ["example"],
"eduPersonPrincipalName": ["example"]
},
"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"]
},
"identityNumber": ["example"],
"identityTemporary": [true],
"firstName": ["example"],
"lastName": ["example"],
"dateOfBirth": ["2024-01-15"],
"address": {
"postalAddress": ["example"],
"postalCode": ["example"],
"postalCity": ["example"],
"countryCode": ["example"],
"municipalityCode": ["example"]
},
"emailAddress1": ["example"],
"emailAddress2": ["example"],
"phoneNumber1": ["example"],
"phoneNumber2": ["example"],
"eduPersonPrincipalName": ["example"]
},
"like": {
"external": {
"sourceID": "example",
"source": "example"
},
"identityNumber": "example",
"firstName": "example",
"lastName": "example",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"notLike": {
"external": {
"sourceID": "example",
"source": "example"
},
"identityNumber": "example",
"firstName": "example",
"lastName": "example",
"address": {
"postalAddress": "example",
"postalCode": "example",
"postalCity": "example",
"countryCode": "example",
"municipalityCode": "example"
},
"emailAddress1": "example",
"emailAddress2": "example",
"phoneNumber1": "example",
"phoneNumber2": "example",
"eduPersonPrincipalName": "example"
},
"null": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": { "sourceID": true, "source": true },
"gender": true,
"dateOfBirth": true,
"address": {
"postalAddress": true,
"postalCode": true,
"postalCity": true,
"countryCode": true,
"municipalityCode": true
},
"emailAddress1": true,
"emailAddress2": true,
"phoneNumber1": true,
"phoneNumber2": true,
"eduPersonPrincipalName": true
},
"notNull": {
"meta": {
"createdBy": true,
"updatedAt": true,
"updatedBy": true
},
"external": { "sourceID": true, "source": true },
"gender": true,
"dateOfBirth": true,
"address": {
"postalAddress": true,
"postalCode": true,
"postalCity": true,
"countryCode": true,
"municipalityCode": true
},
"emailAddress1": true,
"emailAddress2": true,
"phoneNumber1": true,
"phoneNumber2": true,
"eduPersonPrincipalName": true
},
"orCondition": true
}
Response
Response for Employee Search operation - returns filtered Employee results
Array of Employee 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"
},
"gender": "Female",
"identityNumber": "20191216-1234",
"identityTemporary": true,
"firstName": "Lise",
"lastName": "Meitner",
"dateOfBirth": "2019-12-16",
"address": {
"postalAddress": "Dalvägen 14",
"postalCode": "169 56",
"postalCity": "Solna",
"countryCode": "SWE",
"municipalityCode": "0184"
},
"emailAddress1": "lise@meitner.se",
"emailAddress2": "lise@gmail.com",
"phoneNumber1": "+46701234567",
"phoneNumber2": "+46701234567",
"eduPersonPrincipalName": "kalko@edu.goteborg.se"
}
]
Pagination information
Show child attributes
Show child attributes
Example:
{ "offset": 0, "limit": 1, "total": 100 }
⌘I