-
-
Save reactormonk/8b7b3d66363e0bb44ea715cc628a9e80 to your computer and use it in GitHub Desktop.
This file contains 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
FORMAT: 1A | |
HOST: https://example.com/api/ | |
# API Root [/] | |
## Retrieve the Entry Point [GET] | |
+ Response 200 (application/json) | |
+ Attributes (object) | |
+ Body | |
{ | |
"companies": "/companies/1", | |
"users": "/users/2", | |
"workflowSelections": "/workflow-selections/3" | |
} | |
## Company [/companies] | |
+ Attributes | |
+ id: `unique-id` (string, required) - Unique identifier | |
+ users: `[unique-id]` (array[string], required) - Array of User ID's that belong to it | |
### Request an Account [GET /companies/{company}] | |
+ Parameters | |
+ company (string, required) - Company ID | |
+ Response 200 (application/json) | |
+ Attributes | |
+ company (Company, required) | |
+ Body | |
{ | |
"company": { | |
"id": 1, | |
"users": [2] | |
} | |
} | |
## User [/users] | |
+ Attributes | |
+ id: `unique-id` (string, required) - Unique identifier | |
+ company: `unique-id` (string, required) - Company ID | |
+ workflowSelection: `unique-id` (string, required) - Workflow Selection ID | |
+ email: `foo@bar.com` (string, required) - User email | |
### Request a User [GET /users/{user}] | |
+ Parameters | |
+ user (string, required) - User ID | |
+ Response 200 (application/json) | |
+ Attributes | |
+ user (User, required) - User Account record | |
+ Body | |
{ | |
"user": { | |
"id": 2, | |
"company": 1, | |
"workflowSelection": 3, | |
"email": "foo@bar.com" | |
} | |
} | |
## Workflow Selection [/workflow-selections] | |
+ Attributes | |
+ id: `unique-id` (string, required) - Unique identifier | |
+ user: `unique-id` (string, required) - User ID | |
+ activeDataVersion: `unique-id` (string, required) - Data Version ID that's selected | |
+ Default: `""` | |
### Request a Workflow Selection [GET /workflow-selections/{selection}] | |
+ Parameters | |
+ selection (string, required) - Selection ID | |
+ Response 200 (application/json) | |
+ Attributes | |
+ workflowSelection (Workflow Selection, required) | |
+ Body | |
{ | |
"workflowSelection": { | |
"id": 3, | |
"user": 2, | |
"activeDataVersion": 6 | |
} | |
} | |
### Save a Workflow Selection [PUT /workflow-selections/{selection}] | |
+ Parameters | |
+ selection (string, required) - Selection ID | |
+ Attributes | |
+ workflowSelection (object, required) | |
+ activeDataVersion: `unique-id` (string, optional) - Unique ID | |
+ Request (application/json) | |
+ Response 203 (application/json) | |
+ Attributes | |
+ workflowSelection (Workflow Selection, required) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment