public
|
#
__construct(ClientConnection $conn)
Create a new InstitutionMethods object.
Create a new InstitutionMethods object.
Parameters
- $conn
The ClientConnection object to use to
invoke methods on the server.
|
public
IbisAttributeScheme[]
|
#
allAttributeSchemes()
Return a list of all the institution attribute schemes available.
The schemeid values of these schemes may be used in the
fetch parameter of other methods that return institutions.
Return a list of all the institution attribute schemes available.
The schemeid values of these schemes may be used in the
fetch parameter of other methods that return institutions.
[ HTTP: GET /api/v1/inst/all-attr-schemes ]
Returns
|
public
IbisInstitution[]
|
#
allInsts(boolean $includeCancelled,
string $fetch = null)
Return a list of all institutions.
Return a list of all institutions.
By default, only a few basic details about each institution are
returned, but the optional fetch parameter may be used
to fetch additional attributes or references.
[ HTTP: GET /api/v1/inst/all-insts ]
Parameters
- $includeCancelled
[optional] Whether or not to include cancelled
institutions. By default, only live institutions are returned.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch.
Returns
|
public
IbisInstitution[]
|
#
listInsts(string $instids,
string $fetch = null)
Get the institutions with the specified IDs.
Get the institutions with the specified IDs.
By default, only a few basic details about each institution are
returned, but the optional fetch parameter may be used
to fetch additional attributes or references.
The results are sorted by ID.
NOTE: The URL path length is limited to around 8000 characters, and
an instid is up to 8 characters long. Allowing for comma separators
and URL encoding, this limits the number of institutions that this
method may fetch to around 700.
NOTE: The institutions returned may include cancelled institutions.
It is the caller's responsibility to check their cancelled flags.
[ HTTP: GET /api/v1/inst/list?instids=... ]
Parameters
- $instids
- [required] A comma-separated list of instids.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch.
Returns
|
public
IbisInstitution[]
|
#
modifiedInsts(long $minTxId,
long $maxTxId,
string $instids = null,
boolean $includeCancelled = null,
boolean $contactRowChanges = null,
boolean $membershipChanges = null,
string $fetch = null)
Find all institutions modified between the specified pair of
transactions.
Find all institutions modified between the specified pair of
transactions.
The transaction IDs specified should be the IDs from two different
requests for the last (most recent) transaction ID, made at different
times, that returned different values, indicating that some Lookup
data was modified in the period between the two requests. This method
then determines which (if any) institutions were affected.
By default, only a few basic details about each institution are
returned, but the optional fetch parameter may be used
to fetch additional attributes or references.
NOTE: All data returned reflects the latest available data about each
institution. It is not possible to query for old data, or more
detailed information about the specific changes made.
[ HTTP: GET /api/v1/inst/modified-insts?minTxId=...&maxTxId=... ]
Parameters
- $minTxId
[required] Include modifications made in transactions
after (but not including) this one.
- $maxTxId
[required] Include modifications made in transactions
up to and including this one.
- $instids
[optional] Only include institutions with instids in
this list. By default, all modified institutions will be included.
- $includeCancelled
[optional] Include cancelled institutions. By
default, cancelled institutions are excluded.
- $contactRowChanges
[optional] Include institutions whose contact
rows have changed. By default, changes to institution contact rows are
not taken into consideration.
- $membershipChanges
[optional] Include institutions whose members
have changed. By default, changes to institutional memberships are not
taken into consideration.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch.
Returns
|
public
IbisInstitution[]
|
#
search(string $query,
boolean $approxMatches = null,
boolean $includeCancelled = null,
string $attributes = null,
integer $offset = null,
integer $limit = null,
string $orderBy = null,
string $fetch = null)
Search for institutions using a free text query string. This is the
same search function that is used in the Lookup web application.
Search for institutions using a free text query string. This is the
same search function that is used in the Lookup web application.
By default, only a few basic details about each institution are
returned, but the optional fetch parameter may be used
to fetch additional attributes or references.
NOTE: If the query string starts with the prefix "inst:" , it
is treated as an LQL query, allowing
more advanced searches. An LQL query will ignore the
approxMatches and attributes parameters, but
it will respect the value of includeCancelled . In
addition, an LQL query will ignore the orderBy parameter,
since LQL queries always return results in ID order.
[ HTTP: GET /api/v1/inst/search?query=... ]
Parameters
- $query
- [required] The search string.
- $approxMatches
[optional] Flag to enable more approximate
matching in the search, causing more results to be returned. Defaults
to false . This is ignored for LQL queries.
- $includeCancelled
[optional] Flag to allow cancelled institutions
to be included. Defaults to false .
- $attributes
[optional] A comma-separated list of attributes to
consider when searching. If this is null (the default) then
all attribute schemes marked as searchable will be included. This is
ignored for LQL queries.
- $offset
[optional] The number of results to skip at the start
of the search. Defaults to 0.
- $limit
[optional] The maximum number of results to return.
Defaults to 100.
- $orderBy
[optional] The order in which to list the results.
This may be either "instid" or "name" (the default for
non-LQL queries). This is ignored for LQL queries, which always return
results in instid order.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch.
Returns
|
public
integer
|
#
searchCount(string $query,
boolean $approxMatches = null,
boolean $includeCancelled = null,
string $attributes = null)
Count the number of institutions that would be returned by a search
using a free text query string.
Count the number of institutions that would be returned by a search
using a free text query string.
NOTE: If the query string starts with the prefix "inst:" , it
is treated as an LQL query, allowing
more advanced searches. An LQL query will ignore the
approxMatches and attributes parameters, but
it will respect the value of includeCancelled .
[ HTTP: GET /api/v1/inst/search-count?query=... ]
Parameters
- $query
- [required] The search string.
- $approxMatches
[optional] Flag to enable more approximate
matching in the search, causing more results to be returned. Defaults
to false . This is ignored for LQL queries.
- $includeCancelled
[optional] Flag to allow cancelled institutions
to be included. Defaults to false .
- $attributes
[optional] A comma-separated list of attributes to
consider when searching. If this is null (the default) then
all attribute schemes marked as searchable will be included. This is
ignored for LQL queries.
Returns
integer The number of matching institutions.
|
public
IbisInstitution
|
#
getInst(string $instid,
string $fetch = null)
Get the institution with the specified ID.
Get the institution with the specified ID.
By default, only a few basic details about the institution are
returned, but the optional fetch parameter may be used
to fetch additional attributes or references of the institution.
NOTE: The institution returned may be a cancelled institution. It is
the caller's responsibility to check its cancelled flag.
[ HTTP: GET /api/v1/inst/{instid} ]
Parameters
- $instid
- [required] The ID of the institution to fetch.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch.
Returns
|
public
IbisAttribute
|
#
addAttribute(string $instid,
IbisAttribute $attr,
integer $position = null,
boolean $allowDuplicates = null,
string $commitComment = null)
Add an attribute to an institution. By default, this will not add the
attribute again if it already exists.
Add an attribute to an institution. By default, this will not add the
attribute again if it already exists.
When adding an attribute, the new attribute's scheme must be set.
In addition, either its value or its binaryData field should be set.
All the remaining fields of the attribute are optional.
[ HTTP: POST /api/v1/inst/{instid}/add-attribute ]
Parameters
- $instid
- [required] The ID of the institution.
- $attr
- [required] The new attribute to add.
- $position
[optional] The position of the new attribute in the
list of attributes of the same attribute scheme (1, 2, 3,...). A value
of 0 (the default) will cause the new attribute to be added to the end
of the list of existing attributes for the scheme.
- $allowDuplicates
[optional] If true , the new attribute
will always be added, even if another identical attribute already
exists. If false (the default), the new attribute will only be
added if it doesn't already exist.
- $commitComment
[recommended] A short textual description of
the change made (will be visible on the history tab in the web
application).
Returns
|
public
IbisPerson[]
|
#
getCancelledMembers(string $instid,
string $fetch = null)
Get all the cancelled members of the specified institution.
Get all the cancelled members of the specified institution.
By default, only a few basic details about each member are returned,
but the optional fetch parameter may be used to fetch
additional attributes or references of each person.
NOTE: This method returns only cancelled people. It does not include
people who were removed from the institution. Cancelled people are no
longer considered to be current staff, students or accredited visitors,
and are no longer regarded as belonging to any groups or institutions.
The list returned here reflects their institutional memberships just
before they were cancelled, and so is out-of-date data that should be
used with caution.
[ HTTP: GET /api/v1/inst/{instid}/cancelled-members ]
Parameters
- $instid
- [required] The ID of the institution.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch for each person.
Returns
IbisPerson[] The institution's cancelled members (in identifier order).
|
public
IbisContactRow[]
|
#
getContactRows(string $instid,
string $fetch = null)
Get all the contact rows of the specified institution.
Get all the contact rows of the specified institution.
Any addresses, email addresses, phone numbers and web pages
associated with the contact rows are automatically returned, as
well as any people referred to by the contact rows.
If any of the contact rows refer to people, then only a few basic
details about each person are returned, but the optional
fetch parameter may be used to fetch additional
attributes or references of each person.
NOTE: This method will not include cancelled people.
[ HTTP: GET /api/v1/inst/{instid}/contact-rows ]
Parameters
- $instid
- [required] The ID of the institution.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch for any people referred to by any
of the contact rows.
Returns
|
public
IbisGroup
|
#
createGroup(string $instid,
string $name,
string $title,
string $description,
string $managedBy = null,
string $commitComment = null)
Create a group owned by an institution.
Create a group owned by an institution.
A new group will be created with the institution being its only owner.
Only limited attributes (short hyphenated name, title and description) of
the new group can be specified when creating a group. The GroupMethod's
update methods be used to modify other attributes.
The new group will have membership visibility of 'university' and be managed
by the same groups as its owning institution.
[ HTTP: POST /api/v1/inst/{instid}/create-group ]
Parameters
- $instid
- [required] The ID of the institution.
- $name
[required] A short hyphenated name for the new group. Must be in lower case and
begin with the instid followed by a hyphen.
- $title
- [required] A title for the new group.
- $description
- [required] A more detailed description of the new group.
- $managedBy
[optional] The sole group that will manage group data for the new group.
If not provided, the new group will be managed by the same groups as its owning institution.
- $commitComment
[recommended] A short textual description of
the change made (will be visible on the history tab in the web
application).
Returns
|
public
IbisAttribute[]
|
#
getAttributes(string $instid,
string $attrs)
Get one or more (possibly multi-valued) attributes of an institution.
The returned attributes are sorted by attribute scheme precedence and
then attribute precedence.
Get one or more (possibly multi-valued) attributes of an institution.
The returned attributes are sorted by attribute scheme precedence and
then attribute precedence.
[ HTTP: GET /api/v1/inst/{instid}/get-attributes?attrs=... ]
Parameters
- $instid
- [required] The ID of the institution.
- $attrs
[required] The attribute scheme(s) to fetch. This may
include any number of the attributes or pseudo-attributes, but it
may not include references or attribute chains (see the documentation
for the fetch parameter in this class).
Returns
|
public
IbisPerson[]
|
#
getMembers(string $instid,
string $fetch = null)
Get all the members of the specified institution.
Get all the members of the specified institution.
By default, only a few basic details about each member are returned,
but the optional fetch parameter may be used to fetch
additional attributes or references of each person.
NOTE: This method will not include cancelled people.
[ HTTP: GET /api/v1/inst/{instid}/members ]
Parameters
- $instid
- [required] The ID of the institution.
- $fetch
[optional] A comma-separated list of any additional
attributes or references to fetch for each person.
Returns
IbisPerson[] The institution's members (in identifier order).
|
public
boolean
|
#
deleteAttribute(string $instid,
integer $attrid,
string $commitComment = null)
Delete an attribute of an institution. It is not an error if the
attribute does not exist.
Delete an attribute of an institution. It is not an error if the
attribute does not exist.
Note that in this method, the commitComment is passed
as a query parameter, rather than as a form parameter, for greater
client compatibility.
[ HTTP: DELETE /api/v1/inst/{instid}/{attrid} ]
Parameters
- $instid
- [required] The ID of the institution.
- $attrid
- [required] The ID of the attribute to delete.
- $commitComment
[recommended] A short textual description of
the change made (will be visible on the history tab in the web
application).
Returns
boolean true if the attribute was deleted by this method, or
false if it did not exist.
|
public
IbisAttribute
|
#
getAttribute(string $instid,
integer $attrid)
Get a specific attribute of an institution.
Get a specific attribute of an institution.
[ HTTP: GET /api/v1/inst/{instid}/{attrid} ]
Parameters
- $instid
- [required] The ID of the institution.
- $attrid
- [required] The ID of the attribute to fetch.
Returns
|
public
IbisAttribute
|
#
updateAttribute(string $instid,
integer $attrid,
IbisAttribute $attr,
string $commitComment = null)
Update an attribute of an institution.
Update an attribute of an institution.
The attribute's value, binaryData, comment and effective date fields
will all be updated using the data supplied. All other fields will be
left unchanged.
To avoid inadvertently changing fields of the attribute, it is
recommended that InstitutionMethods::getAttribute() be used to
retrieve the current value of the attribute, before calling this
method with the required changes.
[ HTTP: PUT /api/v1/inst/{instid}/{attrid} ]
Parameters
- $instid
- [required] The ID of the institution.
- $attrid
- [required] The ID of the attribute to update.
- $attr
- [required] The new attribute values to apply.
- $commitComment
[recommended] A short textual description of
the change made (will be visible on the history tab in the web
application).
Returns
|