Apps

The Apps API enables you to manage apps.

Create app

Create app with specified type and uid.

POST /api/apps
Body parameters
uid string required

A string that uniquely identifies the app, for instance a product id or URL (cannot contain whitespace and must contain at least one non-digit).

type string required

Type of app (chat, files or posts etc.).

access string

Access level for non-members. Defaults to none.

  • none = non-members cannot access the app
  • read = non-members can see the app and it's content but can cannot contribute
  • write = non-members have access to the app and are allowed to create content
directory string

Id or name of a user directory. Used in combination with access to control who can access the app.

name string

Display name for the app.

description string

App description.

metadata object

Additional properties to associate with the app, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the app.

Response codes

201 Created

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

400 Bad Request

Code sample
curl https://{WEAVY-SERVER}/api/apps
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'type': 'chat', 'uid': 'acme-chat', 'access': 'write' }"

List apps

Returns a list of apps.

GET /api/apps
Query parameters
contextual boolean

true to lists contextual apps, false to list non-contextual apps; when not specified both types are listed.

type string

Guid of app type to list.

q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 0 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/apps?top=10
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Upsert app

Update and return app with specified uid. If the app does not exist it is created.

PUT /api/apps/{uid}
Path parameters
uid string required

Unique app identifier.

Body parameters
type string required

Type of app (chat, files or posts etc.).

uid string
access string

Access level for non-members. Defaults to none.

  • none = non-members cannot access the app
  • read = non-members can see the app and it's content but can cannot contribute
  • write = non-members have access to the app and are allowed to create content
directory string

Id or name of a user directory. Used in combination with access to control who can access the app.

name string

Display name for the app.

description string

App description.

metadata object

Additional properties to associate with the app, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the app.

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}

201 Created

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl -X PUT https://{WEAVY-SERVER}/api/apps/acme-chat
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'type': 'chat', 'access': 'write' }"

Get app

Returns data for the specified app.

GET /api/apps/{app}
Path parameters
app string required

App identifier (id or uid).

Query parameters
trashed boolean

true to return app even if trashed, otherwise false.

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl https://{WEAVY-SERVER}/api/apps/acme-chat
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Update app

Update an existing app.

PATCH /api/apps/{app}
Path parameters
app string required

App identifier (id or uid).

Body parameters
uid string

A string that uniquely identifies the app, for instance a product id or URL (cannot contain whitespace and must contain at least one non-digit).

access string

Access level for non-members. Defaults to none.

  • none = non-members cannot access the app
  • read = non-members can see the app and it's content but can cannot contribute
  • write = non-members have access to the app and are allowed to create content
directory string

Id or name of a user directory. Used in combination with access to control who can access the app.

name string

Display name for the app.

description string

App description.

metadata object

Additional properties to associate with the app, e.g. { "color": "blue", "size": "XL" }.

tags array of strings

A list of tags to associate with the app.

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl -X PATCH https://{WEAVY_SERVER}/api/apps/acme-chat
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'description': 'Chat for ACME project' }"

Delete app

Permanently deletes an app and all it's content.

DELETE /api/apps/{app}
Path parameters
app string required

App identifier (id or uid).

Response codes

204 No Content

Code sample
curl -X DELETE https://{WEAVY_SERVER}/api/apps/acme-chat
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Subscribe to notifications

Subscribe to notifications for activity in an app.

POST /api/apps/{app}/subscribe
Path parameters
app string required

App identifier (id or uid).

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl -X POST https://{WEAVY_SERVER}/api/apps/acme-chat/subscribe
-H "Authorization: Bearer {ACCESS-TOKEN}"

Unsubscribe to notifications

Unsubscribe to notifications for activity in an app.

POST /api/apps/{app}/unsubscribe
Path parameters
app string required

App identifier (id or uid).

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl -X POST https://{WEAVY_SERVER}/api/apps/acme-chat/unsubscribe
-H "Authorization: Bearer {ACCESS-TOKEN}"

