Skip to content

Instantly share code, notes, and snippets.

@labiak
Last active November 26, 2018 15:57
Show Gist options
  • Save labiak/1697ee835c90a88577d6c528a954c84a to your computer and use it in GitHub Desktop.
Save labiak/1697ee835c90a88577d6c528a954c84a to your computer and use it in GitHub Desktop.
{
"routes": [
{
"method": "GET",
"path": "/users/me",
"handler": "User.me",
"config": {
"policies": [],
"prefix": ""
}
},
{
"method": "POST",
"path": "/auth/local",
"handler": "Auth.callback",
"config": {
"policies": ["plugins.users-permissions.ratelimit"],
"prefix": ""
}
},
{
"method": "POST",
"path": "/auth/local/register",
"handler": "Auth.register",
"config": {
"policies": ["plugins.users-permissions.ratelimit"],
"prefix": ""
}
},
{
"method": "GET",
"path": "/auth/:provider/callback",
"handler": "Auth.callback",
"config": {
"policies": [],
"prefix": ""
}
},
{
"method": "POST",
"path": "/auth/forgot-password",
"handler": "Auth.forgotPassword",
"config": {
"policies": ["plugins.users-permissions.ratelimit"],
"prefix": ""
}
},
{
"method": "POST",
"path": "/auth/reset-password",
"handler": "Auth.changePassword",
"config": {
"policies": ["plugins.users-permissions.ratelimit"],
"prefix": ""
}
},
{
"method": "GET",
"path": "/auth/email-confirmation",
"handler": "Auth.emailConfirmation",
"config": {
"policies": [],
"prefix": ""
}
},
{
"method": "GET",
"path": "/things",
"handler": "Thing.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/things/count",
"handler": "Thing.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/things/:_id",
"handler": "Thing.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/things",
"handler": "Thing.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/things/:_id",
"handler": "Thing.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/things/:_id",
"handler": "Thing.destroy",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/zones",
"handler": "Zone.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/zones/count",
"handler": "Zone.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/zones/:_id",
"handler": "Zone.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/zones",
"handler": "Zone.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/zones/:_id",
"handler": "Zone.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/zones/:_id",
"handler": "Zone.destroy",
"config": {
"policies": []
}
}
]
}
{
"thing": {
"uuid": {
"type": "string",
"required": true,
"unique": true,
"private": true,
"configurable": false,
"description": "AWS IoT thingId"
},
"arn": {
"type": "string",
"unique": true,
"configurable": false
},
"zone": {
"model": "zone"
},
"owner": {
"model": "user",
"plugin": "users-permissions"
},
"story": {
"type": "json",
"description": "Array of telemetry measurements with timestamp"
}
},
"zone": {
"parent": {
"model": "zone"
},
"children": {
"collection": "zone",
"via": "parent",
"isVirtual": true,
"description": "subzones"
},
"things": {
"collection": "thing",
"via": "zone",
"isVirtual": true
}
},
"user": {
"username": {
"type": "string",
"minLength": 3,
"unique": true,
"configurable": false,
"required": true
},
"email": {
"type": "email",
"minLength": 6,
"configurable": false,
"required": true
},
"password": {
"type": "password",
"minLength": 6,
"configurable": false,
"private": true
},
"confirmed": {
"type": "boolean",
"default": false,
"configurable": false
},
"blocked": {
"type": "boolean",
"default": false,
"configurable": false
},
"role": {
"model": "role",
"via": "users",
"plugin": "users-permissions",
"configurable": false
},
"givenName": {
"type": "string",
"maxLength": 64,
"configurable": false
},
"familyName": {
"type": "string",
"maxLength": 64,
"configurable": false
},
"address": {
"type": "string",
"maxLength": 64,
"configurable": false
},
"telephone": {
"type": "string",
"maxLength": 32
},
"image": {
"model": "file",
"via": "related",
"plugin": "upload",
"isVirtual": true,
"description": "Avatar"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment