Workgroup AWS API Gateway
The workgroup web service provides a programmatic way to perform all of the same transactions that can be done in Workgroup Manager.
This includes:
- Search for a workgroup by name
- Search for workgroups by an identifier (Certificate, Person or Workgroup Name)
- Getting the details of a workgroup
- Creating and deleting a new workgroup from an existing stem
- Updating workgroup attributes
- Getting the privgroup of a workgroup
- Getting the workgroup integrations linkage of a workgroup
- Adding and deleting members
- Adding and deleting administrators
- Adding and delete workgroup integration linkage
How to get started with the Workgroup API
Follow the Middleware and Integration Services Integration (MaIS) checklist for RESTful Web Services. If you need help, are not sure whether the Web APIs are the best method for integrating with the registry, or just have some questions, contact the MaIS team.
HTTP Status codes
| CODE | CONDITIONS | |
|---|---|---|
| 200 OK | The usual successful return code. | |
| 201 OK | The usual successful return code for a create (POST). | |
| 400 Bad Request | Missing required parameters or identifier is in wrong format. | |
| 401 Authorization Required | The request was made without a certificate. | |
| 403 Access Denied | The request was made without avalid certificate. | |
| 404 Not Found | The record you're looking for doesn't exist. | |
| 500 Internal Server Error | Something broke with our code. Please tell us about it. | |
Error handling
Workgroup API sends error status via standard HTTP status codes (4xx) and always returns a Json document detailing the error. For example, when a client makes a call to update a workgroup filter with no supported filter value, the system will return the following Json error document:
Note: A 200 OK status code may be received because the call successfully gave a back an expected error response.
{
"notification": "Unupported PRIVGROUP value of MAYBE. Supported values are TRUE, FALSE",
"code": 400,
"message": "Bad Request",
"status": 400
}
Search workgroup by name
| Description | Retrieve a list of active workgroups based on {SEARCH STRING}. If no wildcards are used then it will search for an exact match of the {SEARCH STRING}. You cannot start with a wildcard. If timeout happens then increase the search string characters before the wildcard. Note: Private workgroups are not shown unless your CERT is added as an admin. | |
| URL: | https://mais.suapi.stanford.edu/workgroups/v2/api/search/{SEARCH STRING} | |
| Method: | GET | |
| Returns: | 200 OK | JSON Single |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| Input sample: | https://mais.suapi.stanford.edu/workgroups/v2/api/search/mais* | |
| Output sample: | Status: 200 Content-Type: application/json { "search" : "{SEARCH STRING}", "results": [ { "name": "mais:staff", "description": "Staff of AS/Middleware and Integration Services", "integrations": [{ "GOOGLE": "mais-staff" }, { "MAILING_LIST": "mais-all-staff" } ], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "memberCount": "8" }, { "name": "workgroup:mais", "description": "Staff of AS/Middleware and Integration Services", "integrations": [" {"PTS": "workgroup:mais" } ], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "memberCount": "8" } ] } | |
Search for workgroup by certificate, person or workgroup name
| Description | Retrieve a list of active workgroups where the identifier of that type (Certificate, Person or Workgroup) is a member or administrator including where the identifier is nested. Note: Private workgroups are not shown unless your CERT is added as an admin. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api or https://mais.suapi.stanford.edu/workgroups/v2/api?type={CERTIFICATE | USER | WORKGROUP}&id={input value}&lite={TRUE | FALSE } | |
| Method | GET | |
| Fields | type | CERTIFICATE | USER | WORKGROUP |
| id | Identifier value | |
| lite | TRUE | FALSE | |
| Returns | 200 OK | JSON Single |
| 400 Bad Request | Type parameter value doesn't exist | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type" : "USER" "id": "etlouie", } { "type" : "WORKGROUP" "id": "mais:staff" } { "type" : "USER" "id": "etlouie", "lite": "TRUE." } | |
| Output Sample | Status: 200 Content-Type: application/json { "type": "WORKGROUP", "id": "mais:staff", "members_count": 2, "members": [ { "name": "asview:mais-admin-prd", "description": "Workgroup for SUNAC access to MAIS PRD env", "integrations": [{ "MAILING_LIST": "mais-all-staff" }], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "memberCount": "5" }, { "name": "deviceregistry:mydevices-search", "description": "My Devices Search tab access", "integrations": [], "lastUpdate": "22-JUL-2019", "lastUpdate_by": "workgroup_maint", "memberCount": "193"} ], "administrators_count": 1, "administrators": [ { "name": "deviceregistry:mydevices-search", "description": "My Devices Search tab access", "integrations": [], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "memberCount": "193" } ] } LITE OUTPUT: Status: 200 Content-Type: application/json { "type": "WORKGROUP", "id": "mais:staff", "members_count": 2, "members": [ "asview:mais-admin-prd", "deviceregistry:mydevices-search" ], "administrators_count": 1, "administrators": [ "deviceregistry:mydevices-search" ] } | |
Get workgroup
| Description | Retrieve information on an active workgroup including integration, members and administrators | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name} | |
| Method | GET | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Requested resource is inactive | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Output Sample | Status: 200 Content-Type: application/json { "name": "mais:staff", "description": "Staff of AS/Middleware and Integration Services", "filter": "NONE", "visibility": "STANFORD", "reusable": "TRUE", "privgroup": "TRUE", "integrations": [{ "GOOGLE": "mais-staff" }, { "MAILING_LIST": "mais-all-staff" }], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "members": [ { "type": "PERSON","id": "chowhan", "name": "Chowhan, Sangeetha" }, { "type": "PERSON", "id": "hlclark", "name": "Clark, Helen" }, { "type": "WORKGROUP", "id": "workgroup:mais", "name": "workgroup:mais" }, { "type": "CERTIFICATE", "id": "www.stanford.edu", "name": "www.stanford.edu" } ], "administrators" : [ { "type": "PERSON", "id": "smarella", "name": "Marella, Sameer" }, { "type": "WORKGROUP", "id": "workgroup:mais-owners", "name": "workgroup:mais-owners" } ] } | |
If the authenticated user is a workgroup administrator, the returned JSON document includes both public (description, filter, visibility, privgroup, reusable) and private (members, administrators) information. Otherwise, only public information is included. Please note that "authenticated user" may refer to a certificate name, in which case the certificate needs to be configured as a workgroup administrator.
Create workgroup
| Description | Create a new workgroup, where the name is limited to 60 characters or less | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name} or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}?description={description}&filter={filter}&reusable={reusable}&visibility={visibi lity}&privgroup={privgroup} | |
| Method | POST | |
| Fields | description*
| If the workgroup description contains more than 255 characters, only the first 255 characters are used. *Cannot be empty or blank. |
| filter | ACADEMIC_ADMINISTRATIVE | STUDENT | FACULTY | STAFF | FACULTY_STAFF | FACULTY_STUDENT | STAFF_STUDENT | FACULTY_STAFF_STUDENT | NONE | |
| reusable | TRUE | FALSE | |
| visibility | PRIVATE | STANFORD | |
| privgroup | TRUE | FALSE | |
| Returns | 201 Created | JSON |
| 400 Bad Request | Bad or missing input data | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| 409 Conflict | Resource already exists | |
| Input Sample | { "description" : "Staff of AS/Middleware and Integration Services", "reusable" : "TRUE", "privgroup" : "FALSE", } | |
| Output Sample | Status: 201 Content-Type: application/json { "name": "mais:staff", "description": "Staff of AS/Middleware and Integration Services", "filter": "NONE", "visibility": "STANFORD", "reusable": "TRUE", "privgroup": "FALSE", "integrations": [], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "members": [], "administrators" : [ { "type" : "PERSON", "id" : "etlouie", "name" : "Louie, Edward", } ] } | |
If the authenticated user is a workgroup administrator, the returned JSON document includes both public (description, filter, visibility, privgroup, reusable) and private (members, administrators) information. Otherwise, only public information is included. Please note that "authenticated user" may refer to a certificate name, in which case the certificate needs to be configured as a workgroup administrator.
Update workgroup
| Description | Update information of a workgroup. The returning JSON will be the return the same information as if the user called the Get Workgroup By Name API call. You only need to specify the fields you wish to update. If no fields are passed then nothing is updated. Adding and Removing Members or Administrators or Linking and Unlinking Integration Points are not available in this API, there are separate API end points to perform those functionalities. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name} or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}?description={description}&filter={filter}&reusable={reusable}&visibility={visibility}&privgroup={privgroup} | |
| Method | PUT | |
| Fields | description*
| If the workgroup description contains more than 255 characters, only the first 255 characters are used. *Cannot be empty or blank. |
| filter | ACADEMIC_ADMINISTRATIVE | STUDENT | FACULTY | STAFF | FACULTY_STAFF | FACULTY_STUDENT | STAFF_STUDENT | FACULTY_STAFF_STUDENT | NONE | |
| reusable | TRUE | FALSE | |
| visibility | PRIVATE | STANFORD | |
| privgroup | TRUE | FALSE | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Updatable field does not exist or bad input data | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "visibility": "STANFORD", "privgroup": "FALSE" } | |
| Output Sample | Status: 200 Content-Type: application/json { "name": "mais:staff", "description": "Staff of AS/Middleware and Integration Services", "filter": "NONE", "visibility": "STANFORD", "reusable": "TRUE", "privgroup": "FALSE", "integrations": [{ "GOOGLE": "mais-staff" }, { "MAILING_LIST": "mais-all-staff" }], "lastUpdate": "22-JUL-2019", "lastUpdateBy": "workgroup_maint", "members": [ { "type": "PERSON", "id": "chowhan", "name": "Chowhan, Sangeetha" }, { "type": "PERSON", "id": "hlclark", "name": "Clark, Helen" }, { "type": "WORKGROUP", "id": "workgroup:mais", "name": "workgroup:mais" }, { "type": "CERTIFICATE", "id": "www.stanford.edu", "name": "www.stanford.edu" } ], "administrators" : [ { "type": "PERSON", "id": "smarella", "name": "Marella, Sameer" }, { "type": "WORKGROUP", "id": "workgroup:mais-owners", "name": "workgroup:mais-owners" } ] } | |
If the authenticated user is a workgroup administrator, the returned JSON document includes both public (description, filter, visibility, privgroup, reusable) and private (members, administrators) information. Otherwise, only public information is included. Please note that "authenticated user" may refer to a certificate name, in which case the certificate needs to be configured as a workgroup administrator.
Delete workgroup
| Description | These active workgroups are marked inactive and are retained in the system for future reference, however all members and administrators will be removed. If you try to inactivate an inactive workgroup, you'll get a 404 Not Found error. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name} | |
| Method | DELETE | |
| Returns | 200 OK | JSON Regular |
| 400 Bad Request | Requested resource is inactive | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Output Sample | Status: 200 Content-Type: application/json { "status": "200", "code": "200", "message": "Deleted", "notification": "Workgroup: {workgroup-name} has been deleted and all members and administrators removed" } | |
Only workgroup administrators are allowed to operate on a workgroup. Please note that the certificate used to authenticate with the API needs to be configured as a workgroup administrator.
Get privilege group for a workgroup
| Description | Get Privilege Group Members/Administrators from a Workgroup. By default, if no Query Parameter or JSON body is used, the API will return both MEMBERS and ADMINISTRATORS within its own key. If the VISIBILITY is PRIVATE, then the caller's certificate must be an administrator otherwise you get the message "This is a Private Workgroup!" | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/privgroup or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/privgroup?role={ MEMBERS | ADMINISTRATORS} | |
| Method | GET | |
| Fields | role | MEMBERS | ADMINISTRATORS |
| Returns | 200 OK | JSON Single |
| 400 Bad Request | Role parameter value doesn't exist or Administrator Workgroup Name not allowed | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "role": "MEMBERS" } | |
| Output Sample | Status: 200 Content-Type: application/json { "name": "mais:staff", "members": [ { "name": "Louie, Edward ", "id": "etlouie", "lastUpdate": "22-JUL-2019" }, { "name": "Chowhan, Sangeetha", "id": "chowhan", "lastUpdate": "22-JUL-2019" } ], "administrators": [ { "name": "Chowhan, Sangeetha", "id": "chowhan", "lastUpdate": "22-JUL-2019" } ] } Status: 200 Content-Type: application/json { "name": "mais:staff", "message": "This is a private workgroup!" } | |
Get privilege group membership status for a REG ID in a workgroup:
| Description | Determine Privilege Group membership of a Reg ID of a workgroup. If the VISIBILITY is PRIVATE, then the caller's certificate must be an administrator otherwise you get the message "This is a Private Workgroup!" | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/privgroup/{workgroup}/{regid} or https://mais.suapi.stanford.edu/workgroups/v2/api/privgroup/{workgroup}/{regid}?role={ MEMBERS | ADMINISTRATORS } | |
| Method | GET | |
| Fields | role | MEMBERS | ADMINISTRATORS |
| Returns | 200 OK | JSON SINGLE |
| 400 Bad Request | Role parameter value doesn't exist | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "role": "MEMBERS" } | |
| Output Sample | Status: 200 Content-Type: application/json { "name" : "mais:staff", "sunetid": "etlouie", "role": "MEMBERS", "regid": "abc...", "membership": true } Status: 200 Content-Type: application/json { "name" : "mais:staff", "sunetid": ""<--- When there is no SUNet ID, "role": "MEMBERS", "regid": "abc...", "membership": false } Status: 200 Content-Type: application/json { "name" : "mais:staff", "sunetid": "etlouie", "role": "ADMINISTRATORS", "regid": "abc...", "membership": false } Status: 200 Content-Type: application/json { "name" : "mais:staff", "message": "This is a private workgroup!" } Status: 400 Content-Type: application/json { "notification": "Workgroup is inactive." "code": 400, "message": "Bad Request", "status": 400, } Status: 404 Content-Type: application/json { "notification": "No persistent workgroup found with name : mais:staff1 "status": 404, "code": 404, "message": "Not found" } | |
Add member to workgroup
| Description | Add an existing SUNet ID or workgroup to a workgroup as a member, with optional comment and a possible expiry date. If an expiry date is passed, the SUNet ID or workgroup will be removed after that date. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/members/{sunetid | workgroup-name} or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/members/{sunetid | workgroup-name}?type={ USER | WORKGROUP }&COMMENT=<text>&EXPIRYDT=<YYYY-MM-DD> | |
| Method | PUT | |
| Fields | type | USER | WORKGROUP |
| comment | optional free text | |
| expirydt | optional YYYY-MM-DD | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Duplicate resource request or Type parameter value doesn't exist | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type": "USER", "comment": <optional text">, "expirydt": "<optional YYYY-MM-DD" } | |
| Output Sample | Status: 200 Content-Type: application/json { "status": "200", "code": "200", "message": "Added", "notification": "{member|workgroup-name|certificate-name} was added as a member to the workgroup: {workgroup-name}" } | |
Only workgroup administrators are allowed to operate on a workgroup. Please note that the certificate used to authenticate with the API needs to be configured as a workgroup administrator.
Remove member from workgroup
| Description | Remove a member of type person or workgroup from a workgroup, with optional comment. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/members/{sunetid | workgroup-name} or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/members/{sunetid | workgroup-name}?type={ USER | WORKGROUP}&COMMENT=<text> | |
| Method | DELETE | |
| Fields | type | USER | WORKGROUP |
| comment | optional free text | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Type parameter value doesn't exist | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type": "USER", "comment": "optional text" } | |
| Output Sample | Status: 200 Content-Type: application/json { "status": "200", "code": "200", "message": "Removed", "notification": "{member|workgroup-name} was removed as a member from the workgroup: {workgroup-name}" } | |
Only workgroup administrators are allowed to operate on a workgroup. Please note that the certificate used to authenticate with the API needs to be configured as a workgroup administrator.
Get members from a workgroup or linked workgroup
| Description | Retrieves the members from a Workgroup or a Linked Workgroup, if the linkage exists. The resulting JSON will return back the name of the workgroup, members and the linkage name, if any. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/members or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/members?link={ GOOGLE | MAILING_LIST | PTS } | |
| Method | GET | |
| Fields | link | GOOGLE | MAILING_LIST | PTS |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Link parameter value doesn't exist or No Linkage Exists or | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type": "MAILING_LIST" } | |
| Output Sample | Status: 200 Content-Type: application/json { "status": 200, "name" : "mais:staff", "members": [ {"lastUpdate": "27-Feb-2019", "name": "Louie, Edward", "id": "etlouie", "type": "PERSON" }, {"lastUpdate": "01-Jan-1919", "name": "Clark, Helen", "id": "hlclark", "type": "PERSON" } ] } Status: 200 Content-Type: application/json { "status": 200, "name" : "mais:staff", "integration": "BOX", "link" : "mais-staff", "members": [ { "name": "Louie, Edward", "sunetid": "etlouie", "description": "Enterprise Technology, Senior Software Developer" }, { "name": "Clark, Helen", "sunetid": "hlclark", "description": "Enterprise Technology, IT Analyst" } ] } | |
Add administrator to a workgroup
| Description | Add an existing SUNet ID, workgroup or certificate to a workgroup as an administrator, with optional comment. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/administrators/{sunetid | workgroup-name | certificate-name} or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/administrators/{sunetid | workgroup-name | certificate-name}?type={ USER | WORKGROUP | CERTIFICATE }&COMMENT=<text> | |
| Method | PUT | |
| FIELDS | type | CERTIFICATE | USER | WORKGROUP |
| comment | optional free text | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Duplicate resource request or Role parameter value doesn't exist | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 | Requested resource not found | |
| Input Sample | { "type": "USER", "comment": "optional text" } | |
| Output Sample | Status: 200 Content-Type: application/json { "status": "200", "code": "200", "message": "Added", "notification": "{member|workgroup-name|certificate-name} was added as an administrators to the workgroup: {workgroup-name}" } | |
Only workgroup administrators are allowed to operate on a workgroup. Please note that the certificate used to authenticate with the API needs to be configured as a workgroup administrator.
Remove administrator from workgroup
| Description | Remove an administrator of type person, workgroup or certificate from a workgroup, with optional comment. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/administrators/{sunetid | workgroup-name | certificate-name} or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/administrators/{sunetid | workgroup-name | certificate-name}?type={ USER | WORKGROUP | CERTIFICATE }&COMMENT=<text> | |
| Method | DELETE | |
| Fields | type | CERTIFICATE | USER | WORKGROUP |
| comment | optional free text | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | The parameter value doesn't exist | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type": "USER", "comment": "optional text" } | |
| Output Sample | Status: 200 Content-Type: application/json { "status": "200", "code": "200", "message": "Removed", "notification": "{member|workgroup-name|certificate-name} was removed as an administrator from the workgroup: {workgroup-name}" } | |
Only workgroup administrators are allowed to operate on a workgroup. Please note that the certificate used to authenticate with the API needs to be configured as a workgroup administrator.
Note: Deleted workgroups and memberships are marked inactive and retained in the system for future reference.
Get administrators from a workgroup or linked workgroup
| Description | Retrieves the administrators from a Workgroup or a Linked Workgroup, if a linkage exists. The resulting JSON will return back the name of the workgroup, members and the linkage name if any. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/administrators or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/administrators?link={ GOOGLE | MAILING_LIST | PTS } | |
| Method | GET | |
| Fields | link | GOOGLE | MAILING_LIST | PTS |
| Returns | 200 OK and JSON Message | |
| 400 Bad Request | Link parameter value doesn't exist or No Linkage Exists | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type": "MAILING_LIST" } | |
| Output Sample | Status: 200 Content-Type: application/json { "status": 200, "name" : "mais:staff", "administrators": [ {"lastUpdate": "27-Feb-2019", "name": "Louie, Edward", "id": "etlouie", "type": "PERSON" }, {"lastUpdate": "01-Jan-1919", "name": "Clark, Helen", "id": "hlclark", "type": "PERSON" } ] } Status: 200 Content-Type: application/json { "status": 200, "name" : "mais:staff", "integration": "BOX", "link" : "mais-staff", "administrators": [ { "name": "Louie, Edward", "sunetid": "etlouie", "description": "Enterprise Technology, Senior Software Developer" }, { "name": "Clark, Helen", "sunetid": "hlclark", "description": "Enterprise Technology, IT Analyst" } ] } | |
Get link integration for workgroup
| Description | Show only the integration link to a Workgroup. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/links | |
| Method | GET | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Link parameter value doesn't exist or No Linkage Exists | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Output Sample | Status: 200 Content-Type: application/json { "name" : "mais:staff", "integrations": [{ "BOX": "mais-staff" }, { "MAILING_LIST": "mais-all-staff" }] } | |
Add link integration for a workgroup
| Description | Add an integration link to a Workgroup, with optional comment. Using parameter Link requires a secondary parameter Value for Mailing List and PTS. All the other values are defaulted to the workgroup name which cannot be changed. Google currently has a 60 character limit so if you cannot create a link then the reason is that the workgroup could be greater than the allowed integration character length. The resulting JSON will return back the name of the workgroup and the current Integration Links of that workgroup. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/links or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/links?link={ GOOGLE | MAILING_LIST | PTS }&value={inputvalue}&COMMENT=<text> | |
| Method | PUT | |
| Fields | link | GOOGLE | MAILING_LIST | PTS |
| value | Required only for link value of MAILING_LIST and PTS. If entered for other link value, they shall be ignored. | |
| comment | optional free text | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Link parameter value doesn't exist or No Linkage Exists | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "link": "BOX", "comment": "optional text" } { "link": "MAILING_LIST", "value": "mymailinglist", "comment": "optional text" } | |
| Output Sample | Status: 200 Content-Type: application/json { "name" : "mais:staff", "integrations": [{ "BOX": "mais-staff" }, { "MAILING_LIST": "mais-all-staff" }] } | |
Remove link integration from a workgroup
| Description | Remove an integration link from a Workgroup, with optional comment. The resulting JSON will return back the name of the workgroup and the current Integration Links of that workgroup, if any. | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/links or https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/links?link={ BOX | GOOGLE | MAILING_LIST | PTS }&COMMENT=<text> | |
| Method | DELETE | |
| Fields | link | BOX | GOOGLE | MAILING_LIST | PTS |
| comment | optional free text | |
| Returns | 200 OK | JSON Singular |
| 400 Bad Request | Link parameter value doesn't exist or No Linkage Exists | |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Input Sample | { "type": "MAILING_LIST", "comment": "optional text" } | |
| Output Sample | Status: 200 Content-Type: application/json { "name" : "mais:staff", "integrations": [{ "BOX": "mais-staff" }, { "MAILING_LIST": "mais-all-staff" }] } | |
Only workgroup administrators are allowed to operate on a workgroup. Please note that the certificate used to authenticate with the API needs to be configured as a workgroup administrator.
Transactions/comments history
| Description | Get all the Transactions/Comment History from a workgroup | |
| URL | https://mais.suapi.stanford.edu/workgroups/v2/api/{workgroup-name}/history | |
| Method | GET | |
| Returns | 200 OK | JSON Singular |
| 401 Unauthorized | Not authenticated user | |
| 403 Forbidden | Does not have privileges to make this request | |
| 404 Not Found | Requested resource not found | |
| Output Sample | { "status": 200, "name" : <workgroup-name>, "active": true, "history":[ { "create_date": "YYYY-MM-DD" "comment":, "<text>" }, { "create_date": "YYYY-MM-DD" "comment":, "<text>" }, ... ] } | |
This API will return all the members, administrators and linkages added to the workgroup along with optional comments.
