swagger: '2.0' info: title: Advisors API description: Get primary advisors for a student. version: "0.0.1" host: api.oregonstate.edu schemes: - https basePath: /v1 security: - OAuth2: - full paths: /advisors: get: tags: - "advisors" description: "Get advisors for a student, either osu id or onid should be given." operationId: getAdvisors produces: - application/json parameters: - in: query name: id description: "OSU ID or ONID of a student" required: true type: string responses: "200": description: "Successful response" schema: $ref: '#/definitions/ResultObjects' "404": description: "Resource not found" schema: $ref: "#/definitions/Errors" "500": description: "Internal Server Error" schema: $ref: "#/definitions/Errors" securityDefinitions: OAuth2: type: oauth2 flow: application tokenUrl: https://api.oregonstate.edu/oauth2/token scopes: full: Full access to the API definitions: Attributes: properties: lastName: type: string description: Last name of the advisor. firstName: type: string description: First name of the advisor. username: type: string description: ONID username of advisor effectiveTermCode: type: string advisorTypeCode: type: string primaryIndicator: type: boolean Links: properties: self: type: string first: type: string last: type: string prev: type: string next: type: string ResultObjects: properties: links: $ref: "#/definitions/Links" data: type: array items: $ref: "#/definitions/ResourceObject" ResourceObject: properties: id: type: string type: description: "Resource type: advisor" type: string attributes: $ref: "#/definitions/Attributes" Error: properties: status: type: integer description: HTTP status code. developerMessage: type: string description: An error string aimed at developers. userMesage: type: string description: An error string aimed at end users. code: type: integer description: Error code. details: type: string description: A link to further information about the error. Errors: title: ArrayOfErrors type: array items: $ref: "#/definitions/Error"