Trash app

Move an app to the trash.

POST /api/apps/{app}/trash
Path parameters
app string required

App identifier (id or uid).

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl -X POST https://{WEAVY_SERVER}/api/apps/acme-chat/trash
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Restore app

Restore an app from the trash.

POST /api/apps/{app}/restore
Path parameters
app string required

App identifier (id or uid).

Response codes

200 Success

{
  "id": "integer",
  "type": "string",
  "uid": "string",
  "access": "string",
  "directory_id": "integer",
  "display_name": "string",
  "name": "string",
  "description": "string",
  "archive_url": "string",
  "avatar_url": "string",
  "metadata": "object",
  "tags": [
    "string"
  ],
  "created_at": "string",
  "created_by_id": "integer",
  "modified_at": "string",
  "modified_by_id": "integer",
  "is_starred": "boolean",
  "is_subscribed": "boolean",
  "is_trashed": "boolean"
}
Code sample
curl -X POST https://{WEAVY_SERVER}/api/apps/acme-chat/restore
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

List app members

List members of the specified app.

GET /api/apps/{app}/members
Path parameters
app string required

App identifier (id or uid).

Query parameters
suspended boolean

Indicates whether to list suspended members or not, null returns all members.

q string

A query used to find matching items.

tag string

List items with the specified tag.

trashed boolean

Indicates whether trashed items should be listed (default is false). Specify null to return both trashed and non-trashed items.

order_by string

Specifies the sort order and direction for the listing, e.g. "name" or "name+desc"

top integer

Maximum number of items to return in the listing. Should be a value between 0 and 100. Default is 25.

skip integer

The number of items to skip. Used together with top to return a specific range of items (for pagination).

count boolean

false to skip counting the total number of matching items; default is true.

count_only boolean

true to only return the number of matching items; when this is specified the response will only contain the count property.

Response codes

200 Success

{
  "data": [
    "object"
  ],
  "start": "integer",
  "end": "integer",
  "count": "integer"
}
Code sample
curl https://{WEAVY-SERVER}/api/apps/acme-chat/members
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"

Add members

Add multiple members to an app. Can also be used to update access of existing members.

POST /api/apps/{app}/members
Path parameters
app string required

App identifier (id or uid).

Body parameters
array of objects required

Members to add.

Response codes

204 No Content

Code sample
curl https://{WEAVY-SERVER}/api/apps/acme-chat/members
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "[ { 'uid': 'acme-user' }, { 'uid': 'daffy-duck', 'access': 'read' } ]"

Remove members from app

Remove multiple app members.

DELETE /api/apps/{app}/members
Path parameters
app string required

App identifier (id or uid).

Body parameters
array of strings required

User identifiers (id or uid) of members to remove.

Response codes

204 No Content

Code sample
curl -X DELETE https://{WEAVY_SERVER}/api/apps/acme-chat/members
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "['bugs-bunny', 'daffy-duck']"

Add member

Add (or update) an app member.

PUT /api/apps/{app}/members/{user}
Path parameters
app string required

App identifier (id or uid).

user string required

User identifier (id or uid).

Body parameters
access string

Optional access level for member. Defaults to write when not specified.

  • none = cannot access the app
  • read = can see the app and it's content but can cannot contribute
  • write = access to the app and is allowed to create content
Response codes

204 No Content

Code sample
curl -X PUT https://{WEAVY_SERVER}/api/apps/acme-chat/members/acme-user
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
--json "{ 'access': 'read' }"

Remove member

Remove an app member.

DELETE /api/apps/{app}/members/{user}
Path parameters
app string required

App identifier (id or uid).

user string required

User identifier (id or uid).

Response codes

204 No Content

Code sample
curl -X DELETE https://{WEAVY_SERVER}/api/apps/acme-chat/members/bugs-bunny
-H "Authorization: Bearer {ACCESS-TOKEN | API-KEY}"
Weavy Docs