CampusAPI Relationship Services API documentation version 0.1.2
Based on OSID version 3.0.0
https://base.url/relationship
Overview
The Relationship package provides the ability to relate and manage data between any other objects.
This package includes the following entities:
Relationships
The Relationship entity defines a Relationship that can be used to explicitly identify a relationship between two other object Ids and manage information specific to the relationship.
Relationship is a building block on which relationships defined in the context of other objects can be built. Examples of relationships include the enrollment record of a student in a Course or the commitment or a person to an Event.
Relationships depend on the relationship Type to indicate the nature of the relationship including its natural ordering between the source and destination Ids. A relationship of type "friend" may place the peers in either order and be queryable in either order. A relationship of type "parent" is between a father peer and a son peer, but not the other way around. Queries of the son peer based on the "parent" type is not equiavelent to queries of the father peer based on the "parent" type.
Such directional relationships may be accompanied by two types. An additional relationship type of "child" can be used with the son peer to determine the father peer. The directionality and the inverse among the types are part of the type definition.
Field | Description | Type |
---|---|---|
id(read‑only) | The unique id of this relationship, provided by system. | string(osid‑id) |
uri(read‑only) | The uri of this relationship, provided by system. | string(uri) |
displayName | The name of this relationship for display. | string |
description | The description of this relationship. | string |
genusTypeId (read‑only) | Id of the immutable type of this relationship. Default type set by system unless specified in query parameter. | string(osid‑id) |
recordTypeIds (read‑only) | Type Ids of record types available on this relationship. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere. | string(osid‑id)[] |
startDate | The starting date of this relationship. | string(date‑time) |
endDate | The ending date of this relationship. | string(date‑time) |
endReasonId | The reason this relationship ended. References a process.State object. | string(osid‑id) |
sourceId (read‑only) | The source associated with this relationship. References an id.Id object. | string(osid‑id) |
destinationId (read‑only) | The destination associated with this relationship. References an id.Id object. | string(osid‑id) |
Families
Relationships may be cataloged using Family catalogs
Field | Description | Type |
---|---|---|
id(read‑only) | The unique id of this family, provided by system. | string(osid‑id) |
uri(read‑only) | The uri of this family, provided by system. | string(uri) |
displayName | The name of this family for display. | string |
description | The description of this family. | string |
genusTypeId (read‑only) | Id of the immutable type of this family. Default type set by system unless specified in query parameter. | string(osid‑id) |
recordTypeIds (read‑only) | Type Ids of record types available on this family. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere. | string(osid‑id)[] |
providerId | The provider of this family. References a resource.Resource object. | string(osid‑id) |
brandingIds | The branding of this family. References repository.Asset objects. | string(osid‑id)[] |
license | The licensing that applies to this family. | string |
License
CampusAPI REST Documentation Copyright 2020 DXtera Institute. Based on the Open Service Interface Defitions: http://osid.org
/relationships
Collection of relationships in a system, federation of systems, or in a default family.
Get all relationships in the system or default family.
Create a new relationship in the default family.
get /relationships
Get all relationships in the system or default family.
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- genusTypeId: (string)
The id string to match a genusType
Example:
type.Type%3AexampleRelationshipType%40dxtera.org
- parentGenusTypeId: (string)
The id string to match a parent genusType
Example:
type.Type%3AparentTypeExampleRelationshipType%40dxtera.org
- recordTypeId: (string)
The id string to match a recordType
Example:
type.Type%3AexampleRelationshipType%40campusapi.org
- fromDate: (string)
Get all relationships from this date inclusive. Use with toDate to define date range query.
Example:
2020-10-03
- toDate: (string)
Get all relationships up to this date inclusive. Use with fromDate to define date range query.
Example:
2020-12-18
- sourceId: (string)
the id string to match a source.
Example:
resource.Resource%3A576%40base.url
- destinationId: (string)
the id string to match a destination.
Example:
resource.Resource%3A1056%40base.url
- familyId: (string)
The id string to match a family
Example:
relationship.Family%3A8374%40base.url
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "relationship.Relationship:5385@base.url",
"uri": "http://base.url/open/campusapi/relationship/relationship/relationship.Relationship%3A5385%40base.url",
"displayName": "Display Name of this Relationship",
"description": "The description of this Relationship",
"genusTypeId": "type.Type:defaultRelationshipType@base.url",
"recordTypeIds": [ "type.Type:exampleRelationshipRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:5385@base.url",
"sourceId": "id.Id:6235@base.url",
"destinationId": "id.Id:6125@base.url"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
post /relationships
Create a new relationship in the default family.
Query Parameters
- sourceId: required(string)
the source of this relationship.
Example:
resource.Resource%3A576%40base.url
- destinationId: required(string)
the destination of this relationship.
Example:
resource.Resource%3A1056%40base.url
- genusType: (string)
specify a particular relationship type to create
Example:
type.Type%3AexampleRelationshipType%40dxtera.org
- recordType: (array of )
specify support for one or more relationship record types
Example:
[ "type.Type%3AexampleRelationshipRecordType%40campusapi.org", "..." ]
- familyId: (string)
specify in which family to create this relationship
Example:
relationship.Family%3A8374%40base.url
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Relationship",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this relationship, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this relationship, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this relationship for display.",
"type": "string"
},
"description": {
"description": "The description of this relationship.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this relationship. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this relationship. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this relationship.",
"type": "string",
"format": "date-time"
},
"endDate": {
"description": "The ending date of this relationship.",
"type": "string",
"format": "date-time"
},
"endReasonId": {
"description": "The reason this relationship ended.",
"type": "string",
"format": "osid-id"
},
"sourceId": {
"description": "The source associated with this relationship.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"destinationId": {
"description": "The destination associated with this relationship.",
"type": "string",
"format": "osid-id",
"readOnly": true
}
}
}
Example:
{
"displayName": "Display Name of this Relationship",
"description": "The description of this Relationship",
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:1773@base.url"
}
Entity representing a relationship form metadata.
Get form metadata for creating a new relationship.
get /relationships/metadata
Get form metadata for creating a new relationship.
Query Parameters
- sourceId: required(string)
the source of this metadatum.
Example:
resource.Resource%3A576%40base.url
- destinationId: required(string)
the destination of this metadatum.
Example:
resource.Resource%3A1056%40base.url
- genusType: (string)
specify a particular relationship type to create
Example:
type.Type%3AexampleRelationshipType%40dxtera.org
- recordType: (array of )
specify support for one or more relationship record types
Example:
[ "type.Type%3AexampleRelationshipRecordType%40campusapi.org", "..." ]
- familyId: (string)
specify in which family to create this relationship
Example:
relationship.Family%3A8374%40base.url
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Relationship",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this relationship, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this relationship, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this relationship for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this relationship",
"linked": false
},
"description": {
"description": "The description of this relationship.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this relationship",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this relationship. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this relationship. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this relationship.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:startDate@base.url",
"existingValue": "2020-10-03T08:00:00.000Z",
"elementLabel": "Start Date",
"instructions": "Enter a starting date for this relationship",
"linked": false
},
"endDate": {
"description": "The ending date of this relationship.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:endDate@base.url",
"existingValue": "2020-12-18T17:00:00.000Z",
"elementLabel": "End Date",
"instructions": "Enter an ending date for this relationship",
"linked": false
},
"endReasonId": {
"description": "The reason this relationship ended. A process/State object.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:endReason@base.url",
"existingValue": "process.State:1860@base.url",
"elementLabel": "End Reason",
"instructions": "Select the reason this relationship ended",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Entity representing a relationship
Get a relationship given its id.
Update a given relationship.
Delete a given relationship.
get /relationships/{relationshipId}
Get a relationship given its id.
URI Parameters
- relationshipId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": "relationship.Relationship:5385@base.url",
"uri": "http://base.url/open/campusapi/relationship/relationship/relationship.Relationship%3A5385%40base.url",
"displayName": "Display Name of this Relationship",
"description": "The description of this Relationship",
"genusTypeId": "type.Type:defaultRelationshipType@base.url",
"recordTypeIds": [ "type.Type:exampleRelationshipRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:5385@base.url",
"sourceId": "id.Id:6235@base.url",
"destinationId": "id.Id:6125@base.url"
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "relationship not found" }
put /relationships/{relationshipId}
Update a given relationship.
URI Parameters
- relationshipId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Relationship",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this relationship, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this relationship, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this relationship for display.",
"type": "string"
},
"description": {
"description": "The description of this relationship.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this relationship. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this relationship. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this relationship.",
"type": "string",
"format": "date-time"
},
"endDate": {
"description": "The ending date of this relationship.",
"type": "string",
"format": "date-time"
},
"endReasonId": {
"description": "The reason this relationship ended.",
"type": "string",
"format": "osid-id"
},
"sourceId": {
"description": "The source associated with this relationship.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"destinationId": {
"description": "The destination associated with this relationship.",
"type": "string",
"format": "osid-id",
"readOnly": true
}
}
}
Example:
{
"displayName": "Display Name of this Relationship",
"description": "The description of this Relationship",
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:1773@base.url"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The relationship has been updated" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "relationship not found" }
delete /relationships/{relationshipId}
Delete a given relationship.
URI Parameters
- relationshipId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The relationship has been deleted" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "relationship not found" }
Entity representing a relationship form metadata for update
Get form metadata for updating an existing relationship.
get /relationships/{relationshipId}/metadata
Get form metadata for updating an existing relationship.
URI Parameters
- relationshipId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Relationship",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this relationship, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this relationship, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this relationship for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this relationship",
"linked": false
},
"description": {
"description": "The description of this relationship.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this relationship",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this relationship. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this relationship. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this relationship.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:startDate@base.url",
"existingValue": "2020-10-03T08:00:00.000Z",
"elementLabel": "Start Date",
"instructions": "Enter a starting date for this relationship",
"linked": false
},
"endDate": {
"description": "The ending date of this relationship.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:endDate@base.url",
"existingValue": "2020-12-18T17:00:00.000Z",
"elementLabel": "End Date",
"instructions": "Enter an ending date for this relationship",
"linked": false
},
"endReasonId": {
"description": "The reason this relationship ended. A process/State object.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Relationship.Relationship:endReason@base.url",
"existingValue": "process.State:1860@base.url",
"elementLabel": "End Reason",
"instructions": "Select the reason this relationship ended",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "relationship not found" }
/families
Collection of families in a system or federation of systems.
Get all families.
Create a new family.
get /families
Get all families.
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- genusTypeId: (string)
The id string to match a genusType
Example:
type.Type%3AexampleFamilyType%40dxtera.org
- parentGenusTypeId: (string)
The id string to match a parent genusType
Example:
type.Type%3AparentTypeExampleFamilyType%40dxtera.org
- recordTypeId: (string)
The id string to match a recordType
Example:
type.Type%3AexampleFamilyType%40campusapi.org
- providerId: (string)
Id string to match provider.
Example:
resource.Resource%3A3007%40demo.dxtera.org
- relationshipId: (string)
Get families mapped to this relationship.
Example:
relationship.Relationship%3A864%40demo.dxtera.org
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "relationship.Family:2553@base.url",
"uri": "http://base.url/open/campusapi/relationship/family/relationship.Family%3A2553%40base.url",
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"genusTypeId": "type.Type:defaultFamilyType@base.url",
"recordTypeIds": [ "type.Type:exampleFamilyRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
post /families
Create a new family.
Query Parameters
- genusType: (string)
specify a particular family type to create
Example:
type.Type%3AexampleFamilyType%40dxtera.org
- recordType: (array of )
specify support for one or more family record types
Example:
[ "type.Type%3AexampleFamilyRecordType%40campusapi.org", "..." ]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Family",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this family, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this family, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this family for display.",
"type": "string"
},
"description": {
"description": "The description of this family.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this family. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this family. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this family.",
"type": "string",
"format": "osid-id"
},
"brandingIds": {
"description": "The branding of this family. A collection of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id"
}
},
"license": {
"description": "The licensing that applies to this family.",
"type": "string"
}
}
}
Example:
{
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
}
Entity representing a family form metadata.
Get form metadata for creating a new family.
get /families/metadata
Get form metadata for creating a new family.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Family",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this family, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this family, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this family for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this family",
"linked": false
},
"description": {
"description": "The description of this family.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this family",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this family. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this family. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this family.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:provider@base.url",
"existingValue": "",
"elementLabel": "Provider",
"instructions": "Enter the provider of this family",
"linked": false
},
"brandingIds": {
"description": "The branding of this family. A list of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id",
"pattern": "",
"enum": []
},
"read-only": false,
"default": [],
"elementId": "Family.Family:branding@base.url",
"existingValue": "",
"elementLabel": "Branding",
"instructions": "Enter the branding images for this family",
"linked": false
},
"license": {
"description": "The licensing that applies to this family.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:license@base.url",
"existingValue": "The Existing License",
"elementLabel": "License",
"instructions": "Include a license for this family",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
The root families in the family hierarchy. A node with no parents is an orphan. While all family Ids are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node.
Get all root root-family
get /families/root-family
Get all root root-family
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "relationship.Family:2553@base.url",
"uri": "http://base.url/open/campusapi/relationship/family/relationship.Family%3A2553%40base.url",
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"genusTypeId": "type.Type:defaultFamilyType@base.url",
"recordTypeIds": [ "type.Type:exampleFamilyRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Entity representing a family
Get a family given its id.
Update a given family.
Delete a given family.
get /families/{familyId}
Get a family given its id.
URI Parameters
- familyId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": "relationship.Family:2553@base.url",
"uri": "http://base.url/open/campusapi/relationship/family/relationship.Family%3A2553%40base.url",
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"genusTypeId": "type.Type:defaultFamilyType@base.url",
"recordTypeIds": [ "type.Type:exampleFamilyRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "family not found" }
put /families/{familyId}
Update a given family.
URI Parameters
- familyId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Family",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this family, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this family, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this family for display.",
"type": "string"
},
"description": {
"description": "The description of this family.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this family. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this family. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this family.",
"type": "string",
"format": "osid-id"
},
"brandingIds": {
"description": "The branding of this family. A collection of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id"
}
},
"license": {
"description": "The licensing that applies to this family.",
"type": "string"
}
}
}
Example:
{
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The family has been updated" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "family not found" }
delete /families/{familyId}
Delete a given family.
URI Parameters
- familyId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The family has been deleted" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "family not found" }
Entity representing a family form metadata for update
Get form metadata for updating an existing family.
get /families/{familyId}/metadata
Get form metadata for updating an existing family.
URI Parameters
- familyId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Family",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this family, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this family, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this family for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this family",
"linked": false
},
"description": {
"description": "The description of this family.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this family",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this family. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this family. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this family.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:provider@base.url",
"existingValue": "",
"elementLabel": "Provider",
"instructions": "Enter the provider of this family",
"linked": false
},
"brandingIds": {
"description": "The branding of this family. A list of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id",
"pattern": "",
"enum": []
},
"read-only": false,
"default": [],
"elementId": "Family.Family:branding@base.url",
"existingValue": "",
"elementLabel": "Branding",
"instructions": "Enter the branding images for this family",
"linked": false
},
"license": {
"description": "The licensing that applies to this family.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Family.Family:license@base.url",
"existingValue": "The Existing License",
"elementLabel": "License",
"instructions": "Include a license for this family",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "family not found" }
Get child families for the given family in the hierarchy.
get /families/{familyId}/children
Get child families for the given family in the hierarchy.
URI Parameters
- familyId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "relationship.Family:2553@base.url",
"uri": "http://base.url/open/campusapi/relationship/family/relationship.Family%3A2553%40base.url",
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"genusTypeId": "type.Type:defaultFamilyType@base.url",
"recordTypeIds": [ "type.Type:exampleFamilyRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Add family as child of the given family in the hierarchy.
Remove the given family as a child of the given family in the hierarchy.
put /families/{familyId}/children/{childId}
Add family as child of the given family in the hierarchy.
URI Parameters
- familyId: required(string)
- childId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The child family has been added to the hierarchy" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{ "message": "family not found" }
delete /families/{familyId}/children/{childId}
Remove the given family as a child of the given family in the hierarchy.
URI Parameters
- familyId: required(string)
- childId: required(string)
Get parent families for the given family in the hierarchy.
get /families/{familyId}/parents
Get parent families for the given family in the hierarchy.
URI Parameters
- familyId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "relationship.Family:2553@base.url",
"uri": "http://base.url/open/campusapi/relationship/family/relationship.Family%3A2553%40base.url",
"displayName": "Display Name of this Family",
"description": "The description of this Family",
"genusTypeId": "type.Type:defaultFamilyType@base.url",
"recordTypeIds": [ "type.Type:exampleFamilyRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Family@base.url",
"license": "The license that applies to this Family"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Get all relationships in this family
get /families/{familyId}/relationships
Get all relationships in this family
URI Parameters
- familyId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "relationship.Relationship:5385@base.url",
"uri": "http://base.url/open/campusapi/relationship/relationship/relationship.Relationship%3A5385%40base.url",
"displayName": "Display Name of this Relationship",
"description": "The description of this Relationship",
"genusTypeId": "type.Type:defaultRelationshipType@base.url",
"recordTypeIds": [ "type.Type:exampleRelationshipRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:5385@base.url",
"sourceId": "id.Id:6235@base.url",
"destinationId": "id.Id:6125@base.url"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Add the given relationship to this family
Remove the given relationship from the family.
put /families/{familyId}/relationships/{relationshipId}
Add the given relationship to this family
URI Parameters
- familyId: required(string)
- relationshipId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "relationship has been added to family" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{ "message": "relationship not found" }
delete /families/{familyId}/relationships/{relationshipId}
Remove the given relationship from the family.
URI Parameters
- familyId: required(string)
- relationshipId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "relationship has been removed" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{ "message": "relationship not found" }