Static
Static Service
Web service endpoints for metadata about static resources associated with a place.
Create Static
POST /statics
Create a Static associated with the place identified by the placeURI field. The minimum amount of information required is:
{ "filename" : "{filename of the static resource}", "placeURI" : "{URI of the place this static resource should be associated with}" }
A description field may optionally be included as well.
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | Any of the input fields are missing or malformed |
409 (Conflict) | Attempted to create a static resource with the same filename as an existing resource |
404 (Not Found) | The specified place cannot be found |
Create Static with Data
POST /statics
Create a Static associated with the place identified by the placeURI field. including the specified data content. The minimum amount of information required in the JSON object is:
{ "filename" : "{filename of the static resource}", "placeURI" : "{URI of the place this static resource should be associated with}" }
A description field may optionally be included as well.
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | Any of the input fields are missing or malformed |
409 (Conflict) | Attempted to create a static resource with the same filename as an existing resource |
404 (Not Found) | The specified place cannot be found |
Destroy Static
DELETE /statics/{staticID}
Delete the specified static resource.
Availability:
Available to place administrators for the place this static resource is associated with
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
staticID | String | true | ID of the static resource to be deleted |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access the specified static resource |
404 (Not Found) | Specified static resource was not found |
Get Static
GET /statics/{staticID}
Return the specified fields for the specified static resource.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
staticID | String | true | ID of the specified static resource |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access the specified static resource |
404 (Not Found) | Specified static resource was not found |
Get Statics
GET /statics
Return the specified fields for the specified static resource.
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
filter | Object[] | false | The filter criteria used to select static objects |
sort | String | false | The requested sort order |
startIndex | Integer | false | The zero-relative index of the first matching content to be returned |
count | Integer | false | The maximum number of contents to be returned |
fields | String | false | The fields to be returned on each content |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access the specified static resource |
404 (Not Found) | Specified static resource was not found |
Update Static
PUT /statics/{staticID}
Update the specified static from the specified static, and return
an updated Static representing the updated static resource.
Note that only the description
field may be modified.
Takes:
- Static containing updated information
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
staticID | String | true | ID of the specified static resource |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access the specified static resource |
404 (Not Found) | Specified static resource was not found |
Update Static with Data
PUT /statics/{staticID}
Update the specified static from the specified static, and the data content
with the specified content, and return an updated Static representing
the updated static resource. Note that only the description
field may be modified.
Takes:
- Static containing updated information
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
staticID | String | true | ID of the specified static resource |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access the specified static resource |
404 (Not Found) | Specified static resource was not found |