Ressource /ressource/{ressource-id}

Represents an individual ressource.

Reading

GET /ressource/{ressource-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token with workspace_ressources permission is required.
  • If access token points to an user, at least one of the following criteria must be met :
    • The ressource is owned by the current person.
    • The ressource is shared with the current person.
    • The current person is an admin of the workspace at witch is attached the ressource.
  • If access token points to a workspace, at least one of the following criteria must be met :
    • The current workspace is the workspace at witch is attached the ressource.

Fields

Name Description Type

avatar

The ID of the Photo that represents the avatar of the ressource.

Photo

owner

The ID of the User that added the ressource.

User

workspace

The ID of the Workspace at which is attached the ressource.

Workspace

privacy

The privacy of the ressource.

object

value

The value of the privacy.

string{WORKSPACE, SELF, CUSTOM}

perms

The privacy permission.

string{READ, SPEAK, WRITE}

allow

An array of User and/or Group IDs who have access.

User[], Group[]

deny

An array of User and/or Group IDs who don't have access.

User[], Group[]

created_time

The date that indicates when the ressource was created.

date

updated_time

The date that indicates when the ressource was updated for the last time.

date

Publishing

You can publish ressources by using the /user/ressources, /workspace/ressources or /environment/ressources edges.

Updating

PUT /ressource/{ressource-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_ressources permission is required.
  • At least one of the following criteria must be met :
    • The ressource is owned by the current person.
    • The ressource is shared (with MANAGE permission) with the current person.
    • The current person is an admin (with MANAGE permission) of the workspace at witch is attached the ressource.

Fields

Name Description Type

avatar

The ID of the Photo that represents the avatar of the ressource.

Photo

privacy

The privacy of the ressource.

object

value

The value of the privacy.

string{WORKSPACE, SELF, CUSTOM}

perms

The privacy permission.

string{READ, SPEAK, WRITE}

allow

An array of User and/or Group IDs who have access.

User[], Group[]

deny

An array of User and/or Group IDs who don't have access.

User[], Group[]

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Deleting

DELETE /ressource/{ressource-id} HTTP/1.1
Host: localhost:3000

Permissions

  • The applied permissions to update ressources are required.

Fields

No fields are required.

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Edges

Name Description

/photos

The photos attached to the ressource.

/feed

The feed of the ressource.