-
Notifications
You must be signed in to change notification settings - Fork 33
Feature/apinf api design #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9c21ac5
Basic description.
brylie fb21878
Versioning.
brylie 090b94e
URL Route
brylie 505676d
Sub-headings.
brylie 09f514c
API Documentation
brylie ce875c7
System Model
brylie 1878b19
Users
brylie 14416e4
Individual Users
brylie 9b6292f
API Backends
brylie bd952fa
Basic API description
brylie aaa1697
Users endpoint and User definition
brylie 2ddf0bd
Changed to user_id
brylie 32694b4
Error definition.
brylie 4426f9c
API Bacends endpoint and model
brylie cbd1039
Plural model definition.
brylie 4d7f777
Changed user_id to id
brylie 09b21ab
Vendor neutral.
brylie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Apinf API Design | ||
| This document contains the design overview for the Apinf Administrative API. | ||
|
|
||
| ## URL Route | ||
| The Apinf Administrative API will be designated by the `/api/` URL route: | ||
|
|
||
| ``` | ||
| https://apinf.com/api/.../ | ||
| ``` | ||
|
|
||
| ## Versioning | ||
| The Apinf API will change over time. As such, we will use a numbered versioning scheme. Versions will be indicated by integers, starting with **1**. Version numbers will be located in the project URL, such as: | ||
|
|
||
| ``` | ||
| https://apinf.com/api/v1/.../ | ||
| ``` | ||
|
|
||
| ## API Documentation | ||
| Initially, the Apinf Administrative API will be documented in [Swagger format](http://swagger.io). Swagger is chosen as it is open-source, vender-neutral, and supported by the Apinf platform itself. | ||
|
|
||
| ## System Model | ||
| The Apinf system model contains several related data collections. Each collection will be represented by an unique endpoint, with the ability to perform traversals to related data sets. | ||
|
|
||
| ### Users | ||
| Apinf users will be available via the `/users/` endpoint. | ||
|
|
||
| #### Individual Users | ||
| Individual users will be available via `/users/<userId>` | ||
|
|
||
| ### API Backends | ||
| API Backends will be available via the `/backends/` endpoint. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # This document describes the Apinf Administrative API | ||
| swagger: '2.0' | ||
| info: | ||
| title: Apinf API | ||
| description: Manage the Apinf platform via an Administrative API | ||
| version: "0.1.0" | ||
| # the domain of the service | ||
| host: apinf.com | ||
| # array of all schemes that your API supports | ||
| schemes: | ||
| - https | ||
| # will be prefixed to all paths | ||
| basePath: /api/v1 | ||
| produces: | ||
| - application/json | ||
| paths: | ||
| /users: | ||
| get: | ||
| summary: Apinf Users | ||
| description: | | ||
| The Users endpoint returns information about Apinf users | ||
| parameters: | ||
| - name: id | ||
| in: query | ||
| description: ID of a given user. | ||
| required: false | ||
| type: string | ||
| format: uuid | ||
| tags: | ||
| - Users | ||
| responses: | ||
| 200: | ||
| description: An array of users | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: '#/definitions/Users' | ||
| default: | ||
| description: Unexpected error | ||
| schema: | ||
| $ref: '#/definitions/Error' | ||
| /backends: | ||
| get: | ||
| summary: API Backends | ||
| description: | | ||
| API Backends returns an array of configured API Endpoints with their associated backend. | ||
| parameters: | ||
| - name: id | ||
| in: query | ||
| description: ID of a given API Backend. | ||
| required: false | ||
| type: string | ||
| format: uuid | ||
| tags: | ||
| - Backends | ||
| responses: | ||
| 200: | ||
| description: An array of API backends | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: '#/definitions/Backends' | ||
| default: | ||
| description: Unexpected error | ||
| schema: | ||
| $ref: '#/definitions/Error' | ||
| definitions: | ||
| Users: | ||
| properties: | ||
| id: | ||
| type: string | ||
| description: Unique identifier representing a specific user. | ||
| Backends: | ||
| properties: | ||
| id: | ||
| type: string | ||
| description: Unique identifier representing a specific API Backend | ||
| Error: | ||
| properties: | ||
| code: | ||
| type: integer | ||
| format: int32 | ||
| message: | ||
| type: string | ||
| fields: | ||
| type: string |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vender-neutral Should this be Vendor neutral?