Skip to content

Commit

Permalink
crossbar storage api and several fixes (2600hz#2532)
Browse files Browse the repository at this point in the history
* add schemas for storage

* schema formatting

* handle connections settings

* honour schema_loader_fun

* build attachment handler

* export fetch_dataplan

* if no error codes to cache was suplied, use 'not_found'

* add is_account_admin to cb_context

* couchbeam dep update

* handle other errors in kapps_config

* swagger update

* api docs

* change spec and removed dead code

* update schema ids

* add option to ensure valid schema

* metaflows schema update

* remove fload

* update metaflows schemas

* KAZOO-5062 call correct json fun for server_id and queue_id

* KAZOO-4432 add more data by default for legacy users

* KAZOO-5060 schema validation fixes finished

* KAZOO-4432 whitespaces

* add a system_error facility to cb_context

* add summary to storage

* remove dev time code
  • Loading branch information
lazedo authored and k-anderson committed Sep 9, 2016
1 parent d9d7720 commit bc7c451
Show file tree
Hide file tree
Showing 29 changed files with 1,481 additions and 72 deletions.
10 changes: 4 additions & 6 deletions applications/crossbar/doc/ref/metaflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ Key | Description | Type | Default | Required
`binding_digit` | What DTMF will trigger the collection and analysis of the subsequent DTMF sequence | `string('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#')` | `*` | `false`
`digit_timeout` | How long to wait between DTMF presses before processing the collected sequence (milliseconds) | `integer` | | `false`
`listen_on` | Which leg(s) of the call to listen for DTMF | `string('both', 'self', 'peer')` | | `false`
`numbers` | A list of static numbers that the metaflow should match for | `object` | | `false`
`numbers.[0-9\*\#]+` | | `object` | | `false`
`numbers.[0-9\*\#]+.children` | | `#/flow` | `{}` | `false`
`numbers.[0-9\*\#]+.data` | Module Data | `object` | `{}` | `true`
`numbers.[0-9\*\#]+.module` | | `string(0..15)` | | `true`
`patterns` | The metaflow patterns | `object` | | `false`
`numbers` | A list of static numbers with their flows | `object` | | `false`
`numbers.^[0-9]+$` | | `#/definitions/metaflow` | | `false`
`patterns` | A list of patterns with their flows | `object` | | `false`
`patterns..+` | | `#/definitions/metaflow` | | `false`


#### Remove
Expand Down
103 changes: 103 additions & 0 deletions applications/crossbar/doc/ref/storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
### Storage

#### About Storage

#### Schema

Key | Description | Type | Default | Required
--- | ----------- | ---- | ------- | --------
`attachments` | | `#/definitions/storage.attachments` | | `false`
`connections` | | `#/definitions/storage.connections` | | `false`
`plan` | | `#/definitions/storage.plan` | | `false`


#### Remove

> DELETE /v2/accounts/{ACCOUNT_ID}/storage
```shell
curl -v -X DELETE \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage
```

#### Fetch

> GET /v2/accounts/{ACCOUNT_ID}/storage
```shell
curl -v -X GET \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage
```

#### Change

> POST /v2/accounts/{ACCOUNT_ID}/storage
```shell
curl -v -X POST \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage
```

#### Create

> PUT /v2/accounts/{ACCOUNT_ID}/storage
```shell
curl -v -X PUT \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage
```

#### Fetch

> GET /v2/accounts/{ACCOUNT_ID}/storage/plans
```shell
curl -v -X GET \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage/plans
```

#### Create

> PUT /v2/accounts/{ACCOUNT_ID}/storage/plans
```shell
curl -v -X PUT \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage/plans
```

#### Remove

> DELETE /v2/accounts/{ACCOUNT_ID}/storage/plans/{STORAGE_PLAN_ID}
```shell
curl -v -X DELETE \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage/plans/{STORAGE_PLAN_ID}
```

#### Fetch

> GET /v2/accounts/{ACCOUNT_ID}/storage/plans/{STORAGE_PLAN_ID}
```shell
curl -v -X GET \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage/plans/{STORAGE_PLAN_ID}
```

#### Change

> POST /v2/accounts/{ACCOUNT_ID}/storage/plans/{STORAGE_PLAN_ID}
```shell
curl -v -X POST \
-H "X-Auth-Token: {AUTH_TOKEN}" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/storage/plans/{STORAGE_PLAN_ID}
```

Loading

0 comments on commit bc7c451

Please sign in to comment.