diff --git a/spec.yml b/spec.yml index ec6d04a..1398245 100644 --- a/spec.yml +++ b/spec.yml @@ -85,6 +85,13 @@ x-resources: - name: Shapes description: | "Shapes are vectors that each user can create and manage. These shapes can then be used in various ways within the Raster Foundry platform." + - name: Licenses + description: | + "A license is an official permission or permit to do, use, or own something. Users can add licenses to the data they create and share in Raster Foundry to communicate to others if and how that data can be used." + - name: Teams + description: | + "Teams represent groups of users within (and across) organizations. Each team belongs to one organization. A user can be a member of any number of teams." + tags: - name: Users @@ -484,10 +491,7 @@ paths: - Authentication - Imagery parameters: - - name: uuid - in: path - required: true - type: string + - $ref: '#/parameters/uuid' responses: 200: description: AWS credentials scoped to the upload bucket with prefix @@ -2005,7 +2009,8 @@ paths: get: summary: Get a list of licenses tags: - - Licenses + - Imagery + - Lab parameters: - $ref: '#/parameters/pageSize' - $ref: '#/parameters/page' @@ -2013,14 +2018,15 @@ paths: 200: description: SUCCESS schema: - $ref: '#/definitions/LicensePaginated' + $ref: '#/definitions/LicensesPaginated' /licenses/{licenseId}: x-resource: Licenses get: summary: Get a license based on its id tags: - - Licenses + - Imagery + - Lab parameters: - $ref: '#/parameters/licenseId' responses: @@ -2029,6 +2035,99 @@ paths: schema: $ref: '#/definitions/License' + /teams/: + x-resource: Teams + get: + summary: Get a list of teams + tags: + - Users + parameters: + - $ref: '#/parameters/pageSize' + - $ref: '#/parameters/page' + responses: + 200: + description: SUCCESS + schema: + $ref: '#/definitions/TeamsPaginated' + post: + summary: Create a team + tags: + - Users + parameters: + - name: team + in: body + required: true + schema: + $ref: '#/definitions/TeamCreate' + responses: + 201: + description: Get a newly created team + schema: + $ref: '#/definitions/Team' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + + /teams/{uuid}: + x-resource: Teams + get: + summary: Get team details + tags: + - Users + parameters: + - $ref: '#/parameters/uuid' + responses: + 200: + description: Detail about a team + schema: + $ref: '#/definitions/Team' + 404: + description: | + UUID parameter does not refer to a team or the user is not able to view the team it refers to + schema: + $ref: '#/definitions/Error' + put: + summary: Update a team + tags: + - Users + parameters: + - name: team + in: body + required: true + schema: + $ref: '#/definitions/TeamCreate' + - $ref: '#/parameters/uuid' + responses: + 204: + description: Update successful (no further processing needed) + schema: + $ref: '#/definitions/Team' + 404: + description: | + UUID parameter does not refer to a team or the user is not able to view the team it refers to + schema: + $ref: '#/definitions/Error' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + delete: + summary: Delete a team + description: delete a team based on team id + tags: + - Users + parameters: + - $ref: '#/parameters/uuid' + responses: + 204: + description: Deletion successful (no content) + 404: + description: | + UUID parameter does not refer to a team or the user is not able to view the team it refers to + schema: + $ref: '#/definitions/Error' + parameters: orderingBase: @@ -2809,6 +2908,52 @@ definitions: required: - name - id + + TeamsPaginated: + allOf: + - $ref: '#/definitions/PaginatedResponse' + - type: object + properties: + results: + type: array + items: + $ref: '#/definitions/Team' + + Team: + allOf: + - type: object + properties: + createdBy: + type: string + description: User who created the object + readOnly: true + modifiedBy: + type: string + description: User who most recently modified the object + readOnly: true + id: + type: string + format: UUID + description: Team ID + - $ref: '#/definitions/TimeModelMixin' + - $ref: '#/definitions/TeamCreate' + + + TeamCreate: + type: object + properties: + organizationId: + type: string + format: UUID + description: uuid for organization + name: + type: string + description: name of a team + settings: + type: object + description: settings for a team, default to {} + + Geometry: type: object description: GeoJSON geometry @@ -2937,7 +3082,7 @@ definitions: type: string description: URL to details of a license - LicensePaginated: + LicensesPaginated: allOf: - $ref: '#/definitions/PaginatedResponse' - type: object