OrganizationMembership

Overview

This entity contains information about courses - users mapping.

Which organisation memberships are included?

In the entity there are users with organisations they were assigned to.

Notes

  • The entity shows the latest version of organisation membership for each mapped user only. This entity hasn't used in itslearning in the application. This is technical table.

  • This table joins organizations which user and his system role (Administrator, Teacher, Pupil,.....). This is bridge (connector) between organization and user.

Relationships

OrganizationMembership is linked to;

Diagram

images/download/attachments/41661360/OrganizationMembership.PNG

Entity Details

Name

Data type

Nullable

Description

OrganizationId

Edm.Int32

false

organisation business ID

UserId

Edm.Int32

false

user business ID

SystemRole

Edm.String

site role of the user

IsHomeOrganization

Edm.Boolean

flag if the organisation is a home organisation

ValidFrom

Edm.DateTime

false

technical information (is valid from)

ValidTo

Edm.DateTime

false

technical information (is valid to)

SQL code

CREATE TABLE [Dwh].[OrganizationMemberships]([OrganizationId] [INT] NOT NULL ,[UserId] [INT] NOT NULL ,[SystemRole] [NVARCHAR]( 100 ) NULL ,[IsHomeOrganization] [bit] NULL ,[ValidFrom] [DATETIME] NOT NULL ,[ValidTo] [DATETIME] NOT NULL )

ALTER TABLE Dwh.OrganizationMemberships ADD CONSTRAINT PK_OrganizationMemberships PRIMARY KEY (OrganizationId,UserId);

Request body

URI
https://reporting.itslearning.com/odata/engine7/OrganizationMemberships?$top=10

Response body - XML

XML response
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://reporting.itslearning.com/odata/engine7" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices
/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>http://schemas.datacontract.org/2004/07/</id>
<title />
<updated>2016-12-21T10:11:54Z</updated>
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships" />
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=1)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=1)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=1)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=1)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=1)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">1</d:UserId>
<d:SystemRole>Administrator</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-07-24T14:25:01</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=2)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=2)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=2)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=2)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=2)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">2</d:UserId>
<d:SystemRole>Teacher</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-07-24T14:25:01</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=3)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=3)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=3)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=3)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=3)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">3</d:UserId>
<d:SystemRole>Teacher</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-11-21T10:22:04</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=4)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=4)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=4)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=4)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=4)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">4</d:UserId>
<d:SystemRole>Student</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-07-24T14:25:01</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=5)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=5)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=5)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=5)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=5)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">5</d:UserId>
<d:SystemRole>Teacher</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-11-21T10:22:04</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=6)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=6)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=6)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=6)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=6)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">6</d:UserId>
<d:SystemRole>Student</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-11-21T10:22:04</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=7)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=7)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=7)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=7)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=7)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">7</d:UserId>
<d:SystemRole>Student</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-07-24T14:25:01</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=8)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=8)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=8)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=8)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=8)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">8</d:UserId>
<d:SystemRole>Teacher</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-11-21T10:22:04</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=9)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=9)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=9)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=9)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=9)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">9</d:UserId>
<d:SystemRole>Guest</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-07-24T14:25:01</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
<entry>
<id>https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=10)</id>
<category term="Itslearning.Reporting.Data.Models.OrganizationMembership" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=10)" />
<link rel="self" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId=1,UserId=10)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Organization" type="application/atom+xml;type=entry" title="Organization" href="https://reporting.itslearning.com/odata/engine7/OrganizationMembership
s(OrganizationId=1,UserId=10)/Organization" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/User" type="application/atom+xml;type=entry" title="User" href="https://reporting.itslearning.com/odata/engine7/OrganizationMemberships(OrganizationId
=1,UserId=10)/User" />
<title />
<updated>2016-12-21T10:11:54Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:OrganizationId m:type="Edm.Int32">1</d:OrganizationId>
<d:UserId m:type="Edm.Int32">10</d:UserId>
<d:SystemRole>Administrator</d:SystemRole>
<d:IsHomeOrganization m:type="Edm.Boolean">true</d:IsHomeOrganization>
<d:ValidFrom m:type="Edm.DateTime">2015-07-24T14:25:01</d:ValidFrom>
<d:ValidTo m:type="Edm.DateTime">9999-12-31T00:00:00</d:ValidTo>
</m:properties>
</content>
</entry>
</feed>

Response body - JSON (default output format)

JSON response
{
"odata.metadata":"https://reporting.itslearning.com/odata/engine7/$metadata#OrganizationMemberships","value":[
{
"OrganizationId":1,"UserId":1,"SystemRole":"Administrator","IsHomeOrganization":true,"ValidFrom":"2015-07-24T14:25:01","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":2,"SystemRole":"Teacher","IsHomeOrganization":true,"ValidFrom":"2015-07-24T14:25:01","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":3,"SystemRole":"Teacher","IsHomeOrganization":true,"ValidFrom":"2015-11-21T10:22:04","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":4,"SystemRole":"Student","IsHomeOrganization":true,"ValidFrom":"2015-07-24T14:25:01","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":5,"SystemRole":"Teacher","IsHomeOrganization":true,"ValidFrom":"2015-11-21T10:22:04","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":6,"SystemRole":"Student","IsHomeOrganization":true,"ValidFrom":"2015-11-21T10:22:04","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":7,"SystemRole":"Student","IsHomeOrganization":true,"ValidFrom":"2015-07-24T14:25:01","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":8,"SystemRole":"Teacher","IsHomeOrganization":true,"ValidFrom":"2015-11-21T10:22:04","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":9,"SystemRole":"Guest","IsHomeOrganization":true,"ValidFrom":"2015-07-24T14:25:01","ValidTo":"9999-12-31T00:00:00"
},{
"OrganizationId":1,"UserId":10,"SystemRole":"Administrator","IsHomeOrganization":true,"ValidFrom":"2015-07-24T14:25:01","ValidTo":"9999-12-31T00:00:00"
}
]
}