diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-14 16:50:23 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-17 17:06:51 +0200 |
| commit | 05d2318538eba71ac0555dc5ec146499d9cb0592 (patch) | |
| tree | 6163e6429879109e322a4c0883fab168031aa109 /opendc-api-spec.yml | |
| parent | 0c6ccca5fac44ab40671627fd3181e9b138672fa (diff) | |
api: Remove user handling from OpenDC API server
This change removes any of the user handling and endpoints from the
OpenDC API server. The API server does not need to store user
information other than an identifier in the database.
Diffstat (limited to 'opendc-api-spec.yml')
| -rw-r--r-- | opendc-api-spec.yml | 178 |
1 files changed, 7 insertions, 171 deletions
diff --git a/opendc-api-spec.yml b/opendc-api-spec.yml index f195983b..1f7c5697 100644 --- a/opendc-api-spec.yml +++ b/opendc-api-spec.yml @@ -9,129 +9,20 @@ schemes: - https paths: - '/users': - get: - tags: - - users - description: Search for a User using their email address. - parameters: - - name: email - in: query - description: User's email address. - required: true - type: string - responses: - '200': - description: Successfully searched Users. - schema: - $ref: '#/definitions/User' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '404': - description: User not found. - post: - tags: - - users - description: Add a new User. - parameters: - - name: user - in: body - description: The new User. - required: true - schema: - $ref: '#/definitions/User' - responses: - '200': - description: Successfully added User. - schema: - $ref: '#/definitions/User' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '409': - description: User already exists. - '/users/{userId}': + '/projects': get: tags: - - users - description: Get this User. - parameters: - - name: userId - in: path - description: User's ID. - required: true - type: string - responses: - '200': - description: Successfully retrieved User. - schema: - $ref: '#/definitions/User' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '404': - description: User not found. - put: - tags: - - users - description: Update this User's given name and/ or family name. - parameters: - - name: userId - in: path - description: User's ID. - required: true - type: string - - name: user - in: body - description: User's new properties. - required: true - schema: - properties: - givenName: - type: string - familyName: - type: string - responses: - '200': - description: Successfully updated User. - schema: - $ref: '#/definitions/User' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '403': - description: Forbidden from updating User. - '404': - description: User not found. - delete: - tags: - - users - description: Delete this User. - parameters: - - name: userId - in: path - description: User's ID. - required: true - type: string + - projects + description: List Projects of the active user responses: '200': - description: Successfully deleted User. + description: Successfully schema: - $ref: '#/definitions/User' - '400': - description: Missing or incorrectly typed parameter. + type: array + items: + $ref: '#/definitions/Project' '401': description: Unauthorized. - '403': - description: Forbidden from deleting User. - '404': - description: User not found. - '/projects': post: tags: - projects @@ -232,39 +123,6 @@ paths: description: Forbidden from deleting Project. '404': description: Project not found. - '/projects/{projectId}/authorizations': - get: - tags: - - projects - description: Get this Project's Authorizations. - parameters: - - name: projectId - in: path - description: Project's ID. - required: true - type: string - responses: - '200': - description: Successfully retrieved Project's Authorizations. - schema: - type: array - items: - type: object - properties: - userId: - type: string - projectId: - type: string - authorizationLevel: - type: string - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '403': - description: Forbidden from retrieving this Project's Authorizations. - '404': - description: Project not found. '/projects/{projectId}/topologies': post: tags: @@ -900,28 +758,6 @@ definitions: type: string type: type: string - User: - type: object - properties: - _id: - type: string - googleId: - type: integer - email: - type: string - givenName: - type: string - familyName: - type: string - authorizations: - type: array - items: - type: object - properties: - projectId: - type: string - authorizationLevel: - type: string Prefab: type: object properties: |
