Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Add spec for team CRUD endpoint #6

Merged
merged 3 commits into from
Apr 10, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 153 additions & 8 deletions spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quotes here don't enclose the whole blurb.

- 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2005,22 +2009,24 @@ paths:
get:
summary: Get a list of licenses
tags:
- Licenses
- Imagery
- Lab
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/page'
responses:
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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2937,7 +3082,7 @@ definitions:
type: string
description: URL to details of a license

LicensePaginated:
LicensesPaginated:
allOf:
- $ref: '#/definitions/PaginatedResponse'
- type: object
Expand Down