Sample requests
This page contains third-party references. We strive for our content to always be up-to-date, however, the content referring to external vendors may change independently of Omada. If you spot any inconsistency, please report it to our Helpdesk.
Below you can find examples of requests made with OData API.
When submitting requests, pay special attention to the syntax supported by OData. For details, see OData Version 4.0. Part 2: URL Conventions, especially the Primitive literals section.
Find user with firstname John and lastname Doe
GET:
http://[Omada Identity server]/OData/DataObjects/User?$filter=FIRSTNAME eq 'John' and LASTNAME eq 'Doe'
{
"@odata.context": "http://localhost/OEREST/OData/DataObjects/$metadata#User",
"value": [
{
"Id": 1001247,
"UId": "776afc26-2ba9-488a-a74c-04663607bc4b",
"CreateTime": "2016-10-07T14:12:05.177+02:00",
"ChangeTime": "2016-10-07T14:12:05.25+02:00",
"DisplayName": "John Doe",
"UserName": "JDOE1",
"FIRSTNAME": "John",
"LASTNAME": "Doe",
"JOBTITLE": "Clerk",
"ADDRESS1": "",
"ADDRESS2": "",
"ZIPCODE": "",
"CITY": "",
"PHONE": "",
"CELLPHONE": "",
"EMAIL": "jd@acme.com ",
"OBJECTGUID": "JDOE1",
"ODWBUSIKEY": "1000_jdoe1<i/>",
"IDENTITYREF": {
"Id": 1001220,
"UId": null,
"KeyValue": null
}
}
]
}
Find user defined for a specific identity
Find the user by the identity Id:
GET:
http://[Omada Identity server]/OData/DataObjects/User?$filter=IDENTITYREF/Id eq 1001220
Find the user by the identity UId:
GET:
http://[Omada Identity server]/OData/DataObjects/User?$filter=IDENTITYREF/UId eq a9a51805-f5ca-4b06-bada-b8f38a3eb843
Result (in both cases):
{
"@odata.context": "http://localhost/OEREST/OData/DataObjects/$metadata#User",
"value": [
{
"Id": 1001247,
"UId": "776afc26-2ba9-488a-a74c-04663607bc4b",
"CreateTime": "2016-10-07T14:12:05.177+02:00",
"ChangeTime": "2016-10-07T14:12:05.25+02:00",
"DisplayName": "John Doe",
"UserName": "JDOE1",
"FIRSTNAME": "John",
"LASTNAME": "Doe",
"JOBTITLE": "Clerk",
"ADDRESS1": "",
"ADDRESS2": "",
"ZIPCODE": "",
"CITY": "",
"PHONE": "",
"CELLPHONE": "",
"EMAIL": "jd@acme.com ",
"OBJECTGUID": "JDOE1",
"ODWBUSIKEY": "1000_jdoe1<i/>",
"IDENTITYREF": {
"Id": 1001220,
"UId": null,
"KeyValue": null
}
}
]
}
Create a new identity
POST:
http://[Omada Identity server]/OData/DataObjects/Identity
{
"IDENTITYID": "JDOE1",
"FIRSTNAME": "John",
"LASTNAME": "Doe",
"EMAIL": "jd@acme.com",
"JOBTITLE": "Clerk",
"VALIDFROM": "2016-01-01T01:00:00+01:00",
"VALIDTO": "9999-12-31T01:00:00+01:00",
"OUREF": {
"Id": 1000054
},
"IDENTITYSTATUS": {
"UId": "a4ed4124-9b94-43a0-92c0-e71fba733049"
},
"IDENTITYCATEGORY": {
"Id": 561
},
"IDENTITYTYPE": {
"UId": "d13624f9-905d-4bc5-a6cc-2a4589c26be4"
}
}
Reference property values can be specified with either Ids or UIds (of the referred data objects). The same goes for set property values (Ids or UIds of set property values).
Update an identity
PUT:
http://[Omada Identity server]/OData/DataObjects/Identity(1001735)
{
"JOBTITLE": "Senior clerk",
"VALIDTO": "2025-12-31T01:00:00+01:00"
}
PUT operations on data object entities work in a PATCH-like manner – a PUT operation does not clear the values of non-present properties.
The value(s) of property on a data object entity can be cleared using a PUT operation by specifying a null value in the JSON payload.
Delete an identity
DELETE: http://[Omada Identity server]/OData/DataObjects/Identity(1001735)
Find identities that have been recently created, updated, or deleted
Here are the examples of how to query for the created, updated, and deleted data objects for the Identity DOT:
Created:
GET:
http://[Omada Identity server]/OData/DataObjects/Identity?$top=1000&$select=Id,DisplayName,CreateTime,ChangeTime&$filter=CreateTime gt 2023-06-17
Updated:
GET:
http://[Omada Identity server]/OData/DataObjects/Identity?$top=1000&$select=Id,DisplayName,CreateTime,ChangeTime,&$filter=ChangeTime gt 2023-06-1
Deleted:
GET:
http://[Omada Identity server]/OData/DataObjects/Identity?$top=100&$select=Id,DisplayName,CreateTime,ChangeTime,DeleteTime,Deleted&$filter=DeleteTime gt 2023-06-17&DeletedStatus=Deleted
Get definition of the Identity data object type including property bindings
GET:
http://[Omada Identity server]/OData/Builtin/DataObjectTypes(949)?$expand=PropertyBindings($expand=Property)
Result:
{
"@odata.context": "http://localhost/OEREST/OData/Builtin/$metadata#DataObjectTypes/$entity",
"Id": 949,
"UId": "ffd6b28c-fe61-4ddf-8c11-58bbf9a09e3a",
"SystemName": "Identity",
"Name": "Identities",
"NameSingular": "Identity",
"NameMultiLang": [
{
"LanguageId": 1000,
"Value": "Identities"
}
],
"NameSingularMultiLang": [
{
"LanguageId": 1000,
"Value": "Identity"
},
{
"LanguageId": 1001,
"Value": "Identitet"
}
],
"PropertyBindings": [
{
"Key": "Identity:IDENTITYID",
"System": true,
"Property": {
"@odata.type": "#Omada.OE.Web.OData.Model.ValueProperty",
"Id": 950,
"UId": "9b7ddcb8-7c09-47a5-8bfa-e2e4ffd377d3",
"SystemName": "IDENTITYID",
"PropertyType": "Value",
"ControlType": "TextBox",
"Name": "Identity ID",
"Description": " ",
"DataType": "Text",
"MaxLength": 0,
"CharCase": "AllUpper",
"HorzAlign": null,
"Multiline": false,
"HasLog": false,
"TimeSpanFormat": null,
"NumericFormat": null,
"NumericPrecision": null,
"DateTimeFormat": null,
"NameMultiLang": [
{
"LanguageId": 1000,
"Value": "Identity ID"
}
],
"DescriptionMultiLang": [
{
"LanguageId": 1000,
"Value": " "
}
],
"Validation": {
"RegEx": "",
"Description": ""
}
}
},
{
"Key": "Identity:FIRSTNAME",
"System": true,
"Property": {
"@odata.type": "#Omada.OE.Web.OData.Model.ValueProperty",
"Id": 909,
"UId": "4df77144-cb6b-489f-98ac-869fa64d3e7f",
"SystemName": "FIRSTNAME",
"PropertyType": "Value",
"ControlType": "TextBox",
"Name": "First name",
"Description": "First name description.",
"DataType": "Text",
"MaxLength": 20,
"CharCase": "Normal",
"HorzAlign": null,
"Multiline": false,
"HasLog": false,
"TimeSpanFormat": null,
"NumericFormat": null,
"NumericPrecision": null,
"DateTimeFormat": null,
"NameMultiLang": [
{
"LanguageId": 1000,
"Value": "First name"
},
{
"LanguageId": 1001,
"Value": "Fornavn"
}
]
}
/* … */
}
]
}
Get CalculatedAssignment using specific AssignmentKey
GET:
http://[Omada Identity server]/OData/BuiltIn/CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)
Result:
{
"@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments/$entity",
"AssignmentKey": "239b453a-47f4-4deb-b584-0758948beed2",
"AccountName": "MTAA",
"ValidFrom": "1999-12-28T23:00:00+01:00",
"ValidTo": "9999-12-31T22:59:59+01:00",
"LastChangedTime": "2019-05-26T19:30:22.4933333Z",
"Attributes": {
"ROLECATEGORY@odata.type": "#Collection(String)",
"ROLECATEGORY": [
"Permission"],
"RISKSCORE@odata.type": "#Collection(Int32)",
"RISKSCORE": [
1],
"VIOLATIONSTATUS@odata.type": "#Collection(String)",
"VIOLATIONSTATUS": [
"OK"],
"PROVISSTATUS@odata.type": "#Collection(String)",
"PROVISSTATUS": [
"OK"],
"COMPLIANCESTATUS@odata.type": "#Collection(String)",
"COMPLIANCESTATUS": [
"Not Approved"]
},
"Violations": [],
"Identity@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/Identity/$entity",
"Identity": {
"Id": 1006246,
"UId": "15aa3061-01c3-4b9c-aa33-0038ec2c91da",
"ObjectType": "Identity",
"DisplayName": "Thorsen, Marianne [MTAA]"
},
"Resource@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/Resource/$entity",
"Resource": {
"Id": 1007860,
"UId": "24efb073-2091-44ba-bc7a-977c9ec9c9ed",
"ObjectType": "Resource",
"DisplayName": "Post Inventory Difference (Esbjerg 1)"
},
"System@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/System/$entity",
"System": {
"Id": 1007304,
"UId": "102db93b-b2dc-4701-8095-c6c85688b60b",
"ObjectType": "System",
"DisplayName": "Active Directory"
},
"ResourceType@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/ResourceType/$entity",
"ResourceType": {
"Id": 1007306,
"UId": "18143be5-3859-4e53-8023-86a5f0036102",
"ObjectType": "ResourceType",
"DisplayName": "Security Group"
}
}
Select navigation properties on CalculatedAssignment
To select only navigation properties, the AssignmentKey property must always be included in the select while expanding the navigation property.
GET:
http://[Omada Identity server]/OData/BuiltIn/CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)?$select=AssignmentKey&$expand=Identity,Resource,ResourceType
Result:
{
"@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(AssignmentKey,Identity,Resource,ResourceType)/$entity",
"AssignmentKey": "239b453a-47f4-4deb-b584-0758948beed2",
"Identity@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/Identity/$entity",
"Identity": {
"Id": 1006246,
"UId": "15aa3061-01c3-4b9c-aa33-0038ec2c91da",
"ObjectType": "Identity",
"DisplayName": "Thorsen, Marianne [MTAA]"
},
"Resource@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/Resource/$entity",
"Resource": {
"Id": 1007860,
"UId": "24efb073-2091-44ba-bc7a-977c9ec9c9ed",
"ObjectType": "Resource",
"DisplayName": "Post Inventory Difference (Esbjerg 1)"
},
"ResourceType@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(239b453a-47f4-4deb-b584-0758948beed2)/ResourceType/$entity",
"ResourceType": {
"Id": 1007306,
"UId": "18143be5-3859-4e53-8023-86a5f0036102",
"ObjectType": "ResourceType",
"DisplayName": "Security Group"
}
}
Filter on Identity Id and Resource UId
GET:
http://[Omada Identity server]/OData/BuiltIn/CalculatedAssignments?$filter=Identity/Id eq 1006246 and Resource/UId eq 24efb073-2091-44ba-bc7a-977c9ec9c9ed&$select=AccountName
Result:
{
"@odata.context": "http://localhost/OData/Builtin/$metadata#CalculatedAssignments(AccountName)",
"value": [
{
"AccountName": "MTAA"
}
]
}
Get all access request status items requested by user
GET:
http://[Omada Identity server]/OData/BuiltIn/AccessRequestStatusItems
Result:
{
"@odata.context": "http://localhost /OData/Builtin/$metadata#AccessRequestStatusItems",
"value": [
{
"ResourceAssignmentId": 1008504,
"ValidFrom": "2019-05-27T22:00:00+02:00",
"ValidTo": "9999-12-30T23:00:00+01:00",
"CreateTime": "0001-01-01T00:00:00Z",
"ViolationStatus": "NoOverride",
"ViolationStatusText": "",
"ApprovalStatus": "No approval required",
"ProvisioningStatus": "OK (Pending Confirmation)",
"Attributes": [],
"Beneficiary@odata.context": "http://localhost /OData/Builtin/$metadata#AccessRequestStatusItems(1008504)/Beneficiary/$entity",
"Beneficiary": {
"Id": 1002001,
"UId": "694a50ec-047d-4351-9cfc-ebb66a959193",
"ObjectType": "Identity",
"DisplayName": "King, Kevin [KKAE]"
},
"RequestedBy@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems(1008504)/RequestedBy/$entity",
"RequestedBy": {
"Id": 3502,
"UId": "a3527a28-4365-4674-9797-939c995247f7",
"ObjectType": "User",
"DisplayName": "System Administrator"
},
"Resource@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems(1008504)/Resource/$entity",
"Resource": {
"Id": 1007849,
"UId": "9b3810e1-1633-425c-b7ec-3566c296b84d",
"ObjectType": "Resource",
"DisplayName": "Approve Purchase Order"
},
"System@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems(1008504)/System/$entity",
"System": {
"Id": 1007304,
"UId": "102db93b-b2dc-4701-8095-c6c85688b60b",
"ObjectType": "System",
"DisplayName": "Active Directory"
}
}
]
}
Get all access request status items for specific beneficiary
GET:
http://[Omada Identity server]/OData/BuiltIn/AccessRequestStatusItems$filter=Beneficiary/Id eq 1007066
Result:
{
"@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems",
"value": [
{
"ResourceAssignmentId": 1008503,
"ValidFrom": "2019-05-27T22:00:00+02:00",
"ValidTo": "9999-12-30T23:00:00+01:00",
"CreateTime": "0001-01-01T00:00:00Z",
"ViolationStatus": "NoOverride",
"ViolationStatusText": "",
"ApprovalStatus": "No approval required",
"ProvisioningStatus": "Ready to use",
"Attributes": [],
"Beneficiary@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems(1008503)/Beneficiary/$entity",
"Beneficiary": {
"Id": 1007066,
"UId": "63d70fe1-06f2-4050-8b9e-1239141e57f7",
"ObjectType": "Identity",
"DisplayName": "Parker, William [WPAA]"
},
"RequestedBy@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems(1008503)/RequestedBy/$entity",
"RequestedBy": {
"Id": 3502,
"UId": "a3527a28-4365-4674-9797-939c995247f7",
"ObjectType": "User",
"DisplayName": "System Administrator"
},
"Resource@odata.context": "http://localhost /OData/Builtin/$metadata#AccessRequestStatusItems(1008503)/Resource/$entity",
"Resource": {
"Id": 1007849,
"UId": "9b3810e1-1633-425c-b7ec-3566c296b84d",
"ObjectType": "Resource",
"DisplayName": "Approve Purchase Order"
},
"System@odata.context": "http://localhost/OData/Builtin/$metadata#AccessRequestStatusItems(1008503)/System/$entity",
"System": {
"Id": 1007304,
"UId": "102db93b-b2dc-4701-8095-c6c85688b60b",
"ObjectType": "System",
"DisplayName": "Active Directory"
}
}
]
}
Batch create request
Example of batch that creates two resources
{
"requests": [
{
"id": "1",
"method": "POST",
"atomicityGroup": "transaction1",
"url": "http://localhost/OData/DataObjects/Resource",
"headers": {
"content-type": "application/json; odata.metadata=minimal; odata.streaming=true",
"odata-version": "4.0"
},
"body": {"@odata.type":"#OIS.Resource","Id":0,"NAME":"resource1","ROLEID":"RESOURCE1","ROLETYPEREF":{"KeyValue":"OIS Org. Unit Manager Role","KeyProperty":"NAME"},"ROLECATEGORY":{"Id":501},"SYSTEMREF":{"KeyValue":"OIS01"},"ROLEFOLDER":{"KeyValue":"OIMROLES"}}
},
{
"id": "2",
"method": "POST",
"atomicityGroup": "transaction1",
"url": "http://localhost/OData/DataObjects/Resource",
"headers": {
"content-type": "application/json; odata.metadata=minimal; odata.streaming=true",
"odata-version": "4.0"
},
"body": {"@odata.type":"#OIS.Resource","NAME":"resource2","ROLEID":"RESOURCE2","ROLETYPEREF":{"KeyValue":"OIS Org. Unit Manager Role","KeyProperty":"NAME"},"ROLECATEGORY":{"Id":501},"SYSTEMREF":{"KeyValue":"OIS01"},"ROLEFOLDER":{"KeyValue":"OIMROLES"}}