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:
NameTypeRequiredDescription
fieldsStringfalseNames of the fields to be returned
Takes:
  • JSON object describing the static resource to be created
  • Retrieves:
  • Static describing the newly created static resource
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    fieldsStringfalseNames of the fields to be returned
    Takes:
  • A multipart of subtype form-data that will include a section with a JSON object describing the static resource to be created, and another section containing the content of the static resource
  • Retrieves:
  • Static describing the newly created static resource
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    staticIDStringtrueID of the static resource to be deleted
    Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    staticIDStringtrueID of the specified static resource
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseNames of the fields to be returned
    Retrieves:
  • Static representing the contained static resource
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    filterObject[]falseThe filter criteria used to select static objects
    sortStringfalseThe requested sort order
    startIndexIntegerfalseThe zero-relative index of the first matching content to be returned
    countIntegerfalseThe maximum number of contents to be returned
    fieldsStringfalseThe fields to be returned on each content
    Retrieves:
  • Static[] of the matched static objects
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    staticIDStringtrueID of the specified static resource
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseNames of the fields to be returned
    Takes:
  • Static containing the updated information
  • Retrieves:
  • Static representing the contained static resource
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    staticIDStringtrueID of the specified static resource
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseNames of the fields to be returned
    Takes:
  • A multipart of subtype form-data that will include a section with a JSON object describing the updated static resource (only the "description" field can be modified), and another section containing the updated content of the static resource
  • Retrieves:
  • Static representing the contained static resource
  • Return Status:
    HTTP Status CodeDescription
    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