Skip to content

Instantly share code, notes, and snippets.

@ferromir
Last active August 29, 2015 14:07
Show Gist options
  • Save ferromir/218192401f9ce11442df to your computer and use it in GitHub Desktop.
Save ferromir/218192401f9ce11442df to your computer and use it in GitHub Desktop.
Ekho APIv2 JSON schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"account": {
"type": "object",
"properties": {
"account_type": { "enum": [ "individual", "organization" ]
},
"name": { "type": "string" },
"email": { "type": "string", "format": "email" },
"full_name": { "type": "string" },
"hashed_password": { "type": "string" },
"key": { "type": "string" },
"is_admin": { "type": "boolean" },
"tokens": { "type": "array", "item": { "$ref": "#/token" } },
"teams": { "type": "array", "item": { "$ref": "#/team" }
},
"focussets": { "type": "array", "item": { "$ref": "#/focusset" } },
"shares": { "type": "array", "item": { "$ref": "#/share" } }
}
},
"token": {
"type": "object",
"properties": {
"code": { "type": "string" },
"expires_at": { "type": "string", "format": "date-time" },
"domains": { "type": "array", "item": { "type": "string" } }
}
},
"team": {
"type": "object",
"properties": {
"name": { "type": "string" },
"members": { "type": "array", "item": { "type": "string" } },
"focussets": { "type": "array", "item": { "type": "string" } },
"can_create": { "type": "boolean" },
"can_delete": { "type": "boolean" },
"can_read": { "type": "boolean" },
"can_update": { "type": "boolean" },
"can_start": { "type": "boolean" },
"can_stop": { "type": "boolean" },
"can_archive": { "type": "boolean" },
"can_restore": { "type": "boolean" }
}
},
"share": {
"type": "object",
"properties": {
"account": { "type": "string" },
"focusset": { "type": "string" },
"can_read": { "type": "boolean" },
"can_update": { "type": "boolean" },
"can_start": { "type": "boolean" },
"can_stop": { "type": "boolean" },
"can_archive": { "type": "boolean" },
"can_restore": { "type": "boolean" }
}
},
"focusset": {
"type": "object",
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"creator": { "type": "string" },
"status": {
"enum": [
"new",
"starting",
"running",
"stopping",
"stopped",
"archived",
"disabled",
"failed"
]
},
"created_at": { "type": "string", "format": "date-time" },
"status_changed_at": { "type": "string", "format": "date-time" },
"current_version": { "type": "integer" },
"versions": { "type": "array", "item": { "$ref": "#/focusset_version" } }
}
},
"focusset_version": {
"type": "object",
"properties": {
"number": { "type": "integer" },
"definition": { "type": "string" },
"definition_type": { "enum": [ "simple", "advanced" ] },
"created_at": { "type": "string", "format": "date-time" },
"sample_size": { "type": "number" },
"augmentation": { "$ref": "#/augmentation" },
"subscription_id": { "type": "string" },
"subscription_hash": { "type": "string" }
}
},
"augmentation": {
"type": "object",
"properties": {
"emotion": { "type": "number" },
"impact": { "type": "number" },
"opinion": { "type": "number" },
"interest": { "type": "number" }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment