|
| 1 | +# SPACE |
| 2 | + |
| 3 | +## Space Details |
| 4 | + |
| 5 | +> `GET` /v1/spaces <br> `GET` /v1/spaces/{space_id} |
| 6 | +
|
| 7 | +```shell |
| 8 | +curl "https://api.recursion.space/v1/spaces/{xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx}" \ |
| 9 | + -H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
| 10 | +``` |
| 11 | + |
| 12 | +> RESPONSE |
| 13 | +
|
| 14 | +```json |
| 15 | +[ |
| 16 | + { |
| 17 | + "id": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx", |
| 18 | + "name": "The Void", |
| 19 | + "address": "1331 12th Ave", |
| 20 | + "address2": "STE 205", |
| 21 | + "city": "Altoona", |
| 22 | + "state": "PA", |
| 23 | + "zipcode": "16601", |
| 24 | + "country": "United States", |
| 25 | + "email": "demo@recursion.space", |
| 26 | + "timezone": "UTC" |
| 27 | + } |
| 28 | +] |
| 29 | +``` |
| 30 | + |
| 31 | +Return a list of spaces owned by the API Token holder, or return information on a specific space by filtering with the space id. |
| 32 | + |
| 33 | +### Returns |
| 34 | + |
| 35 | +| Parameter | Type | Description | |
| 36 | +| --------- | :----: | ---------------------------------------- | |
| 37 | +| id | string | The unique space identifier. | |
| 38 | +| name | string | Your name for the space. | |
| 39 | +| address | string | The physical address of the space. | |
| 40 | +| address2 | string | Address line for STE, UNIT, BLD, ect. | |
| 41 | +| city | string | City component of the spaces address. | |
| 42 | +| state | string | State component of the spaces address. | |
| 43 | +| zipcode | string | Zipcode component of the spaces address. | |
| 44 | +| country | string | Country where the space is located. | |
| 45 | +| email | string | Primary/General email for the space. | |
| 46 | +| timezone | string | Selected timezone for the space. | |
| 47 | + |
| 48 | +## Operators Details |
| 49 | + |
| 50 | +> `GET` /v1/operators/{space_id} |
| 51 | +
|
| 52 | +```shell |
| 53 | +curl "https://api.recursion.space/v1/operators/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" \ |
| 54 | + -H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
| 55 | +``` |
| 56 | + |
| 57 | +> RESPONSE |
| 58 | +
|
| 59 | +```json |
| 60 | +[ |
| 61 | + { |
| 62 | + "facility": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx", |
| 63 | + "cardNumber": "0123456789", |
| 64 | + "phone_number": , |
| 65 | + "address": "1331 12th Ave", |
| 66 | + "city": "Altoona", |
| 67 | + "state": "PA", |
| 68 | + "zip_code": "16601", |
| 69 | + "username": "DemoUser", |
| 70 | + "first_name": "Lorem", |
| 71 | + "last_name": "Ipsum", |
| 72 | + "email": "demo@recursion.space", |
| 73 | + }, |
| 74 | +] |
| 75 | +``` |
| 76 | + |
| 77 | +Retrive information for all operators ("admins") for the selected space. |
| 78 | + |
| 79 | +### Returns |
| 80 | + |
| 81 | +| Parameter | Type | Description | |
| 82 | +| ------------ | :----: | --------------------------------------------------- | |
| 83 | +| facility | string | The facility id for which the operator belongs to. | |
| 84 | +| cardNumber | string | The RFID number assigned to the operator. | |
| 85 | +| phone_number | string | Operator provided phone number. | |
| 86 | +| address | string | Operator provided address. | |
| 87 | +| city | string | City component of address provided by operator. | |
| 88 | +| state | string | State component of address provided by operator. | |
| 89 | +| zip_code | string | Zip Code component of address provided by operator. | |
| 90 | +| username | string | Username associated with the operators account. | |
| 91 | +| first_name | string | Operators first name. | |
| 92 | +| last_name | string | Operators last name. | |
| 93 | +| email | string | Operator provided email. | |
| 94 | + |
| 95 | +## Member Details |
| 96 | + |
| 97 | +> `GET` /v1/members/{space_id} |
| 98 | +
|
| 99 | +```shell |
| 100 | +curl "https://api.recursion.space/v1/members/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" \ |
| 101 | + -H "Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
| 102 | +``` |
| 103 | + |
| 104 | +> RESPONSE |
| 105 | +
|
| 106 | +```json |
| 107 | +[ |
| 108 | + { |
| 109 | + "cardNumber": "0123456789", |
| 110 | + "access_group": 123, |
| 111 | + "phone_number": "calico", |
| 112 | + "address": 6, |
| 113 | + "city": 7, |
| 114 | + "state": , |
| 115 | + "zip_code": , |
| 116 | + "username": , |
| 117 | + "first_name": , |
| 118 | + "last_name": , |
| 119 | + "email": , |
| 120 | + "restricted_nodes": [] |
| 121 | + }, |
| 122 | +] |
| 123 | +``` |
| 124 | + |
| 125 | +Retrieve information for all members associated with a space. |
| 126 | + |
| 127 | +### Returns |
| 128 | + |
| 129 | +| Parameter | Type | Description | |
| 130 | +| ---------------- | :-----: | ------------------------------------------------------------------------- | |
| 131 | +| cardNumber | string | The RFID number assigned to your member. | |
| 132 | +| access_group | integer | The ID for the access group that the member belongs to. | |
| 133 | +| phone_number | string | Member provided phone number. | |
| 134 | +| address | string | Member provided address. | |
| 135 | +| city | string | City component of address provided by member. | |
| 136 | +| state | string | State component of address provided by member. | |
| 137 | +| zip_code | string | Zip Code component of address provided by member. | |
| 138 | +| username | string | Username associated with the members account. | |
| 139 | +| first_name | string | Members first name. | |
| 140 | +| last_name | string | Members last name. | |
| 141 | +| email | string | Member provided email. | |
| 142 | +| restricted_nodes | array | List of IDs the member does not have access to within their access group. | |
| 143 | + |
| 144 | +## Access Details |
| 145 | + |
| 146 | +> GET /v1/permissions/{space_id} |
| 147 | +
|
| 148 | +```shell |
| 149 | +curl "https://api.recursion.space/v1/permissions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" \ |
| 150 | + -H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
| 151 | +``` |
| 152 | + |
| 153 | +> RESPONSE |
| 154 | +
|
| 155 | +```json |
| 156 | +[ |
| 157 | + { |
| 158 | + "id": 2, |
| 159 | + "name": "Max", |
| 160 | + "startTime": "unknown", |
| 161 | + "endTime": 5, |
| 162 | + "monday": 10, |
| 163 | + "tuesday": false, |
| 164 | + "wednesday": false, |
| 165 | + "thursday": false, |
| 166 | + "friday": false, |
| 167 | + "saturday": false, |
| 168 | + "sunday": false, |
| 169 | + "twenty_four_seven": true, |
| 170 | + "default_fallback": false, |
| 171 | + "facility": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx", |
| 172 | + "allowedNodes": [19] |
| 173 | + } |
| 174 | +] |
| 175 | +``` |
| 176 | + |
| 177 | +Returns the available permissions, or access groups, for the space. |
| 178 | + |
| 179 | +### Returns |
| 180 | + |
| 181 | +| Parameter | Type | Description | |
| 182 | +| ----------------- | :-----------: | --------------------------------------------------------------------- | |
| 183 | +| id | integer | The ID of the access group. | |
| 184 | +| name | string | Name descriptor for the access group. | |
| 185 | +| startTime | integer | The daily start time when access is permitted for this group. | |
| 186 | +| endTime | integer | The daily end time when access is no longer permitted for this group. | |
| 187 | +| monday | boolean | True if access is is allowed for a Monday, otherwise false. | |
| 188 | +| tuesday | boolean | True if access is is allowed for a Tuesday, otherwise false. | |
| 189 | +| wednesday | boolean | True if access is is allowed for a Wednesday, otherwise false. | |
| 190 | +| thursday | boolean | True if access is is allowed for a Thursday, otherwise false. | |
| 191 | +| friday | boolean | True if access is is allowed for a Friday, otherwise false. | |
| 192 | +| saturday | boolean | True if access is is allowed for a Saturday, otherwise false. | |
| 193 | +| sunday | boolean | True if access is is allowed for a Sunday, otherwise false. | |
| 194 | +| twenty_four_seven | boolean | Set true if group is allowed access 24 hours a day, 7 days a week. | |
| 195 | +| facility | string | The ID for which the access group belongs to. | |
| 196 | +| allowedNodes | integer array | List of nodes permitted to be used within this group. | |
0 commit comments