Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
titleSpace REST Methods

Get Spaces

  • Purpose: Provides a listing of all of the spaces that a customer has created
  • Request: GET https://host:port/durastore/spaces ? (storeID)
  • Response Code: 200 (on success)
  • Response Body: XML similar to:

    Code Block
    languagehtml/xml
    <spaces>
      <space id="space1" />
      <space id="space2" />
    </spaces>
    


Get Space

  • Purpose: Provides a listing of the contents of a space along with space properties
  • Request: GET https://host:port/durastore/spaceID ? (storeID) (prefix) (maxResults) (marker)
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
    • prefix (optional) - Only retrieve content ids with this prefix (default is all content ids)
    • maxResults (optional) - The maximum number of content IDs to return in the list (default is 1000)
      note: the maximum allowable value for maxResults is 1000. Any larger value will be reduced to 1000.
    • marker (optional) - The content ID marking the last item in the previous set (default is the first set of ids)
  • Response Code:
    • 200 (on success)
    • 404 (if the the given space does not exist)
  • Response Body: XML similar to:

    Code Block
    languagehtml/xml
    <space id="space1">
      <item>Image 1</item>
      <item>Image 2</item>
    </space>
    


  • Response Headers: All available space properties, example:

    Code Block
    languagenone
    x-dura-meta-space-count: 65
    x-dura-meta-space-created: 2016-04-14T01:40:47
    


Get Space Properties

  • Purpose: Provides all space properties
  • Request: HEAD https://host:port/durastore/spaceID ? (storeID)
  • Response Code:
    • 200 (on success)
    • 404 (if the the given space does not exist)
  • Response Headers: Same as for Get space (above)

Create Space

  • Purpose: Creates a new space
  • Request: PUT https://host:port/durastore/spaceID ? (storeID)
  • Response Code: 

    • 201 (on success)

    • 400 (if the content space ID is invalid)

  • Response Headers: Location of the new space (i.e. the URL used to create the space), example:

    Code Block
    languagebash
    Location: https://myhost:8080/durastore/space1


Delete Space

  • Purpose: Deletes a space
  • Request: DELETE https://host:port/durastore/spaceID ? (storeID)
  • Response Code:
    • 200 (on success)
    • 404 (if the the given space does not exist)
  • Response Body: "Space $spaceID deleted successfully" (on success)

Get Space ACLs

  • Purpose: Provides all space ACLs, with values of 'r' (read) and 'w' (read/write)
  • Request: HEAD https://host:port/durastore/acl/spaceID ? (storeID)
  • Response Code:
    • 200 (on success)
    • 404 (if the the given space does not exist)
  • Response Headers: All available space ACLs, example:

    Code Block
    languagenone
    x-dura-meta-acl-user0: WRITE
    x-dura-meta-acl-user1: WRITE
    x-dura-meta-acl-group-curators: READ


Set Space ACLs

  • Purpose: Updates the ACLs associated with a space
  • Request: POST https://host:port/durastore/acl/spaceID ? (storeID)
  • Request Headers: For 'user' ACLs the header prefix must be 'x-dura-meta-acl-' and for 'groups' the header prefix must be 'x-dura-meta-acl-group-'. Allowable values for ACL headers are: 'READ' and 'WRITE'.
    Example:

    Code Block
    languagenone
    x-dura-meta-acl-user0: WRITE
    x-dura-meta-acl-user1: WRITE
    x-dura-meta-acl-group-curators: READ
    


  • Response Code:
    • 200 (on success)
    • 404 (if the the given space does not exist)
  • Response Body: "Space $spaceID ACLs updated successfully" (on success)

...