diff --git a/docs/openapi.yaml b/docs/openapi.yaml deleted file mode 100644 index 6f87214d3..000000000 --- a/docs/openapi.yaml +++ /dev/null @@ -1,5833 +0,0 @@ -# -# See the NOTICE file distributed with this work for additional information -# regarding copyright ownership. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -openapi: 3.0.2 -info: - title: Breeding Insight API - description: API documentation for Breeding Insight - termsOfService: http://swagger.io/terms/ - contact: - email: np398@cornell.edu - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - version: 1.0.0 -externalDocs: - description: Find out more about Breeding Insight - url: http://www.breedinginsight.org -servers: - - url: http://localhost:8081/v1 -tags: - - name: users - description: User Management - - name: programs - description: Program Management - - name: roles - description: Role Information - - name: traits - description: Trait Management - - name: uploads - description: Upload Management -paths: - /users: - get: - tags: - - users - summary: Get list of all users in the system. - description: Get list of all users - operationId: getUsers - parameters: - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, email, orcid, systemRoles, programs, active, createdAt, updatedAt, createdByUserId, updatedByUserId] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/usersResponse' - examples: - arrayOfUsers: - $ref: '#/components/examples/arrayOfUsers' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - post: - tags: - - users - summary: Create user - description: Create a new user. - operationId: createUser - requestBody: - description: User information to create - content: - application/json: - schema: - $ref: '#/components/schemas/newUserRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/usersResponse_1' - example: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: d4f23375-0033-4d16-a62f-072e3a9198fa - orcid: null - name: Bob Smith - email: bob@bob.com - active: true - systemRoles: [ - { - id: "d4f23375-0033-4d16-a62f-072e3a9198fa", - domain: "admin" - } - ] - programRoles: [] - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "409": - description: Conflict - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Email already exists - /users/search: - post: - tags: - - users - parameters: - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, email, orcid, systemRoles, programs, active, createdAt, updatedAt, createdByUserId, updatedByUserId] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Search users - description: Search users using filters - operationId: searchUsers - requestBody: - description: Search request - content: - application/json: - schema: - type: object - properties: - filter: - type: array - items: - type: object - properties: - field: - type: string - enum: [name, email, orcid, systemRoles, programs, active, createdAt, updatedAt, createdByUserId, updatedByUserId] - value: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/usersResponse' - examples: - arrayOfUsers: - $ref: '#/components/examples/arrayOfUsers' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - /users/{id}: - get: - tags: - - users - summary: Get user information - description: Get a specific user - operationId: getUserById - parameters: - - name: id - in: path - description: The id of the user information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/usersResponse_1' - example: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: d4f23375-0033-4d16-a62f-072e3a9198fa - orcid: 1111-2222-3333-4444 - name: Bob Smith - email: bob@bob.com - active: true - systemRoles: [ - { - id: "d4f23375-0033-4d16-a62f-072e3a9198fa", - domain: "admin" - } - ] - programRoles: [ - { - active: false, - roles: [ - { - id: 20be0724-9451-46d5-a628-10fcb4a380e7, - domain: member - } - ], - program: { - id: c57225a8-6649-44e3-b2ec-7c0f84a31a11, - name: Test Program1, - abbreviation: test1, - objective: To test all the things - } - } - ] - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - put: - tags: - - users - summary: Update user information - description: Update user information with specified data. - operationId: updateUser - parameters: - - name: id - in: path - description: id of user to be updated - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: Updated user object - content: - application/json: - schema: - $ref: '#/components/schemas/newUserRequest' - example: - name: Bob Smith - email: bob@bob.com - required: true - responses: - "200": - description: OK - content: - application/json: - example: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: d4f23375-0033-4d16-a62f-072e3a9198fa - orcid: 1111-2222-3333-4444 - name: Bob Smith - email: bob@bob.com - active: true - systemRoles: [ - { - id: "d4f23375-0033-4d16-a62f-072e3a9198fa", - domain: "admin" - } - ] - programRoles: [ - { - active: true, - roles: [ - { - id: 20be0724-9451-46d5-a628-10fcb4a380e7, - domain: member - } - ], - program: { - id: 37935efa-4c0f-4269-8669-f78d21b26f04, - name: Test Program, - abbreviation: test, - objective: To test things - } - } - ] - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "409": - description: Conflict - Email Already Exists - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Email already exists - delete: - tags: - - users - summary: Deactivate user - description: Deactivate User - operationId: deleteUser - parameters: - - name: id - in: path - description: id of user to be deleted - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "422": - description: Unprocessable Entity - content: - application/json: - schema: - type: string - - /users/{id}/roles: - put: - tags: - - users - summary: Update user system roles - description: Update user system roles - operationId: updateUserRoles - parameters: - - name: id - in: path - description: id of user to be updated - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: Updated system roles - content: - application/json: - schema: - $ref: '#/components/schemas/updateSystemRolesRequest' - example: - systemRoles: [ - { - id: "d4f23375-0033-4d16-a62f-072e3a9198fa", - domain: "admin" - } - ] - required: true - responses: - "200": - description: OK - content: - application/json: - example: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: d4f23375-0033-4d16-a62f-072e3a9198fa - orcid: 1111-2222-3333-4444 - name: Bob Smith - email: bob@bob.com - active: true - systemRoles: [ - { - id: "d4f23375-0033-4d16-a62f-072e3a9198fa", - domain: "admin" - } - ] - programRoles: [] - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /users/{userId}/resend-email: - put: - tags: - - users - summary: Resend account activation email to user - description: Resend account activation email to user - parameters: - - name: userId - in: path - description: The id of the user to send the email to. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs: - get: - tags: - - programs - summary: Get list of all programs in the system. - description: Get list of all programs - parameters: - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, key, abbreviation, objective, documentationUrl, active, createdAt, updatedAt, speciesId, speciesName, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName, brapiUrl, numUsers] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - operationId: getPrograms - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programsResponseResult' - examples: - programExample1: - $ref: '#/components/examples/arrayOfPrograms' - - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - - post: - tags: - - programs - summary: Create program - description: Create a new program. - operationId: createProgram - requestBody: - description: Program information to create - content: - application/json: - schema: - $ref: '#/components/schemas/updateProgramRequest' - examples: - createProgramRequest: - $ref: '#/components/examples/updateProgramRequestExample' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programsResponseSingle' - examples: - singleProgram: - $ref: '#/components/examples/singleProgram' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "409": - description: Conflict - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Email already exists - /programs/{id}: - get: - tags: - - programs - summary: Get program information - description: Get a specific program - operationId: getProgramById - parameters: - - name: id - in: path - description: The id of the program information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programsResponseSingle' - examples: - singleProgram: - $ref: '#/components/examples/singleProgram' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - put: - tags: - - programs - summary: Update program information - description: Update program information with specified data. - operationId: updateProgram - parameters: - - name: id - in: path - description: id of program to be updated - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: Updated program object - content: - application/json: - schema: - $ref: '#/components/schemas/updateProgramRequest' - examples: - updateProgramRequestExample: - $ref: '#/components/examples/updateProgramRequestExample' - required: true - responses: - "200": - description: OK - content: - application/json: - examples: - singleProgram: - $ref: '#/components/examples/singleProgram' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "409": - description: Conflict - Email Already Exists - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Email already exists - /programs/archive/{id}: - delete: - tags: - - programs - summary: Archive program - description: Archives the indicated program - operationId: deleteProgram - parameters: - - name: id - in: path - description: id of program to be archived - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/search: - post: - tags: - - programs - parameters: - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, key, abbreviation, objective, documentationUrl, active, brapiUrl, numUsers, createdAt, updatedAt, speciesId, speciesName, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Search programs - description: Search programs using filters - operationId: searchPrograms - requestBody: - description: Search request - content: - application/json: - schema: - type: object - properties: - filter: - type: array - items: - type: object - properties: - field: - type: string - enum: [name, key, abbreviation, objective, documentationUrl, active, brapiUrl, numUsers, createdAt, updatedAt, speciesId, speciesName, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - value: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programsResponseResult' - examples: - programExample1: - $ref: '#/components/examples/arrayOfPrograms' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - /programs/{id}/users: - get: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, email, roles, active, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Get list of all users in the specified program - description: Get list of all users in program - operationId: getProgramUsers - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programUserResponseResult' - examples: - programUserExample1: - $ref: '#/components/examples/arrayOfProgramUsers' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - post: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - summary: Create a user in specified program - description: Add user to program if they exist in the system, otherwise create new user and add - operationId: createProgramUser - requestBody: - description: User information to create - content: - application/json: - schema: - $ref: '#/components/schemas/newProgramUserRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programUserResponse' - examples: - programUserExample2: - $ref: '#/components/examples/singleProgramUser' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "409": - description: Conflict - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Email already exists - /programs/{id}/users/search: - post: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, email, roles, active, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Search program users - description: Search program users using filters - operationId: searchProgramusers - requestBody: - description: Search request - content: - application/json: - schema: - type: object - properties: - filter: - type: array - items: - type: object - properties: - field: - type: string - enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - value: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programUserResponseResult' - examples: - programUserExample1: - $ref: '#/components/examples/arrayOfProgramUsers' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - "404": - $ref: '#/components/responses/404NotFound' - /programs/{id}/users/{userId}: - get: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - - name: userId - in: path - description: The id of the user information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - summary: Get specified user in the specified program - description: Get user in the program - operationId: getProgramUser - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programUserResponse' - examples: - singleProgramUser: - $ref: '#/components/examples/singleProgramUser' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - put: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program information that needs to be updated. - required: true - style: simple - explode: false - schema: - type: string - - name: userId - in: path - description: The id of the user information that needs to be updated. - required: true - style: simple - explode: false - schema: - type: string - summary: Update specified user in the specified program - description: Update user in the program - operationId: putProgramUser - requestBody: - description: Program user information to update - content: - application/json: - schema: - $ref: '#/components/schemas/newProgramUserRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/programUserResponse' - examples: - singleProgramUser: - $ref: '#/components/examples/singleProgramUser' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - delete: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - - name: userId - in: path - description: The id of the user - required: true - style: simple - explode: false - schema: - type: string - summary: Deactivates the user in the specified program - description: Deactivates the user in the specified program - operationId: deleteProgramUser - responses: - "200": - description: OK - - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - - /programs/{id}/locations: - get: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Get list of all locations in the specified program - description: Get list of all locations in program - operationId: getProgramLocations - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/locationsResponse' - examples: - locationsExample1: - $ref: '#/components/examples/arrayOfLocations' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - post: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - summary: Create a location in specified program - description: Add location to the program - operationId: createProgramLocation - requestBody: - description: Location information to create - content: - application/json: - schema: - $ref: '#/components/schemas/newProgramLocationRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/locationsResponseResult' - example: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: d2263532-1fa3-49a6-9a66-957f313c8ed2 - country_name: United States of America - country_alpha_2_code: US - country_alpha_3_code: USA - environment_type: field - accessibility: public - topography: valley - name: Nick's Field - abbreviation: NF - coordinates: { - "geometry": { - "coordinates": [ - -76.506042, - 42.417373, - 123 - ], - "type": "Point" - }, - "type": "Feature" - } - coordinate_uncertainty: 0 - coordinate_description: Northwest corner of field - slope: 1 - exposure: none - documentation_url: http://www.nick.com - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "409": - description: Conflict - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Email already exists - /programs/{id}/locations/search: - post: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Search programs - description: Search programs using filters - operationId: searchProgramLocations - requestBody: - description: Search request - content: - application/json: - schema: - type: object - properties: - filter: - type: array - items: - type: object - properties: - field: - type: string - enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - value: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/locationsResponse' - examples: - locationsExample1: - $ref: '#/components/examples/arrayOfLocations' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - "404": - $ref: '#/components/responses/404NotFound' - - /programs/{id}/locations/{locationId}: - get: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - - name: locationId - in: path - description: The id of the location - required: true - style: simple - explode: false - schema: - type: string - summary: Get specified location in the specified program - description: Get location in the program - operationId: getProgramLocation - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/locationsResponseSingle' - examples: - locationsExample1: - $ref: '#/components/examples/singleLocation' - - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - put: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program information that needs to be updated. - required: true - style: simple - explode: false - schema: - type: string - - name: locationId - in: path - description: The id of the location - required: true - style: simple - explode: false - schema: - type: string - summary: Update specified location in the specified program - description: Update location in the program - operationId: putLocation - requestBody: - description: Program location information to update - content: - application/json: - schema: - $ref: '#/components/schemas/newProgramLocationRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/locationsResponseSingle' - examples: - singleProgramLocation: - $ref: '#/components/examples/singleLocation' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - delete: - tags: - - programs - parameters: - - name: id - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - - name: locationId - in: path - description: The id of the location - required: true - style: simple - explode: false - schema: - type: string - summary: Remove location from the specified program - description: Remove location from the specified program - operationId: deleteProgramLocation - responses: - "200": - description: OK - - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/roles: - get: - tags: - - roles - summary: Get list of all roles in the system. - description: Get list of all roles - operationId: getRoles - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/rolesResponse' - examples: - arrayOfRoles: - $ref: '#/components/examples/arrayOfRoles' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - /programs/roles/{id}: - get: - tags: - - roles - summary: Get role information - description: Get a specific role - operationId: getRoleById - parameters: - - name: id - in: path - description: The id of the role information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/rolesResponseSingle' - examples: - singleRole: - $ref: '#/components/examples/singleRole' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /roles: - get: - tags: - - roles - summary: Get list of all system roles in the system. - description: Get list of all system roles - operationId: getSystemRoles - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/rolesResponse' - examples: - arrayOfRoles: - $ref: '#/components/examples/arrayOfSystemRoles' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - /roles/{id}: - get: - tags: - - roles - summary: Get system role information - description: Get a specific system role - operationId: getSystemRoleById - parameters: - - name: id - in: path - description: The id of the system role information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/rolesResponseSingle' - examples: - singleSystemRole: - $ref: '#/components/examples/singleSystemRole' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/{programId}/traits: - get: - tags: - - traits - summary: Get all traits in a given program - description: Get all traits in a given program - operationId: getTraits - parameters: - - name: programId - in: path - description: Id of program to get traits for - required: true - style: simple - explode: false - schema: - type: string - - name: full - in: query - description: True = get detailed properties of traits. False = get only base properties of trait. - required: false - explode: false - schema: - type: boolean - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/multipleTraitsResponse' - examples: - multipleTraitsResponse: - $ref: '#/components/examples/arrayOfTraits' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - post: - tags: - - traits - summary: Create a list of traits - description: Create a list of traits in a given program - operationId: postTraits - parameters: - - name: programId - in: path - description: Id of program to get traits for - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: New trait object - content: - application/json: - schema: - $ref: '#/components/schemas/arrayOfNewTraits' - example: - - traitName: "Test Trait" - traitClass: "morphological" - attribute: "height" - defaultValue: "defaultValue" - mainAbbreviation: "t1" - abbreviations: ["t1","t2"] - synonyms: ["stalk height"] - programObservationLevel: - name: "Plant" - method: - methodClass: "Counting" - description: "A test method" - formula: "a^2+b^2=c^2" - scale: - scaleName: "Test Scale" - dataType: "Numerical" - decimalPlaces: 3 - validValueMax: 9999 - validValueMin: 1 - categories: - - label: "test1" - value: "value1" - - label: "test2" - value: "value2" - tags: ["favorites", "leaf length"] - fullName: "Test Trait Full Name" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/multipleTraitsResponse' - examples: - multipleTraitsResponse: - $ref: '#/components/examples/arrayOfTraits' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "422": - description: Multi-error UnprocessableEntity - content: - application/json: - schema: - $ref: "#/components/schemas/validatorErrorResponse" - example: - rowErrors: - - rowIndex: 1 - errors: - - field: "programObservationLevel" - errorMessage: "Missing trait name" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - field: "abbreviations" - errorMessage: "Abbreviations already exist" - httpStatus: "CONFLICT" - httpStatusCode: 409 - - field: "scale.dataType" - errorMessage: "Missing scale class" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - field: "scale.categories" - errorMessage: "Scale categories contain errors" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - rowErrors: - - rowIndex: 0 - errors: - - field: "scale.categories.label" - errorMessage: "Missing value" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - field: "scale.categories.value" - errorMessage: "Missing value" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - put: - tags: - - traits - summary: Edit a list of traits - description: Edit a list of traits in a given program - operationId: putTraits - parameters: - - name: programId - in: path - description: Id of program to get traits for - required: true - style: simple - explode: false - schema: - type: string - requestBody: - description: Edited trait object - content: - application/json: - schema: - $ref: '#/components/schemas/arrayOfEditedTraits' - example: - - traitId: "8b2ed0b3-f0bf-4942-8992-4bb5a9876c3a" - traitName: "Test Trait" - traitClass: "morphological" - attribute: "height" - defaultValue: "defaultValue" - mainAbbreviation: "t1" - abbreviations: ["t1","t2"] - synonyms: ["stalk height"] - programObservationLevel: - name: "Plant" - method: - methodClass: "Counting" - description: "A test method" - formula: "a^2+b^2=c^2" - scale: - scaleName: "Test Scale" - dataType: "Numerical" - decimalPlaces: 3 - validValueMax: 9999 - validValueMin: 1 - categories: - - label: "test1" - value: "value1" - - label: "test2" - value: "value2" - tags: ["favorites", "leaf length"] - fullName: "Test Trait Full Name" - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/multipleTraitsResponse' - examples: - multipleTraitsResponse: - $ref: '#/components/examples/arrayOfTraits' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "405": - description: Method Not Allowed - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Trait has associated observations and cannot be updated - "422": - description: Multi-error UnprocessableEntity - content: - application/json: - schema: - $ref: "#/components/schemas/validatorErrorResponse" - example: - rowErrors: - - rowIndex: 1 - errors: - - field: "programObservationLevel" - errorMessage: "Missing trait name" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - field: "abbreviations" - errorMessage: "Abbreviations already exist" - httpStatus: "CONFLICT" - httpStatusCode: 409 - - field: "scale.dataType" - errorMessage: "Missing scale class" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - field: "scale.categories" - errorMessage: "Scale categories contain errors" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - rowErrors: - - rowIndex: 0 - errors: - - field: "scale.categories.label" - errorMessage: "Missing value" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - field: "scale.categories.value" - errorMessage: "Missing value" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - /programs/{programId}/traits/{traitId}/archive: - put: - tags: - - traits - summary: Archive/Restore a trait - description: Archive/Restore a trait in a given program - operationId: archiveTraits - parameters: - - name: programId - in: path - description: Id of program to get traits for - required: true - style: simple - explode: false - schema: - type: string - - name: traitId - in: path - description: Id of trait to activate/inactivate - required: true - style: simple - explode: false - schema: - type: string - - name: active - in: query - description: Boolean indicate whether to archive/restore trait. Set to false for archiving if not specified. - required: false - explode: false - schema: - type: boolean - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/singleTraitResponse' - examples: - singleTraitResponse: - $ref: '#/components/examples/singleTrait' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/{programId}/traits/search: - post: - tags: - - traits - parameters: - - name: programId - in: path - description: Id of program to get traits for - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Search traits - description: Search traits using filters - operationId: searchTraits - requestBody: - description: Search request - content: - application/json: - schema: - type: object - properties: - filter: - type: array - items: - type: object - properties: - field: - type: string - enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - value: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/multipleTraitsResponse' - examples: - multipleTraitsResponse: - $ref: '#/components/examples/arrayOfTraits' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - "404": - $ref: '#/components/responses/404NotFound' - /programs/{programId}/traits/{traitId}: - get: - tags: - - traits - summary: Get a single trait by traitId - description: Gets a single trait with full level of detail - operationId: getTrait - parameters: - - name: programId - in: path - description: Id of program to get trait in - required: true - style: simple - explode: false - schema: - type: string - - name: traitId - in: path - description: Id of trait to get trait for - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/singleTraitResponse' - examples: - singleTraitResponse: - $ref: '#/components/examples/singleTrait' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/{programId}/traits/{traitId}/editable: - get: - tags: - - traits - summary: Check if a trait is editable - description: If observations are associated with trait, it is not editable - operationId: getTraitEditable - parameters: - - name: programId - in: path - description: Id of program to get trait in - required: true - style: simple - explode: false - schema: - type: string - - name: traitId - in: path - description: Id of trait to get trait for - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/traitEditableResponse' - examples: - traitEditableResponse: - $ref: '#/components/examples/editable' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/{programId}/traits/tags: - get: - tags: - - traits - parameters: - - name: programId - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - summary: Get all tags used for traits in a program - description: Get all tags used for traits in a program - operationId: getTraitTags - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/tagsResponse' - examples: - tagsResponse: - $ref: '#/components/examples/tagsResponse' - '401': - $ref: '#/components/responses/401Unauthorized' - "404": - $ref: '#/components/responses/404NotFound' - /programs/{programId}/observation-levels: - get: - tags: - - observation levels - parameters: - - name: programId - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - summary: Get all observation levels in the program - description: Get all observation levels in the program - operationId: getObservationLevels - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/observationLevelResponse' - examples: - observationLevelsResponse: - $ref: '#/components/examples/observationLevelResponse' - '401': - $ref: '#/components/responses/401Unauthorized' - "404": - $ref: '#/components/responses/404NotFound' - /programs/{programId}/trait-upload: - put: - tags: - - uploads - parameters: - - name: programId - in: path - description: The id of the program - required: true - style: simple - explode: false - schema: - type: string - summary: Upload the trait csv/xls/xlsx file data - description: Upload trait file data for the user making the request in the indicated program. Only one trait upload at a time can exist per user per program. - operationId: putTraitUpload - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - encoding: - file: - contentType: text/csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/traitUploadResponse' - examples: - traitUploadResponse: - $ref: '#/components/examples/traitUploadData' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - "422": - description: Multi-error UnprocessableEntity - content: - application/json: - schema: - $ref: "#/components/schemas/validatorErrorResponse" - example: - rowErrors: - - rowIndex: 2 - errors: - - column: "Trait level" - errorMessage: "Missing trait name" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - column: "Trait abbreviations" - errorMessage: "Abbreviations already exist" - httpStatus: "CONFLICT" - httpStatusCode: 409 - - column: "Scale class" - errorMessage: "Missing scale class" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - get: - tags: - - uploads - summary: Get the trait upload data - description: Gets the trait upload data for the specified program and requesting user - operationId: getTraitUpload - parameters: - - name: programId - in: path - description: Id of program to get trait upload in - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/traitUploadResponse' - examples: - traitUploadResponse: - $ref: '#/components/examples/traitUploadData' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - delete: - tags: - - uploads - parameters: - - name: programId - in: path - description: Id of program to delete trait upload from - required: true - style: simple - explode: false - schema: - type: string - summary: Delete trait upload - description: Delete trait upload for the specified program and requesting user - operationId: deleteTraitUpload - responses: - "200": - description: OK - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /programs/{programId}/trait-upload/search: - post: - tags: - - uploads - parameters: - - name: programId - in: path - description: Id of program to get trait upload for - required: true - style: simple - explode: false - schema: - type: string - - in: query - description: Field to sort the results by. - name: sortField - required: false - schema: - type: string - enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/sortOrder' - summary: Search trait upload - description: Search trait upload using filters - operationId: searchTraitUpload - requestBody: - description: Search request - content: - application/json: - schema: - type: object - properties: - filter: - type: array - items: - type: object - properties: - field: - type: string - enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] - value: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/traitUploadResponse' - examples: - traitUploadResponse: - $ref: '#/components/examples/traitUploadData' - '400': - $ref: '#/components/responses/400BadRequest' - '401': - $ref: '#/components/responses/401Unauthorized' - "404": - $ref: '#/components/responses/404NotFound' - /programs/{programId}/trait-upload/{traitUploadId}: - post: - tags: - - uploads - parameters: - - name: programId - in: path - description: Id of program to get trait upload for - required: true - style: simple - explode: false - schema: - type: string - - name: traitUploadId - in: path - description: Id of the trait upload to save - required: true - style: simple - explode: false - schema: - type: string - summary: Confirm and save existing trait upload as traits - description: Confirm and save existing trait upload as traits - operationId: postTraitUpload - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/multipleTraitsResponse' - examples: - multipleTraitsResponse: - $ref: '#/components/examples/arrayOfTraits' - '401': - $ref: '#/components/responses/401Unauthorized' - '404': - $ref: '#/components/responses/404NotFound' - '403': - $ref: '#/components/responses/403Forbidden' - '422': - description: Multi-error UnprocessableEntity - content: - application/json: - schema: - $ref: "#/components/schemas/validatorErrorResponse" - example: - rowErrors: - - rowIndex: 0 - errors: - - column: "Trait level" - errorMessage: "Missing trait name" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - - column: "Trait abbreviations" - errorMessage: "Abbreviations already exist" - httpStatus: "CONFLICT" - httpStatusCode: 409 - - column: "Scale class" - errorMessage: "Missing scale class" - httpStatus: "UNPROCESSABLE_ENTITY" - httpStatusCode: 422 - /health: - get: - tags: - - server management - summary: checks if the server is up and able to be contacted - description: checks if the server is up and able to be contacted - operationId: health - responses: - "200": - description: OK - content: - application/json: - example: - status: "UP" - /api-token: - get: - tags: - - token management - parameters: - - in: query - name: returnUrl - schema: - type: string - description: return url to redirect to - summary: Get api token - description: Get api token for user making the request - operationId: token - responses: - "303": - description: Redirect - /server-info: - get: - tags: - - server management - summary: return the server information about the running instance - description: return the server information, including the version of bi-api, and a link to to the release/commit of that version - operationId: getServerInfo - responses: - "200": - description: OK - content: - application/json: - example: - versionName: 0.1.0, - versionInfo: https://github.com/Breeding-Insight/bi-api/releases/tag/v0.1.0 - /countries: - get: - tags: - - countries - summary: Get list of all countries in the system. - description: Get list of all countries - operationId: getCountries - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/countriesResponse' - examples: - arrayOfCountries: - $ref: '#/components/examples/arrayOfCountries' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - /countries/{id}: - get: - tags: - - countries - summary: Get country information - description: Get a specific country - operationId: getCountryById - parameters: - - name: id - in: path - description: The id of the country information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/countriesResponseSingle' - examples: - singleCountry: - $ref: '#/components/examples/singleCountry' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /topography-options: - get: - tags: - - topography options - summary: Get list of all topography options in the system. - description: Get list of all topography options - operationId: getTopographyOptions - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/topographiesResponse' - examples: - arrayOfTopographies: - $ref: '#/components/examples/arrayOfTopographyOptions' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - /topography-options/{id}: - get: - tags: - - topography options - summary: Get topography option information - description: Get a specific topography option - operationId: getTopographyOptionById - parameters: - - name: id - in: path - description: The id of the topography option information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/topographyOptionsResponseSingle' - examples: - singleTopography: - $ref: '#/components/examples/singleTopographyOption' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /accessibility-options: - get: - tags: - - accessibility options - summary: Get list of all accessibility options in the system. - description: Get list of all accessibility options - operationId: getAccessibilityOptions - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/accessibilityOptionsResponse' - examples: - arrayOfAccessibilities: - $ref: '#/components/examples/arrayOfAccessibilityOptions' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - /accessibility-options/{id}: - get: - tags: - - accessibility options - summary: Get accessibility option information - description: Get a specific accessibility option - operationId: getAccessibilityOptionById - parameters: - - name: id - in: path - description: The id of the accessibility option information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/accessibilityOptionsResponseSingle' - examples: - singleAccessibility: - $ref: '#/components/examples/singleAccessibilityOption' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found - /environment-data-types: - get: - tags: - - environment data types - summary: Get list of all environment data types in the system. - description: Get list of all environment data types - operationId: getEnvironmentDataTypes - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/environmentDataTypesResponse' - examples: - arrayOfEnvironmentDataTypes: - $ref: '#/components/examples/arrayOfEnvironmentDataTypes' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - /environment-data-types/{id}: - get: - tags: - - environmentDataTypes - summary: Get environment data type information - description: Get a specific environment data type - operationId: getEnvironmentDataTypeById - parameters: - - name: id - in: path - description: The id of the environment data type information that needs to be fetched. - required: true - style: simple - explode: false - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/environmentDataTypesResponseSingle' - examples: - singleEnvironmentDataType: - $ref: '#/components/examples/singleEnvironmentDataType' - "400": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission - to perform this action - "404": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is - not found -components: - schemas: - metadata: - type: object - properties: - datafiles: - type: array - description: The datafiles key contains a list of file paths, which can - be relative or complete URLs. These files contain additional information - related to the returned object and can be retrieved by a subsequent call. - The empty list should be returned if no additional data files are present. - items: - type: string - - pagination: - $ref: '#/components/schemas/metadata_pagination' - status: - type: array - description: The status field contains a list of informational status messages - from the server. If no status is reported, an empty list should be returned. - See Error Reporting for more information. - items: - $ref: '#/components/schemas/status' - status: - required: - - message - - messageType - type: object - properties: - message: - type: string - description: A short message concerning the status of this request/response - messageType: - type: string - description: The logging level for the attached message - enum: - - DEBUG - - ERROR - - WARNING - - INFO - user: - type: object - properties: - id: - type: string - format: uuid - orcid: - type: string - name: - type: string - email: - type: string - active: - type: boolean - systemRoles: - type: object - properties: - id: - type: string - format: uuid - domain: - type: string - programRoles: - type: object - properties: - active: - type: boolean - roles: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - domain: - type: string - program: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - abbreviation: - type: string - objective: - type: string - country: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - alpha2Code: - type: string - alpha3Code: - type: string - topographyOption: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - accessibilityOption: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - environmentDataType: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - role: - type: object - properties: - id: - type: string - format: uuid - domain: - type: string - systemRole: - type: object - properties: - id: - type: string - format: uuid - domain: - type: string - programUser: - type: object - properties: - user: - $ref: '#/components/schemas/user' - roles: - type: array - description: Array of roles - items: - $ref: '#/components/schemas/role' - program: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - abbreviation: - type: string - objective: - type: string - program: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - key: - type: string - abbreviation: - type: string - objective: - type: string - documentation_url: - type: string - active: - type: boolean - brapiUrl: - type: string - numUsers: - type: integer - createdAt: - type: string - format: datetime - updatedAt: - type: string - format: datetime - species: - type: object - properties: - id: - type: string - format: uuid - commonName: - type: string - createdByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - updatedByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - location: - type: object - properties: - id: - type: string - format: uuid - country: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - alpha2Code: - type: string - alpha3Code: - type: string - environmentType: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - accessibility: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - topography: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - name: - type: string - abbreviation: - type: string - coordinates: - $ref: '#/components/schemas/geoJSON' - coordinateUncertainty: - type: number - coordinateDescription: - type: string - slope: - type: number - exposure: - type: string - documentationUrl: - type: string - createdAt: - type: string - format: datetime - updatedAt: - type: string - format: datetime - createdByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - updatedByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - geoJSON: - description: 'One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system. - Copied from RFC 7946 Section 3.1.1 - A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or - easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.' - properties: - geometry: - description: A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed. - discriminator: - mapping: - Point: '#/components/schemas/pointGeometry' - Polygon: '#/components/schemas/polygonGeometry' - propertyName: type - example: - coordinates: - - -76.506042 - - 42.417373 - - 123 - type: Point - oneOf: - - $ref: '#/components/schemas/pointGeometry' - - $ref: '#/components/schemas/polygonGeometry' - title: GeoJSON Geometry - type: object - type: - default: Feature - description: The literal string "Feature" - example: Feature - type: string - title: GeoJSON - type: object - pointGeometry: - description: 'Copied from RFC 7946 Section 3.1.1 - A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or - easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.' - properties: - coordinates: - $ref: '#/components/schemas/position' - type: - default: Point - description: The literal string "Point" - example: Point - type: string - type: object - polygon: - description: An array of linear rings - example: - - - - -77.456654 - - 42.241133 - - 494 - - - -75.414133 - - 41.508282 - - 571 - - - -76.506042 - - 42.417373 - - 123 - - - -77.456654 - - 42.241133 - - 346 - items: - $ref: '#/components/schemas/linearRing' - type: array - polygonGeometry: - description: "An array of Linear Rings. Each Linear Ring is an array of Points. \n\nA Point is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or\neasting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element." - properties: - coordinates: - $ref: '#/components/schemas/polygon' - type: - default: Polygon - description: The literal string "Polygon" - example: Polygon - type: string - type: object - position: - description: A single position - example: - - -76.506042 - - 42.417373 - - 123 - items: - type: number - minItems: 2 - type: array - linearRing: - description: An array of at least four positions where the first equals the last - example: - - - -77.456654 - - 42.241133 - - 494 - - - -75.414133 - - 41.508282 - - 571 - - - -76.506042 - - 42.417373 - - 123 - - - -77.456654 - - 42.241133 - - 346 - items: - $ref: '#/components/schemas/position' - minItems: 4 - type: array - newUserRequest: - type: object - properties: - name: - type: string - description: name of this user - email: - type: string - description: email address of this user - systemRoles: - type: array - description: Array of system role objects - items: - $ref: '#/components/schemas/systemRole' - newProgramUserRequest: - type: object - properties: - user: - type: object - properties: - id: - type: string - description: Id of user to assign to program - name: - type: string - description: Name of the user - email: - type: string - description: Email address of this user - required: - - id - roles: - type: array - description: Array of roles - items: - $ref: '#/components/schemas/role' - required: - - user - - roles - updateSystemRolesRequest: - type: object - properties: - systemRoles: - type: array - description: Array of system role objects - items: - $ref: '#/components/schemas/systemRole' - newProgramLocationRequest: - type: object - properties: - id: - type: string - format: uuid - country: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - alpha2Code: - type: string - alpha3Code: - type: string - environmentType: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - accessibility: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - topography: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - name: - type: string - abbreviation: - type: string - coordinates: - $ref: '#/components/schemas/geoJSON' - coordinateUncertainty: - type: number - coordinateDescription: - type: string - slope: - type: number - exposure: - type: string - documentationUrl: - type: string - usersResponse: - title: usersResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/usersResponse_result' - locationsResponse: - title: locationsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/locationsResponseResult' - locationsResponseSingle: - title: locationsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/location' - updateProgramRequest: - type: object - properties: - species: - type: object - properties: - id: - type: string - description: Id of species to assign to program - commonName: - type: string - description: Name of species - required: - - id - name: - type: string - description: name of program - abbreviation: - type: string - description: abbreviation for program name - objective: - type: string - description: program objective - documetation_url: - type: string - description: program documentation url - brapiUrl: - type: string - description: url of brapi service to store data at - required: - - species - - name - countriesResponse: - title: countriesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/countriesResponseResult' - countriesResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of countries - items: - $ref: '#/components/schemas/country' - countriesResponseSingle: - title: countriesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/country' - topographiesResponse: - title: topographiesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/topographiesResponseResult' - topographiesResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of topographies - items: - $ref: '#/components/schemas/topographyOption' - topographiesResponseSingle: - title: topographiesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/topographyOption' - accessibilitiesResponse: - title: accessibilitiesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/accessibilitiesResponseResult' - accessibilitiesResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of accessibilities - items: - $ref: '#/components/schemas/accessibilityOption' - accessibilitiesResponseSingle: - title: accessibilitiesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/accessibilityOption' - environmentTypesResponse: - title: environmentTypesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/environmentTypesResponseResult' - environmentTypesResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of environemnt types - items: - $ref: '#/components/schemas/environmentDataType' - environmentTypesResponseSingle: - title: environmentTypesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/location' - topographyOptionsResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of topographies - items: - $ref: '#/components/schemas/topographyOption' - topographyOptionsResponseSingle: - title: topographyOptionsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/topographyOption' - accessibilityOptionsResponse: - title: accessibilityOptionsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/accessibilityOptionsResponseResult' - accessibilityOptionsResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of accessibility options - items: - $ref: '#/components/schemas/accessibilityOption' - accessibilityOptionsResponseSingle: - title: accessibilityOptionsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/accessibilityOption' - environmentDataTypesResponse: - title: environmentDataTypesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/environmentDataTypesResponseResult' - environmentDataTypesResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of environemnt data types - items: - $ref: '#/components/schemas/environmentDataType' - environmentDataTypesResponseSingle: - title: environmentDataTypesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/environmentDataType' - rolesResponse: - title: rolesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/rolesResponseResult' - rolesResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of roles - items: - $ref: '#/components/schemas/role' - rolesResponseSingle: - title: rolesResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/role' - programsResponse: - title: programsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/programsResponseResult' - programsResponseSingle: - title: programsResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/program' - programUserResponse: - title: programUserResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/programUser' - - usersResponse_1: - title: usersResponse - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/user' - metadata_pagination: - type: object - properties: - currentPage: - type: integer - pageSize: - type: integer - totalCount: - type: integer - totalPages: - type: integer - description: The pagination object is applicable only when the payload contains - a "data" key. It describes the pagination of the data contained in the "data" - array, as a way to identify which subset of data is being returned. Pages - are zero indexed, so the first page will be page 0 (zero). - usersResponse_result: - required: - - data - type: object - properties: - data: - type: array - description: Array of users - items: - $ref: '#/components/schemas/user' - programUserResponseResult: - type: object - properties: - data: - type: array - description: Array of program users - items: - $ref: '#/components/schemas/programUser' - locationsResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of locations - items: - $ref: '#/components/schemas/location' - programsResponseResult: - required: - - data - type: object - properties: - data: - type: array - description: Array of programs - items: - $ref: '#/components/schemas/program' - multipleTraitsResponse: - required: - - data - type: object - properties: - data: - type: array - description: Array of traits - items: - $ref: '#/components/schemas/trait' - singleTraitResponse: - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/trait' - traitEditableResponse: - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/editable' - editable: - type: object - properties: - editable: - type: boolean - description: Indicate if trait is editable - trait: - type: object - properties: - id: - type: string - format: uuid - description: System id of the trait - traitName: - type: string - description: Trait display name - active: - type: boolean - description: Trait active status - createdAt: - type: string - format: datetime - updatedAt: - type: string - format: datetime - createdByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - updatedByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - traitClass: - type: string - example: "morphological" - attribute: - type: string - description: Attribute the trait is describing - example: height - defaultValue: - type: string - description: Default value of the trait - mainAbbreviation: - type: string - abbreviations: - type: array - items: - type: string - synonyms: - type: array - items: - type: string - programObservationLevel: - type: object - properties: - id: - type: string - format: uuid - description: System id of the observation level - name: - type: string - description: Name of the observation level - method: - type: object - properties: - methodClass: - type: string - description: - type: string - formula: - type: string - scale: - type: object - properties: - scaleName: - type: string - dataType: - type: string - decimalPlaces: - type: integer - categories: - type: array - items: - type: object - properties: - label: - type: string - value: - type: string - validValueMax: - type: integer - validValueMin: - type: integer - tags: - type: array - items: - type: string - fullName: - type: string - description: Full trait display name - traitUploadResponse: - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - $ref: '#/components/schemas/traitUpload' - traitUpload: - type: object - properties: - type: - type: string - description: Type of upload - data: - type: object - properties: - traitName: - type: string - description: Trait display name - active: - type: boolean - description: Trait active status - programObservationLevel: - type: object - properties: - id: - type: string - format: uuid - description: System id of the observation level - name: - type: string - description: Name of the observation level - active: - type: boolean - createdAt: - type: string - format: datetime - updatedAt: - type: string - format: datetime - method: - type: object - properties: - methodClass: - type: string - description: - type: string - formula: - type: string - scale: - type: object - properties: - scaleName: - type: string - dataType: - type: string - decimalPlaces: - type: integer - categories: - type: array - items: - type: object - properties: - label: - type: string - value: - type: string - validValueMax: - type: integer - validValueMin: - type: integer - mainAbbreviation: - type: string - abbreviations: - type: array - items: - type: string - synonyms: - type: array - items: - type: string - tags: - type: array - items: - type: string - fullName: - type: string - description: Full trait display name - createdAt: - type: string - format: datetime - updatedAt: - type: string - format: datetime - user: - $ref: '#/components/schemas/user' - program: - $ref: '#/components/schemas/program' - createdByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - updatedByUser: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - arrayOfNewTraits: - type: array - items: - $ref: '#/components/schemas/newTrait' - newTrait: - type: object - properties: - traitName: - type: string - description: Trait display name - traitClass: - type: string - example: "morphological" - attribute: - type: string - description: Attribute the trait is describing - example: height - defaultValue: - type: string - description: Default value of the trait - mainAbbreviation: - type: string - abbreviations: - type: array - items: - type: string - synonyms: - type: array - items: - type: string - programObservationLevel: - type: object - properties: - name: - type: string - description: Name of the observation level - method: - type: object - properties: - methodClass: - type: string - description: - type: string - format: UUID - formula: - type: string - format: UUID - scale: - type: object - properties: - scaleName: - type: string - format: datetime - dataType: - type: string - format: datetime - decimalPlaces: - type: integer - categories: - type: array - items: - type: object - properties: - label: - type: string - value: - type: string - validValueMax: - type: integer - validValueMin: - type: integer - tags: - type: array - items: - type: string - fullName: - type: string - description: Full trait display name - arrayOfEditedTraits: - type: array - items: - $ref: '#/components/schemas/editedTrait' - editedTrait: - type: object - required: - - traitId - properties: - traitId: - type: string - format: uuid - description: ID of the trait to edit - traitName: - type: string - description: Trait display name - traitClass: - type: string - example: "morphological" - attribute: - type: string - description: Attribute the trait is describing - example: height - defaultValue: - type: string - description: Default value of the trait - mainAbbreviation: - type: string - abbreviations: - type: array - items: - type: string - synonyms: - type: array - items: - type: string - programObservationLevel: - type: object - properties: - name: - type: string - description: Name of the observation level - method: - type: object - properties: - methodClass: - type: string - description: - type: string - format: UUID - formula: - type: string - format: UUID - scale: - type: object - properties: - scaleName: - type: string - format: datetime - dataType: - type: string - format: datetime - decimalPlaces: - type: integer - categories: - type: array - items: - type: object - properties: - label: - type: string - value: - type: string - validValueMax: - type: integer - validValueMin: - type: integer - tags: - type: array - items: - type: string - fullName: - type: string - description: Full trait display name - validatorErrorResponse: - type: object - properties: - rowErrors: - type: array - items: - type: object - properties: - rowIndex: - type: integer - description: "Row number in the uploaded file for the trait with errors." - errors: - type: array - items: - type: object - properties: - field: - type: string - description: "Field name that is the source of the error" - errorMessage: - type: string - description: "A description fo the error" - httpStatus: - type: string - description: "Text representation fo the error code" - httpStatusCode: - type: integer - description: "Http error code" - rowErrors: - type: array - items: - type: object - properties: - errors: - type: array - items: - type: object - properties: - field: - type: string - description: "Field name that is the source of the error" - errorMessage: - type: string - description: "A description fo the error" - httpStatus: - type: string - description: "Text representation fo the error code" - httpStatusCode: - type: integer - description: "Http error code" - observationLevelResponse: - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - createdAt: - type: string - format: datetime - updatedAt: - type: string - format: datetime - tagsResponse: - required: - - metadata - - result - type: object - properties: - metadata: - $ref: '#/components/schemas/metadata' - result: - type: object - properties: - data: - type: array - items: - type: string - responses: - "400BadRequest": - description: Bad Request - content: - application/json: - schema: - type: string - example: |- - ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object - ERROR - 2018-10-08T20:15:11Z - Invalid query parameter - ERROR - 2018-10-08T20:15:11Z - Required parameter is missing - "401Unauthorized": - description: Unauthorized - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization - token - "403Forbidden": - description: Forbidden - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - User does not have permission to - perform this action - "404NotFound": - description: Not Found - content: - application/json: - schema: - type: string - example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is not - found - securitySchemes: - orcid_auth: - type: oauth2 - flows: - implicit: - authorizationUrl: https://sandbox.orcid.org/oauth/authorize - scopes: - write:bi: modify - read:bi: read - api_key: - type: apiKey - name: api_key - in: header - examples: - arrayOfPrograms: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 - name: Bob Smith's Breeding Program - key: BSBP - abbreviation: BSBP - objective: To breed the best grapes in the world - documentationUrl: http://www.bobsbestbreeding.com - active: true - createdAt: "2020-03-09T09:57:35-04:00" - updatedAt: "2020-03-09T09:59:25-04:00" - species: - id: b3764582-e1ac-4c5c-85c4-b76bae0a18d2 - commonName: "Grape" - brapiUrl: http://www.brapi.com - numUsers: 1 - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - updatedByUser: - id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 - name: Stacy Stacktrace - - id: e2263532-1fa3-49a6-9a66-957f313c8ed3 - name: Franks's Salmon - abbreviation: FS - objective: To breed the best salmon in the world - documentation_url: http://www.franks.com - active: true - brapiUrl: http://www.brapiserver.com - numUsers: 2 - createdAt: "2020-03-09T09:57:35-04:00" - updatedAt: "2020-03-09T09:59:25-04:00" - species: - id: 239b9ce5-bf72-412e-a456-42ecb2a621ec - commonName: Salmon - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - updatedByUser: - id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 - name: Stacy Stacktrace - singleProgram: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 - name: Bob Smith's Breeding Program - key: BSBP - abbreviation: BSBP - objective: To breed the best grapes in the world - documentationUrl: http://www.bobsbestbreeding.com - active: true - brapiUrl: http://www.brapiserver.com - numUsers: 2 - createdAt: "2020-03-09T09:57:35-04:00" - updatedAt: "2020-03-09T09:59:25-04:00" - species: - id: b3764582-e1ac-4c5c-85c4-b76bae0a18d2 - commonName: "Grape" - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - updatedByUser: - id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 - name: Stacy Stacktrace - updateProgramRequestExample: - value: - species: - id: f4f23375-0033-4d16-a62f-072e3a9198fs - commonName: "Sweetpotato" - name: Tim's program - abbreviation: TP - objective: To breed some good stuff - documentationUrl: http://www.timsgoodstuff.com - brapiUrl: http://www.brapi.org - arrayOfProgramUsers: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - createdAt: "2020-03-09T09:57:35-04:00" - updatedAt: "2020-03-09T09:57:35-04:00" - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - updatedByUser: - id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 - name: Stacy Stacktrace - email: stacy@stacy.com - user: - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 - name: Bob Smith - email: bob.smith@mail.com - roles: - - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: Breeder - program: - id: 37935efa-4c0f-4269-8669-f78d21b26f04 - name: Test Program - abbreviation: test, - objective: To test things - - createdAt: "2020-02-09T09:57:35-04:00" - updatedAt: "2020-02-09T09:57:35-04:00" - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Fred Smith - email: fred@smith.com - updatedByUser: - id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 - name: Joe Dirt - email: joe@dirt.com - user: - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 - name: Tim Smith - email: tim.smith@mail.com - roles: - - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: Breeder' - program: - id: 37935efa-4c0f-4269-8669-f78d21b26f04 - name: Test Program - abbreviation: test, - objective: To test things - singleProgramUser: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - createdAt: "2020-01-09T09:57:35-04:00" - updatedAt: "2020-01-09T09:57:35-04:00" - createdByUser: - id: d024a9be-98bf-4802-bec0-16bdf7343888 - name: Mark Smith - email: mark@smith.com - updatedByUser: - id: 2d6c5c3-4064-4afe-abd6-0af90fbf2243 - name: Stacy Stacktrace - email: stacy@stacy.com - user: - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 - name: Bob Smith - email: bob.smith@mail.com - roles: - - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: Field Manager - program: - id: 37935efa-4c0f-4269-8669-f78d21b26f04 - name: Test Program - abbreviation: test, - objective: To test things - arrayOfCountries: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: 75a9e07f-1f00-45ff-a7e9-17eeddd35122 - name: United States of America - alpha2Code: US - alpha3Code: USA - - id: 8f6018d9-054e-45a2-bcfa-3f31940431d0 - name: United Kingdom of Great Britain and Northern Ireland - alpha2Code: GB - alpha3Code: GBR - singleCountry: - value: - metadata: - datafiles: [] - pagination: - currentPage: 0 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: 75a9e07f-1f00-45ff-a7e9-17eeddd35122 - name: United States of America - alpha2Code: US - alpha3Code: USA - arrayOfTopographyOptions: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: 60a5b049-064c-4550-b5cd-2a7394724bdc - name: plateau - - id: 8cc0390e-e490-443a-948b-e2fde4a7627e - name: cirque - singleTopographyOption: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: 60a5b049-064c-4550-b5cd-2a7394724bdc - name: plateau - arrayOfAccessibilityOptions: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: 1eab0b9d-400f-4e85-97cb-9071ab95c6a4 - name: private - - id: 59f6652d-ec2e-4db0-b748-02302656ec1c - name: public - singleAccessibilityOption: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: 1eab0b9d-400f-4e85-97cb-9071ab95c6a4 - name: private - arrayOfEnvironmentDataTypes: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: bda2c118-fe26-4776-a106-e3cf2a0c7b59 - name: forest - - id: aa887f61-a831-4663-9d12-7368c1961590 - name: field - singleEnvironmentDataType: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: bda2c118-fe26-4776-a106-e3cf2a0c7b59 - name: forest - arrayOfRoles: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: Breeder - - id: a2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: Member - arrayOfSystemRoles: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: admin - - id: a2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: user - singleRole: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: Field Manager - singleSystemRole: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 - domain: admin - arrayOfLocations: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - createdAt: "2020-03-09T09:57:35-04:00" - updatedAt: "2020-03-09T09:57:35-04:00" - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - updatedByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - id: d2263532-1fa3-49a6-9a66-957f313c8ed2 - country: - name: United States of America - alpha2Code: US - alpha3Code: USA - environmentType: - id: d2263532-1fa3-49a6-9a66-957f313c8ed3 - name: field - accessibility: - id: d2263532-1fa3-49a6-9a66-957f313c8ed4 - name: public - topography: - id: d2263532-1fa3-49a6-9a66-957f313c8ed6 - name: valley - name: Nick's Field - abbreviation: NF - coordinates: { - "geometry": { - "coordinates": [ - -76.506042, - 42.417373, - 123 - ], - "type": "Point" - }, - "type": "Feature" - } - coordinateUncertainty: 0 - coordinateDescription: Northwest corner of field - slope: 1 - exposure: none - documentationUrl: http://www.nick.com - - createdAt: "2020-03-09T09:59:35-04:00" - updatedAt: "2020-03-09T09:59:35-04:00" - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - updatedByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - id: e2263532-1fa3-49a6-9a66-957f313c8ed2 - country: - name: United States of America - alpha2Code: US - alpha3Code: USA - environmentType: - id: d2263532-1fa3-49a6-9a66-957f313c8ed3 - name: field - accessibility: - id: d2263532-1fa3-49a6-9a66-957f313c8ed4 - name: public - topography: - id: d2263532-1fa3-49a6-9a66-957f313c8ed6 - name: valley - name: Nick's Field - abbreviation: NF - coordinates: { - "geometry": { - "coordinates": [ - -76.506042, - 42.417374, - 123 - ], - "type": "Point" - }, - "type": "Feature" - } - coordinateUncertainty: 0 - coordinateDescription: Northeast corner of field - slope: 1 - exposure: none - documentationUrl: http://www.nick.com - singleLocation: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - createdAt: "2020-03-09T09:59:35-04:00" - updatedAt: "2020-03-09T09:59:35-04:00" - createdByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - updatedByUser: - id: e024a9be-98bf-4802-bec0-16bdf7343888 - name: Bob Smith - email: bob@bob.com - id: e2263532-1fa3-49a6-9a66-957f313c8ed2 - country: - name: United States of America - alpha2Code: US - alpha3Code: USA - environmentType: - id: d2263532-1fa3-49a6-9a66-957f313c8ed3 - name: field - accessibility: - id: d2263532-1fa3-49a6-9a66-957f313c8ed4 - name: public - topography: - id: d2263532-1fa3-49a6-9a66-957f313c8ed6 - name: valley - name: Nick's Field - abbreviation: NF - coordinates: { - "geometry": { - "coordinates": [ - -76.506042, - 42.417374, - 123 - ], - "type": "Point" - }, - "type": "Feature" - } - coordinateUncertainty: 0 - coordinateDescription: Northeast corner of field - slope: 1 - exposure: none - documentationUrl: http://www.nick.com - arrayOfTraits: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - data: - [ - { - id: "00385063-01c8-4afc-a684-3c84b90b2de9", - traitName: "Test Trait", - active: true, - createdAt: "2020-06-04T11:05:48-04:00", - updatedAt: "2020-06-04T11:05:48-04:00", - traitClass: "morphological", - attribute: "height", - defaultValue: "defaultValue", - entity: "stalk", - mainAbbreviation: "t1", - abbreviations: ["t1","t2"], - synonyms: ["stalk height"], - programObservationLevel: - { - id: "71421c6a-19d4-4d82-858b-e3f70a9c7a02", - name: "Plant", - active: true, - createdAt: "2020-06-04T11:05:48-04:00", - updatedAt: "2020-06-04T11:05:48-04:00", - }, - method: - { - methodClass: "Counting" - }, - scale: - { - scaleName: "Test Scale", - dataType: "TEXT", - decimalPlaces: 3, - categories: - [ - { - label: "test1", - value: "value1" - }, - { - label: "test2", - value: "value2" - } - ] - }, - programOntology: - { - id: "a9712526-85ca-4a47-afe6-974ce4abf6a9", - programId: "c9caac57-3dcb-442b-b3e9-e01281fbf8bd", - createdAt: "2020-06-04T11:05:48-04:00", - updatedAt: "2020-06-04T11:05:48-04:00" - }, - createdByUser: - { - name: "Tester", - active: true - }, - updatedByUser: - { - name: "Tester", - active: true - }, - tags: ["leaf trait", "favorites"], - fullName: "Test Trait Full Name" - } - ] - singleTrait: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - { - id: "00385063-01c8-4afc-a684-3c84b90b2de9", - traitName: "Test Trait", - active: true, - createdAt: "2020-06-04T11:05:48-04:00", - updatedAt: "2020-06-04T11:05:48-04:00", - traitClass: "morphological", - attribute: "height", - defaultValue: "defaultValue", - entity: "stalk", - mainAbbreviation: "t1", - abbreviations: ["t1","t2"], - synonyms: ["stalk height"], - programObservationLevel: - { - id: "71421c6a-19d4-4d82-858b-e3f70a9c7a02", - name: "Plant", - active: true, - createdAt: "2020-06-04T11:05:48-04:00", - updatedAt: "2020-06-04T11:05:48-04:00", - }, - method: - { - methodClass: "Counting" - }, - scale: - { - scaleName: "Test Scale", - dataType: "TEXT", - decimalPlaces: 3, - categories: - [ - { - label: "test1", - value: "value1" - }, - { - label: "test2", - value: "value2" - } - ] - }, - programOntology: - { - id: "a9712526-85ca-4a47-afe6-974ce4abf6a9", - programId: "c9caac57-3dcb-442b-b3e9-e01281fbf8bd", - createdAt: "2020-06-04T11:05:48-04:00", - updatedAt: "2020-06-04T11:05:48-04:00" - }, - createdByUser: - { - name: "Tester", - active: true - }, - updatedByUser: - { - name: "Tester", - active: true - }, - tags: ["leaf trait", "favorites"], - fullName: "Test Trait Full Name" - } - editable: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - { - editable: true - } - traitUploadData: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 1 - totalPages: 1 - status: [] - result: - type: "TRAIT" - data: - [ - { - traitName: "Test Trait", - active: true, - programObservationLevel: - { - name: "Plant", - }, - method: - { - methodClass: "Estimation", - description: "Observed severity of Powdery Mildew on leaves", - formula: "a^2 + b^2 = c^2" - }, - scale: - { - scaleName: "1-4 Parlier field response score", - dataType: "ORDINAL", - decimalPlaces: 2, - categories: - [ - { - label: "test1", - value: "value1" - }, - { - label: "test2", - value: "value2" - } - ] - }, - description: "A trait", - mainAbbreviation: "t1", - abbreviations: ["t1","t2"], - synonyms: ["stalk height"], - tags: [ "leaf trait", "favorites" ], - fullName: "Test Trait Full Name", - } - ] - program: - { - id: "20e1a888-050a-4f89-8fec-ffaa55289c1b", - name: "Nick's Microgreens", - active: true, - createdAt: "2020-06-24T11:36:01-04:00", - updatedAt: "2020-06-24T11:36:01-04:00" - } - user: - { - id: "285ebacc-3940-416b-8ffe-5bb5d8a843f3", - orcid: "0000-0000-0000-0000", - name: "Nick Palladino", - email: "n@n.com", - active: true, - systemRoles: [] - } - createdByUser: - { - name: "Tester", - active: true - } - updatedByUser: - { - name: "Tester", - active: true - } - arrayOfUsers: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 - orcid: 1234-4312-4352-6314 - name: Bob Smith - email: bob.smith@mail.com - active: true - systemRoles: [ - { - id: "d4f23375-0033-4d16-a62f-072e3a9198fa", - domain: "admin" - } - ] - programRoles: [ - { - active: false, - roles: [ - { - id: 20be0724-9451-46d5-a628-10fcb4a380e7, - domain: member - } - ], - program: { - id: c57225a8-6649-44e3-b2ec-7c0f84a31a11, - name: Test Program1, - abbreviation: test1, - objective: To test all the things - } - }, - { - active: true, - roles: [ - { - id: 20be0724-9451-46d5-a628-10fcb4a380e7, - domain: member - } - ], - program: { - id: 37935efa-4c0f-4269-8669-f78d21b26f04, - name: Test Program, - abbreviation: test, - objective: To test things - } - } - ] - - id: a2263532-1fa3-29a6-3a66-557f313c8ed6 - orcid: 1234-4312-4352-6314 - name: Fred Brown - email: null - active: true - systemRoles: [] - programRoles: [] - observationLevelResponse: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 2 - totalPages: 1 - status: [] - result: - data: - - id: a2263532-1fa3-29a6-3a66-557f313c8ed6 - name: Plant - createdAt: "2020-06-04T11:05:48-04:00" - updatedAt: "2020-06-04T11:05:48-04:00" - - id: 37935efa-4c0f-4269-8669-f78d21b26f04 - name: Plot - createdAt: "2020-06-04T11:05:48-04:00" - updatedAt: "2020-06-04T11:05:48-04:00" - tagsResponse: - value: - metadata: - datafiles: [] - pagination: - currentPage: 1 - pageSize: 1 - totalCount: 3 - totalPages: 1 - status: [] - result: - data: - - "favorites" - - "leaf trait" - - "stem trait" - parameters: - page: - description: 'Used to request a specific page of data to be returned. - The page indexing starts at 1 (the first page is ''page''= 1). Default is `1`.' - example: 1 - in: query - name: page - required: false - schema: - type: integer - pageSize: - description: The size of the pages to be returned. Default is to show all results. - example: 1000 - in: query - name: pageSize - required: false - schema: - type: integer - sortOrder: - description: Order in which to sort the results. Default is ascending order. - example: ASC - in: query - name: sortOrder - required: false - schema: - type: string \ No newline at end of file diff --git a/docs/openapi/components.yaml b/docs/openapi/components.yaml new file mode 100644 index 000000000..f93cefb81 --- /dev/null +++ b/docs/openapi/components.yaml @@ -0,0 +1,2499 @@ +schemas: + metadata: + type: object + properties: + datafiles: + type: array + description: The datafiles key contains a list of file paths, which can + be relative or complete URLs. These files contain additional information + related to the returned object and can be retrieved by a subsequent call. + The empty list should be returned if no additional data files are present. + items: + type: string + + pagination: + $ref: '#/components/schemas/metadata_pagination' + status: + type: array + description: The status field contains a list of informational status messages + from the server. If no status is reported, an empty list should be returned. + See Error Reporting for more information. + items: + $ref: '#/components/schemas/status' + status: + required: + - message + - messageType + type: object + properties: + message: + type: string + description: A short message concerning the status of this request/response + messageType: + type: string + description: The logging level for the attached message + enum: + - DEBUG + - ERROR + - WARNING + - INFO + user: + type: object + properties: + id: + type: string + format: uuid + orcid: + type: string + name: + type: string + email: + type: string + active: + type: boolean + systemRoles: + type: object + properties: + id: + type: string + format: uuid + domain: + type: string + programRoles: + type: object + properties: + active: + type: boolean + roles: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + domain: + type: string + program: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + abbreviation: + type: string + objective: + type: string + country: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + alpha2Code: + type: string + alpha3Code: + type: string + topographyOption: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + accessibilityOption: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + environmentDataType: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + role: + type: object + properties: + id: + type: string + format: uuid + domain: + type: string + systemRole: + type: object + properties: + id: + type: string + format: uuid + domain: + type: string + programUser: + type: object + properties: + user: + $ref: '#/components/schemas/user' + roles: + type: array + description: Array of roles + items: + $ref: '#/components/schemas/role' + program: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + abbreviation: + type: string + objective: + type: string + program: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + key: + type: string + abbreviation: + type: string + objective: + type: string + documentation_url: + type: string + active: + type: boolean + brapiUrl: + type: string + numUsers: + type: integer + createdAt: + type: string + format: datetime + updatedAt: + type: string + format: datetime + species: + type: object + properties: + id: + type: string + format: uuid + commonName: + type: string + createdByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + updatedByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + location: + type: object + properties: + id: + type: string + format: uuid + country: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + alpha2Code: + type: string + alpha3Code: + type: string + environmentType: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + accessibility: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + topography: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + name: + type: string + abbreviation: + type: string + coordinates: + $ref: '#/components/schemas/geoJSON' + coordinateUncertainty: + type: number + coordinateDescription: + type: string + slope: + type: number + exposure: + type: string + documentationUrl: + type: string + createdAt: + type: string + format: datetime + updatedAt: + type: string + format: datetime + createdByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + updatedByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + BreedingMethod: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + abbreviation: + type: string + description: + type: string + category: + type: string + geneticDiversity: + type: string + BreedingMethodResponse: + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/BreedingMethod' + JobResponse: + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + id: + type: string + format: uuid + statuscode: + type: integer + status: + type: string + message: + type: string + progress: + type: object + properties: + total: + type: integer + finished: + type: integer + ProgramOntology: + type: object + properties: + id: + type: string + format: uuid + programId: + type: string + format: uuid + sharedOntology: + type: object + properties: + id: + type: string + format: uuid + programId: + type: string + format: uuid + SubscribedProgram: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + subscribed: + type: boolean + SubscribedProgramResponse: + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/SubscribedProgram' + Experiment: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + programId: + type: string + format: uuid + ExperimentResponse: + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Experiment' + Species: + type: object + properties: + id: + type: string + format: uuid + commonName: + type: string + SpeciesResponse: + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Species' + SampleSubmission: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + programId: + type: string + format: uuid + germplasm: + type: array + items: + $ref: '#/components/schemas/Germplasm' + SampleSubmissionResponse: + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/SampleSubmission' + geoJSON: + description: 'One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system. + Copied from RFC 7946 Section 3.1.1 + A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or + easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.' + properties: + geometry: + description: A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed. + discriminator: + mapping: + Point: '#/components/schemas/pointGeometry' + Polygon: '#/components/schemas/polygonGeometry' + propertyName: type + example: + coordinates: + - -76.506042 + - 42.417373 + - 123 + type: Point + oneOf: + - $ref: '#/components/schemas/pointGeometry' + - $ref: '#/components/schemas/polygonGeometry' + title: GeoJSON Geometry + type: object + type: + default: Feature + description: The literal string "Feature" + example: Feature + type: string + title: GeoJSON + type: object + pointGeometry: + description: 'Copied from RFC 7946 Section 3.1.1 + A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or + easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.' + properties: + coordinates: + $ref: '#/components/schemas/position' + type: + default: Point + description: The literal string "Point" + example: Point + type: string + type: object + polygon: + description: An array of linear rings + example: + - - - -77.456654 + - 42.241133 + - 494 + - - -75.414133 + - 41.508282 + - 571 + - - -76.506042 + - 42.417373 + - 123 + - - -77.456654 + - 42.241133 + - 346 + items: + $ref: '#/components/schemas/linearRing' + type: array + polygonGeometry: + description: "An array of Linear Rings. Each Linear Ring is an array of Points. \n\nA Point is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or\neasting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element." + properties: + coordinates: + $ref: '#/components/schemas/polygon' + type: + default: Polygon + description: The literal string "Polygon" + example: Polygon + type: string + type: object + position: + description: A single position + example: + - -76.506042 + - 42.417373 + - 123 + items: + type: number + minItems: 2 + type: array + linearRing: + description: An array of at least four positions where the first equals the last + example: + - - -77.456654 + - 42.241133 + - 494 + - - -75.414133 + - 41.508282 + - 571 + - - -76.506042 + - 42.417373 + - 123 + - - -77.456654 + - 42.241133 + - 346 + items: + $ref: '#/components/schemas/position' + minItems: 4 + type: array + newUserRequest: + type: object + properties: + name: + type: string + description: name of this user + email: + type: string + description: email address of this user + systemRoles: + type: array + description: Array of system role objects + items: + $ref: '#/components/schemas/systemRole' + newProgramUserRequest: + type: object + properties: + user: + type: object + properties: + id: + type: string + description: Id of user to assign to program + name: + type: string + description: Name of the user + email: + type: string + description: Email address of this user + required: + - id + roles: + type: array + description: Array of roles + items: + $ref: '#/components/schemas/role' + required: + - user + - roles + updateSystemRolesRequest: + type: object + properties: + systemRoles: + type: array + description: Array of system role objects + items: + $ref: '#/components/schemas/systemRole' + newProgramLocationRequest: + type: object + properties: + id: + type: string + format: uuid + country: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + alpha2Code: + type: string + alpha3Code: + type: string + environmentType: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + accessibility: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + topography: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + name: + type: string + abbreviation: + type: string + coordinates: + $ref: '#/components/schemas/geoJSON' + coordinateUncertainty: + type: number + coordinateDescription: + type: string + slope: + type: number + exposure: + type: string + documentationUrl: + type: string + usersResponse: + title: usersResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/usersResponse_result' + locationsResponse: + title: locationsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/locationsResponseResult' + locationsResponseSingle: + title: locationsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/location' + updateProgramRequest: + type: object + properties: + species: + type: object + properties: + id: + type: string + description: Id of species to assign to program + commonName: + type: string + description: Name of species + required: + - id + name: + type: string + description: name of program + abbreviation: + type: string + description: abbreviation for program name + objective: + type: string + description: program objective + documetation_url: + type: string + description: program documentation url + brapiUrl: + type: string + description: url of brapi service to store data at + required: + - species + - name + countriesResponse: + title: countriesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/countriesResponseResult' + countriesResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of countries + items: + $ref: '#/components/schemas/country' + countriesResponseSingle: + title: countriesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/country' + topographiesResponse: + title: topographiesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/topographiesResponseResult' + topographiesResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of topographies + items: + $ref: '#/components/schemas/topographyOption' + topographiesResponseSingle: + title: topographiesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/topographyOption' + accessibilitiesResponse: + title: accessibilitiesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/accessibilitiesResponseResult' + accessibilitiesResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of accessibilities + items: + $ref: '#/components/schemas/accessibilityOption' + accessibilitiesResponseSingle: + title: accessibilitiesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/accessibilityOption' + environmentTypesResponse: + title: environmentTypesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/environmentTypesResponseResult' + environmentTypesResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of environemnt types + items: + $ref: '#/components/schemas/environmentDataType' + environmentTypesResponseSingle: + title: environmentTypesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/location' + topographyOptionsResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of topographies + items: + $ref: '#/components/schemas/topographyOption' + topographyOptionsResponseSingle: + title: topographyOptionsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/topographyOption' + accessibilityOptionsResponse: + title: accessibilityOptionsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/accessibilityOptionsResponseResult' + accessibilityOptionsResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of accessibility options + items: + $ref: '#/components/schemas/accessibilityOption' + accessibilityOptionsResponseSingle: + title: accessibilityOptionsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/accessibilityOption' + environmentDataTypesResponse: + title: environmentDataTypesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/environmentDataTypesResponseResult' + environmentDataTypesResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of environemnt data types + items: + $ref: '#/components/schemas/environmentDataType' + environmentDataTypesResponseSingle: + title: environmentDataTypesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/environmentDataType' + rolesResponse: + title: rolesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/rolesResponseResult' + rolesResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of roles + items: + $ref: '#/components/schemas/role' + rolesResponseSingle: + title: rolesResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/role' + programsResponse: + title: programsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/programsResponseResult' + programsResponseSingle: + title: programsResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/program' + programUserResponse: + title: programUserResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/programUser' + + usersResponse_1: + title: usersResponse + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/user' + metadata_pagination: + type: object + properties: + currentPage: + type: integer + pageSize: + type: integer + totalCount: + type: integer + totalPages: + type: integer + description: The pagination object is applicable only when the payload contains + a "data" key. It describes the pagination of the data contained in the "data" + array, as a way to identify which subset of data is being returned. Pages + are zero indexed, so the first page will be page 0 (zero). + usersResponse_result: + required: + - data + type: object + properties: + data: + type: array + description: Array of users + items: + $ref: '#/components/schemas/user' + programUserResponseResult: + type: object + properties: + data: + type: array + description: Array of program users + items: + $ref: '#/components/schemas/programUser' + locationsResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of locations + items: + $ref: '#/components/schemas/location' + programsResponseResult: + required: + - data + type: object + properties: + data: + type: array + description: Array of programs + items: + $ref: '#/components/schemas/program' + multipleTraitsResponse: + required: + - data + type: object + properties: + data: + type: array + description: Array of traits + items: + $ref: '#/components/schemas/trait' + singleTraitResponse: + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/trait' + traitEditableResponse: + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/editable' + editable: + type: object + properties: + editable: + type: boolean + description: Indicate if trait is editable + trait: + type: object + properties: + id: + type: string + format: uuid + description: System id of the trait + traitName: + type: string + description: Trait display name + active: + type: boolean + description: Trait active status + createdAt: + type: string + format: datetime + updatedAt: + type: string + format: datetime + createdByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + updatedByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + traitClass: + type: string + example: "morphological" + attribute: + type: string + description: Attribute the trait is describing + example: height + defaultValue: + type: string + description: Default value of the trait + mainAbbreviation: + type: string + abbreviations: + type: array + items: + type: string + synonyms: + type: array + items: + type: string + programObservationLevel: + type: object + properties: + id: + type: string + format: uuid + description: System id of the observation level + name: + type: string + description: Name of the observation level + method: + type: object + properties: + methodClass: + type: string + description: + type: string + formula: + type: string + scale: + type: object + properties: + scaleName: + type: string + dataType: + type: string + decimalPlaces: + type: integer + categories: + type: array + items: + type: object + properties: + label: + type: string + value: + type: string + validValueMax: + type: integer + validValueMin: + type: integer + tags: + type: array + items: + type: string + fullName: + type: string + description: Full trait display name + traitUploadResponse: + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + $ref: '#/components/schemas/traitUpload' + traitUpload: + type: object + properties: + type: + type: string + description: Type of upload + data: + type: object + properties: + traitName: + type: string + description: Trait display name + active: + type: boolean + description: Trait active status + programObservationLevel: + type: object + properties: + id: + type: string + format: uuid + description: System id of the observation level + name: + type: string + description: Name of the observation level + active: + type: boolean + createdAt: + type: string + format: datetime + updatedAt: + type: string + format: datetime + method: + type: object + properties: + methodClass: + type: string + description: + type: string + formula: + type: string + scale: + type: object + properties: + scaleName: + type: string + dataType: + type: string + decimalPlaces: + type: integer + categories: + type: array + items: + type: object + properties: + label: + type: string + value: + type: string + validValueMax: + type: integer + validValueMin: + type: integer + mainAbbreviation: + type: string + abbreviations: + type: array + items: + type: string + synonyms: + type: array + items: + type: string + tags: + type: array + items: + type: string + fullName: + type: string + description: Full trait display name + createdAt: + type: string + format: datetime + updatedAt: + type: string + format: datetime + user: + $ref: '#/components/schemas/user' + program: + $ref: '#/components/schemas/program' + createdByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + updatedByUser: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + arrayOfNewTraits: + type: array + items: + $ref: '#/components/schemas/newTrait' + newTrait: + type: object + properties: + traitName: + type: string + description: Trait display name + traitClass: + type: string + example: "morphological" + attribute: + type: string + description: Attribute the trait is describing + example: height + defaultValue: + type: string + description: Default value of the trait + mainAbbreviation: + type: string + abbreviations: + type: array + items: + type: string + synonyms: + type: array + items: + type: string + programObservationLevel: + type: object + properties: + name: + type: string + description: Name of the observation level + method: + type: object + properties: + methodClass: + type: string + description: + type: string + format: UUID + formula: + type: string + format: UUID + scale: + type: object + properties: + scaleName: + type: string + format: datetime + dataType: + type: string + format: datetime + decimalPlaces: + type: integer + categories: + type: array + items: + type: object + properties: + label: + type: string + value: + type: string + validValueMax: + type: integer + validValueMin: + type: integer + tags: + type: array + items: + type: string + fullName: + type: string + description: Full trait display name + arrayOfEditedTraits: + type: array + items: + $ref: '#/components/schemas/editedTrait' + editedTrait: + type: object + required: + - traitId + properties: + traitId: + type: string + format: uuid + description: ID of the trait to edit + traitName: + type: string + description: Trait display name + traitClass: + type: string + example: "morphological" + attribute: + type: string + description: Attribute the trait is describing + example: height + defaultValue: + type: string + description: Default value of the trait + mainAbbreviation: + type: string + abbreviations: + type: array + items: + type: string + synonyms: + type: array + items: + type: string + programObservationLevel: + type: object + properties: + name: + type: string + description: Name of the observation level + method: + type: object + properties: + methodClass: + type: string + description: + type: string + format: UUID + formula: + type: string + format: UUID + scale: + type: object + properties: + scaleName: + type: string + format: datetime + dataType: + type: string + format: datetime + decimalPlaces: + type: integer + categories: + type: array + items: + type: object + properties: + label: + type: string + value: + type: string + validValueMax: + type: integer + validValueMin: + type: integer + tags: + type: array + items: + type: string + fullName: + type: string + description: Full trait display name + validatorErrorResponse: + type: object + properties: + rowErrors: + type: array + items: + type: object + properties: + rowIndex: + type: integer + description: "Row number in the uploaded file for the trait with errors." + errors: + type: array + items: + type: object + properties: + field: + type: string + description: "Field name that is the source of the error" + errorMessage: + type: string + description: "A description fo the error" + httpStatus: + type: string + description: "Text representation fo the error code" + httpStatusCode: + type: integer + description: "Http error code" + rowErrors: + type: array + items: + type: object + properties: + errors: + type: array + items: + type: object + properties: + field: + type: string + description: "Field name that is the source of the error" + errorMessage: + type: string + description: "A description fo the error" + httpStatus: + type: string + description: "Text representation fo the error code" + httpStatusCode: + type: integer + description: "Http error code" + observationLevelResponse: + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + createdAt: + type: string + format: datetime + updatedAt: + type: string + format: datetime + tagsResponse: + required: + - metadata + - result + type: object + properties: + metadata: + $ref: '#/components/schemas/metadata' + result: + type: object + properties: + data: + type: array + items: + type: string +responses: + "400BadRequest": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401Unauthorized": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403Forbidden": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission to + perform this action + "404NotFound": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is not + found +securitySchemes: + orcid_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: https://sandbox.orcid.org/oauth/authorize + scopes: + write:bi: modify + read:bi: read + api_key: + type: apiKey + name: api_key + in: header +examples: + arrayOfPrograms: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 + name: Bob Smith's Breeding Program + key: BSBP + abbreviation: BSBP + objective: To breed the best grapes in the world + documentationUrl: http://www.bobsbestbreeding.com + active: true + createdAt: "2020-03-09T09:57:35-04:00" + updatedAt: "2020-03-09T09:59:25-04:00" + species: + id: b3764582-e1ac-4c5c-85c4-b76bae0a18d2 + commonName: "Grape" + brapiUrl: http://www.brapi.com + numUsers: 1 + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + updatedByUser: + id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 + name: Stacy Stacktrace + - id: e2263532-1fa3-49a6-9a66-957f313c8ed3 + name: Franks's Salmon + abbreviation: FS + objective: To breed the best salmon in the world + documentation_url: http://www.franks.com + active: true + brapiUrl: http://www.brapiserver.com + numUsers: 2 + createdAt: "2020-03-09T09:57:35-04:00" + updatedAt: "2020-03-09T09:59:25-04:00" + species: + id: 239b9ce5-bf72-412e-a456-42ecb2a621ec + commonName: Salmon + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + updatedByUser: + id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 + name: Stacy Stacktrace + singleProgram: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: b2263532-1fa3-49a6-9a66-957f313c8ed6 + name: Bob Smith's Breeding Program + key: BSBP + abbreviation: BSBP + objective: To breed the best grapes in the world + documentationUrl: http://www.bobsbestbreeding.com + active: true + brapiUrl: http://www.brapiserver.com + numUsers: 2 + createdAt: "2020-03-09T09:57:35-04:00" + updatedAt: "2020-03-09T09:59:25-04:00" + species: + id: b3764582-e1ac-4c5c-85c4-b76bae0a18d2 + commonName: "Grape" + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + updatedByUser: + id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 + name: Stacy Stacktrace + updateProgramRequestExample: + value: + species: + id: f4f23375-0033-4d16-a62f-072e3a9198fs + commonName: "Sweetpotato" + name: Tim's program + abbreviation: TP + objective: To breed some good stuff + documentationUrl: http://www.timsgoodstuff.com + brapiUrl: http://www.brapi.org + arrayOfProgramUsers: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - createdAt: "2020-03-09T09:57:35-04:00" + updatedAt: "2020-03-09T09:57:35-04:00" + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + updatedByUser: + id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 + name: Stacy Stacktrace + email: stacy@stacy.com + user: + id: b2263532-1fa3-49a6-9a66-957f313c8ed6 + name: Bob Smith + email: bob.smith@mail.com + roles: + - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: Breeder + program: + id: 37935efa-4c0f-4269-8669-f78d21b26f04 + name: Test Program + abbreviation: test, + objective: To test things + - createdAt: "2020-02-09T09:57:35-04:00" + updatedAt: "2020-02-09T09:57:35-04:00" + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Fred Smith + email: fred@smith.com + updatedByUser: + id: c2d6c5c3-4064-4afe-abd6-0af90fbf2243 + name: Joe Dirt + email: joe@dirt.com + user: + id: b2263532-1fa3-49a6-9a66-957f313c8ed6 + name: Tim Smith + email: tim.smith@mail.com + roles: + - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: Breeder' + program: + id: 37935efa-4c0f-4269-8669-f78d21b26f04 + name: Test Program + abbreviation: test, + objective: To test things + singleProgramUser: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + createdAt: "2020-01-09T09:57:35-04:00" + updatedAt: "2020-01-09T09:57:35-04:00" + createdByUser: + id: d024a9be-98bf-4802-bec0-16bdf7343888 + name: Mark Smith + email: mark@smith.com + updatedByUser: + id: 2d6c5c3-4064-4afe-abd6-0af90fbf2243 + name: Stacy Stacktrace + email: stacy@stacy.com + user: + id: b2263532-1fa3-49a6-9a66-957f313c8ed6 + name: Bob Smith + email: bob.smith@mail.com + roles: + - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: Field Manager + program: + id: 37935efa-4c0f-4269-8669-f78d21b26f04 + name: Test Program + abbreviation: test, + objective: To test things + arrayOfCountries: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: 75a9e07f-1f00-45ff-a7e9-17eeddd35122 + name: United States of America + alpha2Code: US + alpha3Code: USA + - id: 8f6018d9-054e-45a2-bcfa-3f31940431d0 + name: United Kingdom of Great Britain and Northern Ireland + alpha2Code: GB + alpha3Code: GBR + singleCountry: + value: + metadata: + datafiles: [] + pagination: + currentPage: 0 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: 75a9e07f-1f00-45ff-a7e9-17eeddd35122 + name: United States of America + alpha2Code: US + alpha3Code: USA + arrayOfTopographyOptions: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: 60a5b049-064c-4550-b5cd-2a7394724bdc + name: plateau + - id: 8cc0390e-e490-443a-948b-e2fde4a7627e + name: cirque + singleTopographyOption: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: 60a5b049-064c-4550-b5cd-2a7394724bdc + name: plateau + arrayOfAccessibilityOptions: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: 1eab0b9d-400f-4e85-97cb-9071ab95c6a4 + name: private + - id: 59f6652d-ec2e-4db0-b748-02302656ec1c + name: public + singleAccessibilityOption: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: 1eab0b9d-400f-4e85-97cb-9071ab95c6a4 + name: private + arrayOfEnvironmentDataTypes: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: bda2c118-fe26-4776-a106-e3cf2a0c7b59 + name: forest + - id: aa887f61-a831-4663-9d12-7368c1961590 + name: field + singleEnvironmentDataType: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: bda2c118-fe26-4776-a106-e3cf2a0c7b59 + name: forest + arrayOfRoles: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: Breeder + - id: a2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: Member + arrayOfSystemRoles: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: admin + - id: a2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: user + singleRole: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: Field Manager + singleSystemRole: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: e2d6c5c3-4064-4afe-abd6-0af90fbf2245 + domain: admin + arrayOfLocations: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - createdAt: "2020-03-09T09:57:35-04:00" + updatedAt: "2020-03-09T09:57:35-04:00" + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + updatedByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + id: d2263532-1fa3-49a6-9a66-957f313c8ed2 + country: + name: United States of America + alpha2Code: US + alpha3Code: USA + environmentType: + id: d2263532-1fa3-49a6-9a66-957f313c8ed3 + name: field + accessibility: + id: d2263532-1fa3-49a6-9a66-957f313c8ed4 + name: public + topography: + id: d2263532-1fa3-49a6-9a66-957f313c8ed6 + name: valley + name: Nick's Field + abbreviation: NF + coordinates: { + "geometry": { + "coordinates": [ + -76.506042, + 42.417373, + 123 + ], + "type": "Point" + }, + "type": "Feature" + } + coordinateUncertainty: 0 + coordinateDescription: Northwest corner of field + slope: 1 + exposure: none + documentationUrl: http://www.nick.com + - createdAt: "2020-03-09T09:59:35-04:00" + updatedAt: "2020-03-09T09:59:35-04:00" + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + updatedByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + id: e2263532-1fa3-49a6-9a66-957f313c8ed2 + country: + name: United States of America + alpha2Code: US + alpha3Code: USA + environmentType: + id: d2263532-1fa3-49a6-9a66-957f313c8ed3 + name: field + accessibility: + id: d2263532-1fa3-49a6-9a66-957f313c8ed4 + name: public + topography: + id: d2263532-1fa3-49a6-9a66-957f313c8ed6 + name: valley + name: Nick's Field + abbreviation: NF + coordinates: { + "geometry": { + "coordinates": [ + -76.506042, + 42.417374, + 123 + ], + "type": "Point" + }, + "type": "Feature" + } + coordinateUncertainty: 0 + coordinateDescription: Northeast corner of field + slope: 1 + exposure: none + documentationUrl: http://www.nick.com + singleLocation: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + createdAt: "2020-03-09T09:59:35-04:00" + updatedAt: "2020-03-09T09:59:35-04:00" + createdByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + updatedByUser: + id: e024a9be-98bf-4802-bec0-16bdf7343888 + name: Bob Smith + email: bob@bob.com + id: e2263532-1fa3-49a6-9a66-957f313c8ed2 + country: + name: United States of America + alpha2Code: US + alpha3Code: USA + environmentType: + id: d2263532-1fa3-49a6-9a66-957f313c8ed3 + name: field + accessibility: + id: d2263532-1fa3-49a6-9a66-957f313c8ed4 + name: public + topography: + id: d2263532-1fa3-49a6-9a66-957f313c8ed6 + name: valley + name: Nick's Field + abbreviation: NF + coordinates: { + "geometry": { + "coordinates": [ + -76.506042, + 42.417374, + 123 + ], + "type": "Point" + }, + "type": "Feature" + } + coordinateUncertainty: 0 + coordinateDescription: Northeast corner of field + slope: 1 + exposure: none + documentationUrl: http://www.nick.com + arrayOfTraits: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + data: + - + id: "00385063-01c8-4afc-a684-3c84b90b2de9" + traitName: "Test Trait" + active: true + createdAt: "2020-06-04T11:05:48-04:00" + updatedAt: "2020-06-04T11:05:48-04:00" + traitClass: "morphological" + attribute: "height" + defaultValue: "defaultValue" + entity: "stalk" + mainAbbreviation: "t1" + abbreviations: ["t1","t2"] + synonyms: ["stalk height"] + programObservationLevel: + { + id: "71421c6a-19d4-4d82-858b-e3f70a9c7a02", + name: "Plant", + active: true, + createdAt: "2020-06-04T11:05:48-04:00", + updatedAt: "2020-06-04T11:05:48-04:00", + } + method: + { + methodClass: "Counting" + } + scale: + { + scaleName: "Test Scale", + dataType: "TEXT", + decimalPlaces: 3, + categories: + [ + { + label: "test1", + value: "value1" + }, + { + label: "test2", + value: "value2" + } + ] + } + programOntology: + { + id: "a9712526-85ca-4a47-afe6-974ce4abf6a9", + programId: "c9caac57-3dcb-442b-b3e9-e01281fbf8bd", + createdAt: "2020-06-04T11:05:48-04:00", + updatedAt: "2020-06-04T11:05:48-04:00" + } + createdByUser: + { + name: "Tester", + active: true + } + updatedByUser: + { + name: "Tester", + active: true + } + tags: ["leaf trait", "favorites"] + fullName: "Test Trait Full Name" + singleTrait: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + { + id: "00385063-01c8-4afc-a684-3c84b90b2de9", + traitName: "Test Trait", + active: true, + createdAt: "2020-06-04T11:05:48-04:00", + updatedAt: "2020-06-04T11:05:48-04:00", + traitClass: "morphological", + attribute: "height", + defaultValue: "defaultValue", + entity: "stalk", + mainAbbreviation: "t1", + abbreviations: ["t1","t2"], + synonyms: ["stalk height"], + programObservationLevel: + { + id: "71421c6a-19d4-4d82-858b-e3f70a9c7a02", + name: "Plant", + active: true, + createdAt: "2020-06-04T11:05:48-04:00", + updatedAt: "2020-06-04T11:05:48-04:00", + }, + method: + { + methodClass: "Counting" + }, + scale: + { + scaleName: "Test Scale", + dataType: "TEXT", + decimalPlaces: 3, + categories: + [ + { + label: "test1", + value: "value1" + }, + { + label: "test2", + value: "value2" + } + ] + }, + programOntology: + { + id: "a9712526-85ca-4a47-afe6-974ce4abf6a9", + programId: "c9caac57-3dcb-442b-b3e9-e01281fbf8bd", + createdAt: "2020-06-04T11:05:48-04:00", + updatedAt: "2020-06-04T11:05:48-04:00" + }, + createdByUser: + { + name: "Tester", + active: true + }, + updatedByUser: + { + name: "Tester", + active: true + }, + tags: ["leaf trait", "favorites"], + fullName: "Test Trait Full Name" + } + editable: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + { + editable: true + } + traitUploadData: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + type: "TRAIT" + data: + - + traitName: "Test Trait" + active: true + programObservationLevel: + { + name: "Plant", + } + method: + { + methodClass: "Estimation", + description: "Observed severity of Powdery Mildew on leaves", + formula: "a^2 + b^2 = c^2" + } + scale: + { + scaleName: "1-4 Parlier field response score", + dataType: "ORDINAL", + decimalPlaces: 2, + categories: + [ + { + label: "test1", + value: "value1" + }, + { + label: "test2", + value: "value2" + } + ] + } + description: "A trait" + mainAbbreviation: "t1" + abbreviations: ["t1","t2"] + synonyms: ["stalk height"] + tags: [ "leaf trait", "favorites" ] + fullName: "Test Trait Full Name" + program: + { + id: "20e1a888-050a-4f89-8fec-ffaa55289c1b", + name: "Nick's Microgreens", + active: true, + createdAt: "2020-06-24T11:36:01-04:00", + updatedAt: "2020-06-24T11:36:01-04:00" + } + user: + { + id: "285ebacc-3940-416b-8ffe-5bb5d8a843f3", + orcid: "0000-0000-0000-0000", + name: "Nick Palladino", + email: "n@n.com", + active: true, + systemRoles: [] + } + createdByUser: + { + name: "Tester", + active: true + } + updatedByUser: + { + name: "Tester", + active: true + } + arrayOfUsers: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: b2263532-1fa3-49a6-9a66-957f313c8ed6 + orcid: 1234-4312-4352-6314 + name: Bob Smith + email: bob.smith@mail.com + active: true + systemRoles: [ + { + id: "d4f23375-0033-4d16-a62f-072e3a9198fa", + domain: "admin" + } + ] + programRoles: [ + { + active: false, + roles: [ + { + id: 20be0724-9451-46d5-a628-10fcb4a380e7, + domain: member + } + ], + program: { + id: c57225a8-6649-44e3-b2ec-7c0f84a31a11, + name: Test Program1, + abbreviation: test1, + objective: To test all the things + } + }, + { + active: true, + roles: [ + { + id: 20be0724-9451-46d5-a628-10fcb4a380e7, + domain: member + } + ], + program: { + id: 37935efa-4c0f-4269-8669-f78d21b26f04, + name: Test Program, + abbreviation: test, + objective: To test things + } + } + ] + - id: a2263532-1fa3-29a6-3a66-557f313c8ed6 + orcid: 1234-4312-4352-6314 + name: Fred Brown + email: null + active: true + systemRoles: [] + programRoles: [] + observationLevelResponse: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 2 + totalPages: 1 + status: [] + result: + data: + - id: a2263532-1fa3-29a6-3a66-557f313c8ed6 + name: Plant + createdAt: "2020-06-04T11:05:48-04:00" + updatedAt: "2020-06-04T11:05:48-04:00" + - id: 37935efa-4c0f-4269-8669-f78d21b26f04 + name: Plot + createdAt: "2020-06-04T11:05:48-04:00" + updatedAt: "2020-06-04T11:05:48-04:00" + tagsResponse: + value: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 3 + totalPages: 1 + status: [] + result: + data: + - "favorites" + - "leaf trait" + - "stem trait" +parameters: + page: + description: 'Used to request a specific page of data to be returned. + The page indexing starts at 1 (the first page is ''page''= 1). Default is `1`.' + example: 1 + in: query + name: page + required: false + schema: + type: integer + pageSize: + description: The size of the pages to be returned. Default is to show all results. + example: 1000 + in: query + name: pageSize + required: false + schema: + type: integer + sortOrder: + description: Order in which to sort the results. Default is ascending order. + example: ASC + in: query + name: sortOrder + required: false + schema: + type: string diff --git a/docs/openapi/index.yaml b/docs/openapi/index.yaml new file mode 100644 index 000000000..c96320599 --- /dev/null +++ b/docs/openapi/index.yaml @@ -0,0 +1,81 @@ +# +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +openapi: 3.0.2 +info: + title: Breeding Insight API + description: API documentation for Breeding Insight + termsOfService: http://swagger.io/terms/ + contact: + email: np398@cornell.edu + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + version: 1.0.0 +externalDocs: + description: Find out more about Breeding Insight + url: http://www.breedinginsight.org +servers: + - url: http://localhost:8081/v1 +tags: + - $ref: ./tags/users.yaml + - $ref: ./tags/programs.yaml + - $ref: ./tags/roles.yaml + - $ref: ./tags/traits.yaml + - $ref: ./tags/uploads.yaml + - $ref: ./tags/breeding-methods.yaml + - $ref: ./tags/jobs.yaml + - $ref: ./tags/ontology.yaml + - $ref: ./tags/experiments.yaml + - $ref: ./tags/species.yaml + - $ref: ./tags/genotype-data-upload.yaml + - $ref: ./tags/sample-submissions.yaml + - $ref: ./tags/oidc.yaml + - $ref: ./tags/importer.yaml + - $ref: ./tags/server-management.yaml + - $ref: ./tags/token-management.yaml + - $ref: ./tags/countries.yaml + - $ref: ./tags/topography-options.yaml + - $ref: ./tags/accessibility-options.yaml + - $ref: ./tags/environment-data-types.yaml +paths: + $ref: ./paths/importer.yaml + $ref: ./paths/oidc.yaml + $ref: ./paths/sample-submissions.yaml + $ref: ./paths/genotype-data-upload.yaml + $ref: ./paths/species.yaml + $ref: ./paths/experiments.yaml + $ref: ./paths/ontology.yaml + $ref: ./paths/jobs.yaml + $ref: ./paths/breeding-methods.yaml + $ref: ./paths/users.yaml + $ref: ./paths/programs.yaml + $ref: ./paths/roles.yaml + $ref: ./paths/traits.yaml + $ref: ./paths/uploads.yaml + $ref: ./paths/health.yaml + $ref: ./paths/api-token.yaml + $ref: ./paths/server-info.yaml + $ref: ./paths/countries.yaml + $ref: ./paths/topography-options.yaml + $ref: ./paths/accessibility-options.yaml + $ref: ./paths/environment-data-types.yaml +components: + $ref: ./components/schemas.yaml + $ref: ./components/responses.yaml + $ref: ./components/security-schemes.yaml + $ref: ./components/examples.yaml + $ref: ./components/parameters.yaml diff --git a/docs/openapi/paths.yaml b/docs/openapi/paths.yaml new file mode 100644 index 000000000..bb24ceae5 --- /dev/null +++ b/docs/openapi/paths.yaml @@ -0,0 +1,4222 @@ +/programs/{programId}/import/mappings: + get: + tags: + - importer + summary: Get all importer mappings + description: Get all importer mappings + operationId: getImporterMappings + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/import/mappings/{mappingId}: + get: + tags: + - importer + summary: Get an importer mapping + description: Get an importer mapping + operationId: getImporterMapping + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: mappingId + in: path + description: The id of the mapping + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/.well-known/openid-configuration: + get: + tags: + - oidc + summary: Get OIDC discovery document + description: Get OIDC discovery document + operationId: getOidcDiscovery + responses: + "200": + description: OK +/programs/{programId}/sample-submissions: + get: + tags: + - sample submissions + summary: Get all sample submissions for a program + description: Get all sample submissions for a program + operationId: getSampleSubmissions + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SampleSubmissionResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + post: + tags: + - sample submissions + summary: Create a new sample submission for a program + description: Create a new sample submission for a program + operationId: createSampleSubmission + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Sample submission to create + content: + application/json: + schema: + $ref: '#/components/schemas/SampleSubmission' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SampleSubmission' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/sample-submissions/{submissionId}: + put: + tags: + - sample submissions + summary: Update a sample submission for a program + description: Update a sample submission for a program + operationId: updateSampleSubmission + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: submissionId + in: path + description: The id of the sample submission + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Sample submission to update + content: + application/json: + schema: + $ref: '#/components/schemas/SampleSubmission' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SampleSubmission' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + delete: + tags: + - sample submissions + summary: Delete a sample submission for a program + description: Delete a sample submission for a program + operationId: deleteSampleSubmission + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: submissionId + in: path + description: The id of the sample submission + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/geno/upload: + post: + tags: + - genotype data upload + summary: Upload a genotype data file + description: Upload a genotype data file + operationId: uploadGenotypeData + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + responses: + "200": + description: OK + "400": + $ref: '#/components/responses/400BadRequest' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/species: + get: + tags: + - species + summary: Get all species + description: Get all species + operationId: getSpecies + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SpeciesResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' +/species/{speciesId}: + get: + tags: + - species + summary: Get a species + description: Get a species + operationId: getSpeciesById + parameters: + - name: speciesId + in: path + description: The id of the species + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Species' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/experiments: + get: + tags: + - experiments + summary: Get all experiments for a program + description: Get all experiments for a program + operationId: getExperiments + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ExperimentResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + post: + tags: + - experiments + summary: Create a new experiment for a program + description: Create a new experiment for a program + operationId: createExperiment + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Experiment to create + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/experiments/{experimentId}: + get: + tags: + - experiments + summary: Get an experiment for a program + description: Get an experiment for a program + operationId: getExperiment + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: experimentId + in: path + description: The id of the experiment + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + put: + tags: + - experiments + summary: Update an experiment for a program + description: Update an experiment for a program + operationId: updateExperiment + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: experimentId + in: path + description: The id of the experiment + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Experiment to update + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Experiment' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/ontology/shared: + get: + tags: + - ontology + summary: Get shared ontology for a program + description: Get shared ontology for a program + operationId: getSharedOntology + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProgramOntology' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/ontology/shared/subscribe: + post: + tags: + - ontology + summary: Subscribe a program to a shared ontology + description: Subscribe a program to a shared ontology + operationId: subscribeSharedOntology + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ProgramOntology' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + "409": + description: Program already subscribed to a shared ontology +/programs/{programId}/ontology/shared/unsubscribe: + delete: + tags: + - ontology + summary: Unsubscribe a program from a shared ontology + description: Unsubscribe a program from a shared ontology + operationId: unsubscribeSharedOntology + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/ontology/shared/subscribers: + get: + tags: + - ontology + summary: Get programs subscribed to a shared ontology + description: Get programs subscribed to a shared ontology + operationId: getSubscribersSharedOntology + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SubscribedProgramResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/jobs/{jobId}: + get: + tags: + - jobs + summary: Get the progress of a job + description: Get the progress of a job + operationId: getJobProgress + parameters: + - name: jobId + in: path + description: The id of the job + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/JobResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/breeding-methods: + get: + tags: + - breeding methods + summary: Get all system breeding methods + description: Get all system breeding methods + operationId: getSystemBreedingMethods + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/BreedingMethodResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' +/programs/{programId}/breeding-methods: + get: + tags: + - breeding methods + summary: Get all program breeding methods + description: Get all program breeding methods + operationId: getProgramBreedingMethods + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: inUse + in: query + description: Whether to return only breeding methods that are in use by germplasm in the program + required: false + style: simple + explode: false + schema: + type: boolean + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/BreedingMethodResponse' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + post: + tags: + - breeding methods + summary: Create a new breeding method for a program + description: Create a new breeding method for a program + operationId: createProgramBreedingMethod + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Program breeding method to create + content: + application/json: + schema: + $ref: '#/components/schemas/BreedingMethod' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/BreedingMethod' + "400": + $ref: '#/components/responses/400BadRequest' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/breeding-methods/{breedingMethodId}: + put: + tags: + - breeding methods + summary: Update a program breeding method + description: Update a program breeding method + operationId: updateProgramBreedingMethod + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: breedingMethodId + in: path + description: The id of the breeding method + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Program breeding method to update + content: + application/json: + schema: + $ref: '#/components/schemas/BreedingMethod' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/BreedingMethod' + "400": + $ref: '#/components/responses/400BadRequest' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' + delete: + tags: + - breeding methods + summary: Delete a program breeding method + description: Delete a program breeding method + operationId: deleteProgramBreedingMethod + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: breedingMethodId + in: path + description: The id of the breeding method + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "400": + $ref: '#/components/responses/400BadRequest' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/breeding-methods/enable: + put: + tags: + - breeding methods + summary: Enable system breeding methods for a program + description: Enable system breeding methods for a program + operationId: enableSystemBreedingMethods + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: List of system breeding method ids to enable + content: + application/json: + schema: + type: array + items: + type: string + format: uuid + responses: + "200": + description: OK + "400": + $ref: '#/components/responses/400BadRequest' + "401": + $ref: '#/components/responses/401Unauthorized' + "403": + $ref: '#/components/responses/403Forbidden' + "404": + $ref: '#/components/responses/404NotFound' +/users: + get: + tags: + - users + summary: Get list of all users in the system. + description: Get list of all users + operationId: getUsers + parameters: + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, email, orcid, systemRoles, programs, active, createdAt, updatedAt, createdByUserId, updatedByUserId] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/usersResponse' + examples: + arrayOfUsers: + $ref: '#/components/examples/arrayOfUsers' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + post: + tags: + - users + summary: Create user + description: Create a new user. + operationId: createUser + requestBody: + description: User information to create + content: + application/json: + schema: + $ref: '#/components/schemas/newUserRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/usersResponse_1' + example: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: d4f23375-0033-4d16-a62f-072e3a9198fa + orcid: null + name: Bob Smith + email: bob@bob.com + active: true + systemRoles: [ + { + id: "d4f23375-0033-4d16-a62f-072e3a9198fa", + domain: "admin" + } + ] + programRoles: [] + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "409": + description: Conflict + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Email already exists +/users/search: + post: + tags: + - users + parameters: + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, email, orcid, systemRoles, programs, active, createdAt, updatedAt, createdByUserId, updatedByUserId] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Search users + description: Search users using filters + operationId: searchUsers + requestBody: + description: Search request + content: + application/json: + schema: + type: object + properties: + filter: + type: array + items: + type: object + properties: + field: + type: string + enum: [name, email, orcid, systemRoles, programs, active, createdAt, updatedAt, createdByUserId, updatedByUserId] + value: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/usersResponse' + examples: + arrayOfUsers: + $ref: '#/components/examples/arrayOfUsers' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' +/users/{id}: + get: + tags: + - users + summary: Get user information + description: Get a specific user + operationId: getUserById + parameters: + - name: id + in: path + description: The id of the user information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/usersResponse_1' + example: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: d4f23375-0033-4d16-a62f-072e3a9198fa + orcid: 1111-2222-3333-4444 + name: Bob Smith + email: bob@bob.com + active: true + systemRoles: [ + { + id: "d4f23375-0033-4d16-a62f-072e3a9198fa", + domain: "admin" + } + ] + programRoles: [ + { + active: false, + roles: [ + { + id: 20be0724-9451-46d5-a628-10fcb4a380e7, + domain: member + } + ], + program: { + id: c57225a8-6649-44e3-b2ec-7c0f84a31a11, + name: Test Program1, + abbreviation: test1, + objective: To test all the things + } + } + ] + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + put: + tags: + - users + summary: Update user information + description: Update user information with specified data. + operationId: updateUser + parameters: + - name: id + in: path + description: id of user to be updated + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Updated user object + content: + application/json: + schema: + $ref: '#/components/schemas/newUserRequest' + example: + name: Bob Smith + email: bob@bob.com + required: true + responses: + "200": + description: OK + content: + application/json: + example: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: d4f23375-0033-4d16-a62f-072e3a9198fa + orcid: 1111-2222-3333-4444 + name: Bob Smith + email: bob@bob.com + active: true + systemRoles: [ + { + id: "d4f23375-0033-4d16-a62f-072e3a9198fa", + domain: "admin" + } + ] + programRoles: [ + { + active: true, + roles: [ + { + id: 20be0724-9451-46d5-a628-10fcb4a380e7, + domain: member + } + ], + program: { + id: 37935efa-4c0f-4269-8669-f78d21b26f04, + name: Test Program, + abbreviation: test, + objective: To test things + } + } + ] + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "409": + description: Conflict - Email Already Exists + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Email already exists + delete: + tags: + - users + summary: Deactivate user + description: Deactivate User + operationId: deleteUser + parameters: + - name: id + in: path + description: id of user to be deleted + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "422": + description: Unprocessable Entity + content: + application/json: + schema: + type: string +/users/{id}/roles: + put: + tags: + - users + summary: Update user system roles + description: Update user system roles + operationId: updateUserRoles + parameters: + - name: id + in: path + description: id of user to be updated + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Updated system roles + content: + application/json: + schema: + $ref: '#/components/schemas/updateSystemRolesRequest' + example: + systemRoles: [ + { + id: "d4f23375-0033-4d16-a62f-072e3a9198fa", + domain: "admin" + } + ] + required: true + responses: + "200": + description: OK + content: + application/json: + example: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: d4f23375-0033-4d16-a62f-072e3a9198fa + orcid: 1111-2222-3333-4444 + name: Bob Smith + email: bob@bob.com + active: true + systemRoles: [ + { + id: "d4f23375-0033-4d16-a62f-072e3a9198fa", + domain: "admin" + } + ] + programRoles: [] + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/users/{userId}/resend-email: + put: + tags: + - users + summary: Resend account activation email to user + description: Resend account activation email to user + parameters: + - name: userId + in: path + description: The id of the user to send the email to. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs: + get: + tags: + - programs + summary: Get list of all programs in the system. + description: Get list of all programs + parameters: + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, key, abbreviation, objective, documentationUrl, active, createdAt, updatedAt, speciesId, speciesName, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName, brapiUrl, numUsers] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + operationId: getPrograms + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programsResponseResult' + examples: + programExample1: + $ref: '#/components/examples/arrayOfPrograms' + + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + + post: + tags: + - programs + summary: Create program + description: Create a new program. + operationId: createProgram + requestBody: + description: Program information to create + content: + application/json: + schema: + $ref: '#/components/schemas/updateProgramRequest' + examples: + createProgramRequest: + $ref: '#/components/examples/updateProgramRequestExample' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programsResponseSingle' + examples: + singleProgram: + $ref: '#/components/examples/singleProgram' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "409": + description: Conflict + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Email already exists +/programs/{id}: + get: + tags: + - programs + summary: Get program information + description: Get a specific program + operationId: getProgramById + parameters: + - name: id + in: path + description: The id of the program information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programsResponseSingle' + examples: + singleProgram: + $ref: '#/components/examples/singleProgram' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + put: + tags: + - programs + summary: Update program information + description: Update program information with specified data. + operationId: updateProgram + parameters: + - name: id + in: path + description: id of program to be updated + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Updated program object + content: + application/json: + schema: + $ref: '#/components/schemas/updateProgramRequest' + examples: + updateProgramRequestExample: + $ref: '#/components/examples/updateProgramRequestExample' + required: true + responses: + "200": + description: OK + content: + application/json: + examples: + singleProgram: + $ref: '#/components/examples/singleProgram' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "409": + description: Conflict - Email Already Exists + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Email already exists +/programs/archive/{id}: + delete: + tags: + - programs + summary: Archive program + description: Archives the indicated program + operationId: deleteProgram + parameters: + - name: id + in: path + description: id of program to be archived + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/search: + post: + tags: + - programs + parameters: + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, key, abbreviation, objective, documentationUrl, active, brapiUrl, numUsers, createdAt, updatedAt, speciesId, speciesName, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Search programs + description: Search programs using filters + operationId: searchPrograms + requestBody: + description: Search request + content: + application/json: + schema: + type: object + properties: + filter: + type: array + items: + type: object + properties: + field: + type: string + enum: [name, key, abbreviation, objective, documentationUrl, active, brapiUrl, numUsers, createdAt, updatedAt, speciesId, speciesName, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + value: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programsResponseResult' + examples: + programExample1: + $ref: '#/components/examples/arrayOfPrograms' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' +/programs/{id}/users: + get: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, email, roles, active, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Get list of all users in the specified program + description: Get list of all users in program + operationId: getProgramUsers + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programUserResponseResult' + examples: + programUserExample1: + $ref: '#/components/examples/arrayOfProgramUsers' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + post: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + summary: Create a user in specified program + description: Add user to program if they exist in the system, otherwise create new user and add + operationId: createProgramUser + requestBody: + description: User information to create + content: + application/json: + schema: + $ref: '#/components/schemas/newProgramUserRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programUserResponse' + examples: + programUserExample2: + $ref: '#/components/examples/singleProgramUser' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "409": + description: Conflict + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Email already exists +/programs/{id}/users/search: + post: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, email, roles, active, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Search program users + description: Search program users using filters + operationId: searchProgramusers + requestBody: + description: Search request + content: + application/json: + schema: + type: object + properties: + filter: + type: array + items: + type: object + properties: + field: + type: string + enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + value: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programUserResponseResult' + examples: + programUserExample1: + $ref: '#/components/examples/arrayOfProgramUsers' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{id}/users/{userId}: + get: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + - name: userId + in: path + description: The id of the user information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + summary: Get specified user in the specified program + description: Get user in the program + operationId: getProgramUser + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programUserResponse' + examples: + singleProgramUser: + $ref: '#/components/examples/singleProgramUser' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + put: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program information that needs to be updated. + required: true + style: simple + explode: false + schema: + type: string + - name: userId + in: path + description: The id of the user information that needs to be updated. + required: true + style: simple + explode: false + schema: + type: string + summary: Update specified user in the specified program + description: Update user in the program + operationId: putProgramUser + requestBody: + description: Program user information to update + content: + application/json: + schema: + $ref: '#/components/schemas/newProgramUserRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/programUserResponse' + examples: + singleProgramUser: + $ref: '#/components/examples/singleProgramUser' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + delete: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: userId + in: path + description: The id of the user + required: true + style: simple + explode: false + schema: + type: string + summary: Deactivates the user in the specified program + description: Deactivates the user in the specified program + operationId: deleteProgramUser + responses: + "200": + description: OK + + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/{id}/locations: + get: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Get list of all locations in the specified program + description: Get list of all locations in program + operationId: getProgramLocations + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/locationsResponse' + examples: + locationsExample1: + $ref: '#/components/examples/arrayOfLocations' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + post: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + summary: Create a location in specified program + description: Add location to the program + operationId: createProgramLocation + requestBody: + description: Location information to create + content: + application/json: + schema: + $ref: '#/components/schemas/newProgramLocationRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/locationsResponseResult' + example: + metadata: + datafiles: [] + pagination: + currentPage: 1 + pageSize: 1 + totalCount: 1 + totalPages: 1 + status: [] + result: + id: d2263532-1fa3-49a6-9a66-957f313c8ed2 + country_name: United States of America + country_alpha_2_code: US + country_alpha_3_code: USA + environment_type: field + accessibility: public + topography: valley + name: Nick's Field + abbreviation: NF + coordinates: { + "geometry": { + "coordinates": [ + -76.506042, + 42.417373, + 123 + ], + "type": "Point" + }, + "type": "Feature" + } + coordinate_uncertainty: 0 + coordinate_description: Northwest corner of field + slope: 1 + exposure: none + documentation_url: http://www.nick.com + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "409": + description: Conflict + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Email already exists +/programs/{id}/locations/search: + post: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Search programs + description: Search programs using filters + operationId: searchProgramLocations + requestBody: + description: Search request + content: + application/json: + schema: + type: object + properties: + filter: + type: array + items: + type: object + properties: + field: + type: string + enum: [name, abbreviation, slope, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + value: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/locationsResponse' + examples: + locationsExample1: + $ref: '#/components/examples/arrayOfLocations' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{id}/locations/{locationId}: + get: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: locationId + in: path + description: The id of the location + required: true + style: simple + explode: false + schema: + type: string + summary: Get specified location in the specified program + description: Get location in the program + operationId: getProgramLocation + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/locationsResponseSingle' + examples: + locationsExample1: + $ref: '#/components/examples/singleLocation' + + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + put: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program information that needs to be updated. + required: true + style: simple + explode: false + schema: + type: string + - name: locationId + in: path + description: The id of the location + required: true + style: simple + explode: false + schema: + type: string + summary: Update specified location in the specified program + description: Update location in the program + operationId: putLocation + requestBody: + description: Program location information to update + content: + application/json: + schema: + $ref: '#/components/schemas/newProgramLocationRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/locationsResponseSingle' + examples: + singleProgramLocation: + $ref: '#/components/examples/singleLocation' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + delete: + tags: + - programs + parameters: + - name: id + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + - name: locationId + in: path + description: The id of the location + required: true + style: simple + explode: false + schema: + type: string + summary: Remove location from the specified program + description: Remove location from the specified program + operationId: deleteProgramLocation + responses: + "200": + description: OK + + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/roles: + get: + tags: + - roles + summary: Get list of all roles in the system. + description: Get list of all roles + operationId: getRoles + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/rolesResponse' + examples: + arrayOfRoles: + $ref: '#/components/examples/arrayOfRoles' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action +/programs/roles/{id}: + get: + tags: + - roles + summary: Get role information + description: Get a specific role + operationId: getRoleById + parameters: + - name: id + in: path + description: The id of the role information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/rolesResponseSingle' + examples: + singleRole: + $ref: '#/components/examples/singleRole' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/roles: + get: + tags: + - roles + summary: Get list of all system roles in the system. + description: Get list of all system roles + operationId: getSystemRoles + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/rolesResponse' + examples: + arrayOfRoles: + $ref: '#/components/examples/arrayOfSystemRoles' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action +/roles/{id}: + get: + tags: + - roles + summary: Get system role information + description: Get a specific system role + operationId: getSystemRoleById + parameters: + - name: id + in: path + description: The id of the system role information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/rolesResponseSingle' + examples: + singleSystemRole: + $ref: '#/components/examples/singleSystemRole' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/{programId}/traits: + get: + tags: + - traits + summary: Get all traits in a given program + description: Get all traits in a given program + operationId: getTraits + parameters: + - name: programId + in: path + description: Id of program to get traits for + required: true + style: simple + explode: false + schema: + type: string + - name: full + in: query + description: True = get detailed properties of traits. False = get only base properties of trait. + required: false + explode: false + schema: + type: boolean + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/multipleTraitsResponse' + examples: + multipleTraitsResponse: + $ref: '#/components/examples/arrayOfTraits' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + post: + tags: + - traits + summary: Create a list of traits + description: Create a list of traits in a given program + operationId: postTraits + parameters: + - name: programId + in: path + description: Id of program to get traits for + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New trait object + content: + application/json: + schema: + $ref: '#/components/schemas/arrayOfNewTraits' + example: + - traitName: "Test Trait" + traitClass: "morphological" + attribute: "height" + defaultValue: "defaultValue" + mainAbbreviation: "t1" + abbreviations: ["t1","t2"] + synonyms: ["stalk height"] + programObservationLevel: + name: "Plant" + method: + methodClass: "Counting" + description: "A test method" + formula: "a^2+b^2=c^2" + scale: + scaleName: "Test Scale" + dataType: "Numerical" + decimalPlaces: 3 + validValueMax: 9999 + validValueMin: 1 + categories: + - label: "test1" + value: "value1" + - label: "test2" + value: "value2" + tags: ["favorites", "leaf length"] + fullName: "Test Trait Full Name" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/multipleTraitsResponse' + examples: + multipleTraitsResponse: + $ref: '#/components/examples/arrayOfTraits' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "422": + description: Multi-error UnprocessableEntity + content: + application/json: + schema: + $ref: "#/components/schemas/validatorErrorResponse" + example: + rowErrors: + - rowIndex: 1 + errors: + - field: "programObservationLevel" + errorMessage: "Missing trait name" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - field: "abbreviations" + errorMessage: "Abbreviations already exist" + httpStatus: "CONFLICT" + httpStatusCode: 409 + - field: "scale.dataType" + errorMessage: "Missing scale class" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - field: "scale.categories" + errorMessage: "Scale categories contain errors" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + rowErrors: + - rowIndex: 0 + errors: + - field: "scale.categories.label" + errorMessage: "Missing value" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - field: "scale.categories.value" + errorMessage: "Missing value" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + put: + tags: + - traits + summary: Edit a list of traits + description: Edit a list of traits in a given program + operationId: putTraits + parameters: + - name: programId + in: path + description: Id of program to get traits for + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: Edited trait object + content: + application/json: + schema: + $ref: '#/components/schemas/arrayOfEditedTraits' + example: + - traitId: "8b2ed0b3-f0bf-4942-8992-4bb5a9876c3a" + traitName: "Test Trait" + traitClass: "morphological" + attribute: "height" + defaultValue: "defaultValue" + mainAbbreviation: "t1" + abbreviations: ["t1","t2"] + synonyms: ["stalk height"] + programObservationLevel: + name: "Plant" + method: + methodClass: "Counting" + description: "A test method" + formula: "a^2+b^2=c^2" + scale: + scaleName: "Test Scale" + dataType: "Numerical" + decimalPlaces: 3 + validValueMax: 9999 + validValueMin: 1 + categories: + - label: "test1" + value: "value1" + - label: "test2" + value: "value2" + tags: ["favorites", "leaf length"] + fullName: "Test Trait Full Name" + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/multipleTraitsResponse' + examples: + multipleTraitsResponse: + $ref: '#/components/examples/arrayOfTraits' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "405": + description: Method Not Allowed + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Trait has associated observations and cannot be updated + "422": + description: Multi-error UnprocessableEntity + content: + application/json: + schema: + $ref: "#/components/schemas/validatorErrorResponse" + example: + rowErrors: + - rowIndex: 1 + errors: + - field: "programObservationLevel" + errorMessage: "Missing trait name" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - field: "abbreviations" + errorMessage: "Abbreviations already exist" + httpStatus: "CONFLICT" + httpStatusCode: 409 + - field: "scale.dataType" + errorMessage: "Missing scale class" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - field: "scale.categories" + errorMessage: "Scale categories contain errors" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + rowErrors: + - rowIndex: 0 + errors: + - field: "scale.categories.label" + errorMessage: "Missing value" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - field: "scale.categories.value" + errorMessage: "Missing value" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 +/programs/{programId}/traits/{traitId}/archive: + put: + tags: + - traits + summary: Archive/Restore a trait + description: Archive/Restore a trait in a given program + operationId: archiveTraits + parameters: + - name: programId + in: path + description: Id of program to get traits for + required: true + style: simple + explode: false + schema: + type: string + - name: traitId + in: path + description: Id of trait to activate/inactivate + required: true + style: simple + explode: false + schema: + type: string + - name: active + in: query + description: Boolean indicate whether to archive/restore trait. Set to false for archiving if not specified. + required: false + explode: false + schema: + type: boolean + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/singleTraitResponse' + examples: + singleTraitResponse: + $ref: '#/components/examples/singleTrait' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/{programId}/traits/search: + post: + tags: + - traits + parameters: + - name: programId + in: path + description: Id of program to get traits for + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Search traits + description: Search traits using filters + operationId: searchTraits + requestBody: + description: Search request + content: + application/json: + schema: + type: object + properties: + filter: + type: array + items: + type: object + properties: + field: + type: string + enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + value: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/multipleTraitsResponse' + examples: + multipleTraitsResponse: + $ref: '#/components/examples/arrayOfTraits' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/traits/{traitId}: + get: + tags: + - traits + summary: Get a single trait by traitId + description: Gets a single trait with full level of detail + operationId: getTrait + parameters: + - name: programId + in: path + description: Id of program to get trait in + required: true + style: simple + explode: false + schema: + type: string + - name: traitId + in: path + description: Id of trait to get trait for + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/singleTraitResponse' + examples: + singleTraitResponse: + $ref: '#/components/examples/singleTrait' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/{programId}/traits/{traitId}/editable: + get: + tags: + - traits + summary: Check if a trait is editable + description: If observations are associated with trait, it is not editable + operationId: getTraitEditable + parameters: + - name: programId + in: path + description: Id of program to get trait in + required: true + style: simple + explode: false + schema: + type: string + - name: traitId + in: path + description: Id of trait to get trait for + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/traitEditableResponse' + examples: + traitEditableResponse: + $ref: '#/components/examples/editable' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/{programId}/traits/tags: + get: + tags: + - traits + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + summary: Get all tags used for traits in a program + description: Get all tags used for traits in a program + operationId: getTraitTags + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/tagsResponse' + examples: + tagsResponse: + $ref: '#/components/examples/tagsResponse' + '401': + $ref: '#/components/responses/401Unauthorized' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/observation-levels: + get: + tags: + - observation levels + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + summary: Get all observation levels in the program + description: Get all observation levels in the program + operationId: getObservationLevels + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/observationLevelResponse' + examples: + observationLevelsResponse: + $ref: '#/components/examples/observationLevelResponse' + '401': + $ref: '#/components/responses/401Unauthorized' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/trait-upload: + put: + tags: + - uploads + parameters: + - name: programId + in: path + description: The id of the program + required: true + style: simple + explode: false + schema: + type: string + summary: Upload the trait csv/xls/xlsx file data + description: Upload trait file data for the user making the request in the indicated program. Only one trait upload at a time can exist per user per program. + operationId: putTraitUpload + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + encoding: + file: + contentType: text/csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/traitUploadResponse' + examples: + traitUploadResponse: + $ref: '#/components/examples/traitUploadData' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + "422": + description: Multi-error UnprocessableEntity + content: + application/json: + schema: + $ref: "#/components/schemas/validatorErrorResponse" + example: + rowErrors: + - rowIndex: 2 + errors: + - column: "Trait level" + errorMessage: "Missing trait name" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - column: "Trait abbreviations" + errorMessage: "Abbreviations already exist" + httpStatus: "CONFLICT" + httpStatusCode: 409 + - column: "Scale class" + errorMessage: "Missing scale class" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + get: + tags: + - uploads + summary: Get the trait upload data + description: Gets the trait upload data for the specified program and requesting user + operationId: getTraitUpload + parameters: + - name: programId + in: path + description: Id of program to get trait upload in + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/traitUploadResponse' + examples: + traitUploadResponse: + $ref: '#/components/examples/traitUploadData' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found + delete: + tags: + - uploads + parameters: + - name: programId + in: path + description: Id of program to delete trait upload from + required: true + style: simple + explode: false + schema: + type: string + summary: Delete trait upload + description: Delete trait upload for the specified program and requesting user + operationId: deleteTraitUpload + responses: + "200": + description: OK + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/programs/{programId}/trait-upload/search: + post: + tags: + - uploads + parameters: + - name: programId + in: path + description: Id of program to get trait upload for + required: true + style: simple + explode: false + schema: + type: string + - in: query + description: Field to sort the results by. + name: sortField + required: false + schema: + type: string + enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/sortOrder' + summary: Search trait upload + description: Search trait upload using filters + operationId: searchTraitUpload + requestBody: + description: Search request + content: + application/json: + schema: + type: object + properties: + filter: + type: array + items: + type: object + properties: + field: + type: string + enum: [name, abbreviations, mainAbbreviation, synonyms, level, status, methodDescription, methodClass, methodFormula, scaleName, scaleClass, scaleDecimalPlaces, scaleLowerLimit, scaleUpperLimit, scaleCategories, createdAt, updatedAt, createdByUserId, createdByUserName, updatedByUserId, updatedByUserName] + value: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/traitUploadResponse' + examples: + traitUploadResponse: + $ref: '#/components/examples/traitUploadData' + '400': + $ref: '#/components/responses/400BadRequest' + '401': + $ref: '#/components/responses/401Unauthorized' + "404": + $ref: '#/components/responses/404NotFound' +/programs/{programId}/trait-upload/{traitUploadId}: + post: + tags: + - uploads + parameters: + - name: programId + in: path + description: Id of program to get trait upload for + required: true + style: simple + explode: false + schema: + type: string + - name: traitUploadId + in: path + description: Id of the trait upload to save + required: true + style: simple + explode: false + schema: + type: string + summary: Confirm and save existing trait upload as traits + description: Confirm and save existing trait upload as traits + operationId: postTraitUpload + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/multipleTraitsResponse' + examples: + multipleTraitsResponse: + $ref: '#/components/examples/arrayOfTraits' + '401': + $ref: '#/components/responses/401Unauthorized' + '404': + $ref: '#/components/responses/404NotFound' + '403': + $ref: '#/components/responses/403Forbidden' + '422': + description: Multi-error UnprocessableEntity + content: + application/json: + schema: + $ref: "#/components/schemas/validatorErrorResponse" + example: + rowErrors: + - rowIndex: 0 + errors: + - column: "Trait level" + errorMessage: "Missing trait name" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 + - column: "Trait abbreviations" + errorMessage: "Abbreviations already exist" + httpStatus: "CONFLICT" + httpStatusCode: 409 + - column: "Scale class" + errorMessage: "Missing scale class" + httpStatus: "UNPROCESSABLE_ENTITY" + httpStatusCode: 422 +/health: + get: + tags: + - server management + summary: checks if the server is up and able to be contacted + description: checks if the server is up and able to be contacted + operationId: health + responses: + "200": + description: OK + content: + application/json: + example: + status: "UP" +/api-token: + get: + tags: + - token management + parameters: + - in: query + name: returnUrl + schema: + type: string + description: return url to redirect to + summary: Get api token + description: Get api token for user making the request + operationId: token + responses: + "303": + description: Redirect +/server-info: + get: + tags: + - server management + summary: return the server information about the running instance + description: return the server information, including the version of bi-api, and a link to to the release/commit of that version + operationId: getServerInfo + responses: + "200": + description: OK + content: + application/json: + example: + versionName: 0.1.0, + versionInfo: https://github.com/Breeding-Insight/bi-api/releases/tag/v0.1.0 +/countries: + get: + tags: + - countries + summary: Get list of all countries in the system. + description: Get list of all countries + operationId: getCountries + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/countriesResponse' + examples: + arrayOfCountries: + $ref: '#/components/examples/arrayOfCountries' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action +/countries/{id}: + get: + tags: + - countries + summary: Get country information + description: Get a specific country + operationId: getCountryById + parameters: + - name: id + in: path + description: The id of the country information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/countriesResponseSingle' + examples: + singleCountry: + $ref: '#/components/examples/singleCountry' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/topography-options: + get: + tags: + - topography options + summary: Get list of all topography options in the system. + description: Get list of all topography options + operationId: getTopographyOptions + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/topographiesResponse' + examples: + arrayOfTopographies: + $ref: '#/components/examples/arrayOfTopographyOptions' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action +/topography-options/{id}: + get: + tags: + - topography options + summary: Get topography option information + description: Get a specific topography option + operationId: getTopographyOptionById + parameters: + - name: id + in: path + description: The id of the topography option information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/topographyOptionsResponseSingle' + examples: + singleTopography: + $ref: '#/components/examples/singleTopographyOption' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/accessibility-options: + get: + tags: + - accessibility options + summary: Get list of all accessibility options in the system. + description: Get list of all accessibility options + operationId: getAccessibilityOptions + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/accessibilityOptionsResponse' + examples: + arrayOfAccessibilities: + $ref: '#/components/examples/arrayOfAccessibilityOptions' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action +/accessibility-options/{id}: + get: + tags: + - accessibility options + summary: Get accessibility option information + description: Get a specific accessibility option + operationId: getAccessibilityOptionById + parameters: + - name: id + in: path + description: The id of the accessibility option information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/accessibilityOptionsResponseSingle' + examples: + singleAccessibility: + $ref: '#/components/examples/singleAccessibilityOption' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +/environment-data-types: + get: + tags: + - environment data types + summary: Get list of all environment data types in the system. + description: Get list of all environment data types + operationId: getEnvironmentDataTypes + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/environmentDataTypesResponse' + examples: + arrayOfEnvironmentDataTypes: + $ref: '#/components/examples/arrayOfEnvironmentDataTypes' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action +/environment-data-types/{id}: + get: + tags: + - environmentDataTypes + summary: Get environment data type information + description: Get a specific environment data type + operationId: getEnvironmentDataTypeById + parameters: + - name: id + in: path + description: The id of the environment data type information that needs to be fetched. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/environmentDataTypesResponseSingle' + examples: + singleEnvironmentDataType: + $ref: '#/components/examples/singleEnvironmentDataType' + "400": + description: Bad Request + content: + application/json: + schema: + type: string + example: |- + ERROR - 2018-10-08T20:15:11Z - Malformed JSON Request Object + ERROR - 2018-10-08T20:15:11Z - Invalid query parameter + ERROR - 2018-10-08T20:15:11Z - Required parameter is missing + "401": + description: Unauthorized + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - Missing or expired authorization + token + "403": + description: Forbidden + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - User does not have permission + to perform this action + "404": + description: Not Found + content: + application/json: + schema: + type: string + example: ERROR - 2018-10-08T20:15:11Z - The requested object DbId is + not found +[end of docs/openapi.yaml] diff --git a/docs/openapi/tags.yaml b/docs/openapi/tags.yaml new file mode 100644 index 000000000..ced39f6c2 --- /dev/null +++ b/docs/openapi/tags.yaml @@ -0,0 +1,28 @@ +- name: users + description: User Management +- name: programs + description: Program Management +- name: roles + description: Role Information +- name: traits + description: Trait Management +- name: uploads + description: Upload Management +- name: breeding methods + description: Breeding Method Management +- name: jobs + description: Job Progress Management +- name: ontology + description: Ontology Management +- name: experiments + description: Experiment Management +- name: species + description: Species Management +- name: genotype data upload + description: Genotype Data Upload Management +- name: sample submissions + description: Sample Submission Management +- name: oidc + description: OIDC Management +- name: importer + description: Importer Management