From 2db3173e9deaf54fcd261ec09c9a30c22643e678 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Wed, 5 May 2021 12:31:56 +0200 Subject: [PATCH 01/23] Staffbase Connector --- .../Staffbase/apiDefinition.swagger.json | 2691 +++++++++++++++++ .../Staffbase/apiProperties.json | 43 + 2 files changed, 2734 insertions(+) create mode 100644 custom-connectors/Staffbase/apiDefinition.swagger.json create mode 100644 custom-connectors/Staffbase/apiProperties.json diff --git a/custom-connectors/Staffbase/apiDefinition.swagger.json b/custom-connectors/Staffbase/apiDefinition.swagger.json new file mode 100644 index 0000000000..b219bee5d9 --- /dev/null +++ b/custom-connectors/Staffbase/apiDefinition.swagger.json @@ -0,0 +1,2691 @@ +{ + "swagger": "2.0", + "info": { + "title": "Staffbase", + "description": "This connector provides access to your Staffbase instance", + "version": "1.0", + "contact": { + "name": "Staffbase Support", + "url": "https://www.staffbase.com", + "email": "support@staffbase.com" + } + }, + "host": "powerautomateproxy-main-de1.staffbase.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [], + "produces": [], + "paths": { + "/channels": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + }, + "spaceID": { + "type": "string", + "description": "spaceID" + }, + "created": { + "type": "string", + "description": "created" + }, + "published": { + "type": "string", + "description": "published" + }, + "updated": { + "type": "string", + "description": "updated" + } + } + }, + "description": "data" + } + } + } + } + }, + "summary": "Channels: Get a list of news channels", + "description": "Get a list of news channels", + "operationId": "Channels_get_list", + "parameters": [] + } + }, + "/channels/{channelID}/posts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "authorID": { + "type": "string", + "description": "authorID" + }, + "branchID": { + "type": "string", + "description": "branchID" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "channelID": { + "type": "string", + "description": "channelID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "content" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original", + "title": "mimeType" + } + }, + "description": "Original" + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original_scaled", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image original_scaled", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original_scaled", + "title": "mimeType" + } + }, + "description": "original_scaled" + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image compact", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image compact", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image compact", + "title": "mimeType" + } + }, + "description": "compact" + }, + "publicID": { + "type": "string", + "description": "Image", + "title": "publicID" + } + }, + "description": "Image" + }, + "title": { + "type": "string", + "description": "title" + }, + "feedImage": { + "type": "string", + "description": "feedImage" + }, + "mediaRefs": { + "type": "array", + "items": {}, + "description": "mediaRefs" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "contents" + }, + "author": { + "type": "object", + "properties": { + "branchID": { + "type": "string", + "description": "branchID" + }, + "branchRole": { + "type": "string", + "description": "branchRole" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "companyRole": { + "type": "string", + "description": "companyRole" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "value" + }, + "primary": { + "type": "boolean", + "description": "primary" + }, + "providerID": { + "type": "string", + "description": "providerID" + } + } + }, + "description": "emails" + }, + "firstName": { + "type": "string", + "description": "firstName" + }, + "id": { + "type": "string", + "description": "id" + }, + "lastName": { + "type": "string", + "description": "lastName" + }, + "location": { + "type": "string", + "description": "location" + } + }, + "description": "author" + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + } + }, + "description": "channel" + }, + "published": { + "type": "string", + "description": "published" + }, + "created": { + "type": "string", + "description": "created" + }, + "updated": { + "type": "string", + "description": "updated" + } + } + }, + "description": "data" + } + } + } + } + }, + "operationId": "Channels_get_posts", + "summary": "Channels: Get a list of posts within the specified channel", + "description": "Get a list of posts within the specified channel", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Insert channel ID, e.g. retrieved by getChannels", + "x-ms-summary": "ChannelID" + } + ], + "x-ms-visibility": "important" + }, + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "summary": "Channels: Send a post to specific channel", + "description": "Send a post to specific news channel", + "operationId": "Channels_post_post", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "ChannelID", + "description": "Insert channel ID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "externalID": { + "type": "string", + "description": "Optional: Enter a external ID here", + "title": "ExternalID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc.", + "title": "Locale" + }, + "content": { + "type": "string", + "description": "Enter news content here", + "title": "Content" + }, + "image": { + "type": "object", + "properties": {}, + "description": "image" + }, + "teaser": { + "type": "string", + "description": "Enter your teaser here", + "title": "Teaser" + }, + "title": { + "type": "string", + "description": "Enter your title here", + "title": "Title" + }, + "published": { + "type": "string", + "description": "Enter your date published here", + "title": "Published" + } + } + }, + "description": "contents" + } + } + } + } + ] + } + }, + "/comments": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "", + "title": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "", + "title": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "", + "title": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "installationID": { + "type": "string", + "description": "", + "title": "installationID" + }, + "parentID": { + "type": "string", + "description": "", + "title": "parentID" + }, + "parentType": { + "type": "string", + "description": "", + "title": "parentType" + }, + "authorID": { + "type": "string", + "description": "", + "title": "authorID" + }, + "text": { + "type": "string", + "description": "", + "title": "text" + }, + "author": { + "type": "object", + "properties": { + "avatar": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Author avatar image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Author avatar image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Author avatar image original", + "title": "height", + "x-ms-visibility": "important" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Author avatar image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Author avatar original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Author avatar image original", + "title": "mimeType" + }, + "created": { + "type": "string", + "description": "Author avatar original", + "title": "created" + } + }, + "description": "Original" + }, + "icon": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Author avatar icon", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Author avatar icon", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Author avatar icon", + "title": "height" + }, + "format": { + "type": "string", + "description": "Author avatar icon", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Author avatar icon", + "title": "mimeType" + } + }, + "description": "Icon" + }, + "thumb": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Author avatar thumb", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Author avatar thumb", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Author avatar thumb", + "title": "height" + }, + "format": { + "type": "string", + "description": "Author avatar thumb", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Author avatar thumb", + "title": "mimeType" + } + }, + "description": "thumb" + }, + "publicID": { + "type": "string", + "description": "Author avatar", + "title": "publicID" + } + }, + "description": "avatar" + }, + "customServiceConfig": { + "type": "string", + "description": "Author", + "title": "customServiceConfig" + }, + "entityType": { + "type": "string", + "description": "Author", + "title": "entityType" + }, + "firstName": { + "type": "string", + "description": "Author", + "title": "firstName" + }, + "id": { + "type": "string", + "description": "Author", + "title": "id" + }, + "lastName": { + "type": "string", + "description": "Author", + "title": "lastName" + } + }, + "description": "Author" + }, + "likes": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Likes", + "title": "total" + }, + "isLiked": { + "type": "string", + "description": "Likes", + "title": "isLiked", + "enum": [ + "", + "true", + "false" + ] + } + }, + "description": "likes" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + }, + "updated": { + "type": "string", + "description": "", + "title": "updated" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original", + "title": "mimeType" + } + }, + "description": "Original" + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original_scaled", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image original_scaled", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original_scaled", + "title": "mimeType" + } + }, + "description": "original_scaled" + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image compact", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image compact", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image compact", + "title": "mimeType" + } + }, + "description": "compact" + }, + "publicID": { + "type": "string", + "description": "Image", + "title": "publicID" + } + }, + "description": "Image" + } + } + }, + "description": "Data" + } + } + } + } + }, + "summary": "Posts: Get comments", + "description": "Get a list of comments", + "operationId": "Comments_get", + "parameters": [ + { + "name": "manage", + "in": "query", + "required": false, + "type": "boolean", + "description": "When true and the token role allows manage comments - also not published comments will be shown in the list.", + "x-ms-summary": "Manage" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100)", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "Filter in SCIM2 format with partial support. For now only flat structure (no nested clauses) and comparison clauses like eq = \"equals\", gt = \"greater than\", ge = \"greater than or equals\", lt = \"less than\", le = \"less than or equals\" are supported. For comments supported filter fields are: created and updated. The value for these fields can be provided in UTC DateTime string representatiion or long number of milliseconds of Unix epoch. Example 1: filter=updated ge \"2020-11-26T10:14:48.947Z\" and updated le \"2020-11-26T10:14:48.947Z\". In this example the DateTime range filter is applied to updated field with ge and le comparison clauses and and boolean clause. Example 2: filter=created gt \"2020-11-26T10:14:48.947Z\". Get all comments, created after pointed date.", + "x-ms-summary": "Filter" + } + ], + "x-ms-visibility": "important" + } + }, + "/media": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "", + "title": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "", + "title": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "", + "title": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "ownerID": { + "type": "string", + "description": "", + "title": "ownerID" + }, + "ownerType": { + "type": "string", + "description": "", + "title": "ownerType" + }, + "parentID": { + "type": "string", + "description": "", + "title": "parentID" + }, + "publicID": { + "type": "string", + "description": "", + "title": "publicID" + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "ResourceInfo", + "title": "type" + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "bytes" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "height" + }, + "url": { + "type": "string", + "description": "ResourceInfo", + "title": "url" + }, + "format": { + "type": "string", + "description": "ResourceInfo", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "ResourceInfo", + "title": "mimeType" + } + }, + "description": "ResourceInfo" + }, + "transformations": { + "type": "object", + "properties": { + "t_preview": { + "type": "object", + "properties": { + "transformationString": { + "type": "string", + "description": "Transformations t_preview", + "title": "transformationString" + }, + "status": { + "type": "string", + "description": "Transformations t_preview", + "title": "status" + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "type" + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "Transformations t_preview resourceInfo", + "title": "bytes" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Transformations t_preview resourceInfo", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Transformations t_preview resourceInfo", + "title": "height" + }, + "url": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "url" + }, + "format": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "mimeType" + } + }, + "description": "ResourceInfo" + } + }, + "description": "T_preview" + } + }, + "description": "Transformations" + }, + "fileName": { + "type": "string", + "description": "", + "title": "fileName" + }, + "references": { + "type": "integer", + "format": "int32", + "description": "", + "title": "references" + }, + "title": { + "type": "string", + "description": "", + "title": "title" + }, + "label": { + "type": "string", + "description": "", + "title": "label" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + } + } + }, + "description": "Data" + } + } + } + } + }, + "summary": "Media: Get all media", + "description": "Get metadata of all media that are accessible for the API token", + "operationId": "Media_get", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "default": 100, + "description": "Limit number of items", + "x-ms-visibility": "important", + "format": "int32", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "default": 0, + "description": "Offset for query", + "x-ms-visibility": "important", + "format": "int32", + "x-ms-summary": "Offset" + } + ] + } + }, + "/media/{mediumID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "ownerID": { + "type": "string", + "description": "", + "title": "ownerID" + }, + "ownerType": { + "type": "string", + "description": "", + "title": "ownerType" + }, + "parentID": { + "type": "string", + "description": "", + "title": "parentID" + }, + "publicID": { + "type": "string", + "description": "", + "title": "publicID" + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "ResourceInfo", + "title": "type" + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "bytes" + }, + "url": { + "type": "string", + "description": "ResourceInfo", + "title": "url" + }, + "format": { + "type": "string", + "description": "ResourceInfo", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "ResourceInfo", + "title": "mimeType" + } + }, + "description": "ResourceInfo" + }, + "fileName": { + "type": "string", + "description": "", + "title": "fileName" + }, + "title": { + "type": "string", + "description": "", + "title": "title" + }, + "label": { + "type": "string", + "description": "", + "title": "label" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + } + } + } + } + }, + "summary": "Media: Get media by ID", + "operationId": "Media_get_byID", + "description": "Get metadata for single media by its ID", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Requests information on a specific medium.", + "x-ms-summary": "MediumID" + } + ] + }, + "delete": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "Media_delete", + "summary": "Media: Delete media", + "description": "Deletes the specified media in the current context", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "MediumID", + "description": "Deletes the medium by its ID. While this will immediately remove the resource from our servers, the CDN may still deliver the content via the URL stated in resourceInfo.url until CDN invalidation." + } + ], + "x-ms-visibility": "advanced" + } + }, + "/notifications": { + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "recipients": { + "type": "object", + "properties": { + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "AccessorIds" + } + }, + "description": "Recipients" + }, + "content": { + "type": "object", + "properties": { + "en_US": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title" + } + }, + "description": "en_US" + } + }, + "description": "Content" + }, + "link": { + "type": "string", + "description": "Link" + }, + "type": { + "type": "string", + "description": "Type" + }, + "reference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "entityType": { + "type": "string", + "description": "EntityType" + } + }, + "description": "Reference" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels" + }, + "createdAt": { + "type": "string", + "description": "CreatedAt" + } + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "Notification_post", + "x-ms-visibility": "important", + "summary": "Notification: Sends notification", + "description": "Sends notifications to specified user(s)", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "recipients": { + "type": "object", + "properties": { + "accessorIds": { + "type": "array", + "items": { + "type": "string", + "description": "Recipients ID", + "title": "Recipients" + }, + "description": "accessorIds" + } + }, + "description": "recipients" + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc.", + "title": "Locale" + }, + "title": { + "type": "string", + "description": "Insert language dependent title", + "title": "Title" + } + } + }, + "description": "content" + }, + "link": { + "type": "string", + "description": "https://...", + "title": "Link" + } + } + } + } + ] + } + }, + "/posts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "authorID": { + "type": "string", + "description": "authorID" + }, + "branchID": { + "type": "string", + "description": "branchID" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "channelID": { + "type": "string", + "description": "channelID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "content" + }, + "teaser": { + "type": "string", + "description": "content" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original", + "title": "mimeType" + } + }, + "description": "Original" + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original_scaled", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image original_scaled", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original_scaled", + "title": "mimeType" + } + }, + "description": "original_scaled" + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image compact", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image compact", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image compact", + "title": "mimeType" + } + }, + "description": "compact" + }, + "publicID": { + "type": "string", + "description": "Image", + "title": "publicID" + } + }, + "description": "Image" + }, + "title": { + "type": "string", + "description": "title" + }, + "feedImage": { + "type": "string", + "description": "feedImage" + }, + "mediaRefs": { + "type": "array", + "items": {}, + "description": "mediaRefs" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "contents" + }, + "author": { + "type": "object", + "properties": { + "branchID": { + "type": "string", + "description": "branchID" + }, + "branchRole": { + "type": "string", + "description": "branchRole" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "companyRole": { + "type": "string", + "description": "companyRole" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "value" + }, + "primary": { + "type": "boolean", + "description": "primary" + }, + "providerID": { + "type": "string", + "description": "providerID" + } + } + }, + "description": "emails" + }, + "firstName": { + "type": "string", + "description": "firstName" + }, + "id": { + "type": "string", + "description": "id" + }, + "lastName": { + "type": "string", + "description": "lastName" + }, + "location": { + "type": "string", + "description": "location" + } + }, + "description": "author" + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + } + }, + "description": "channel" + }, + "published": { + "type": "string", + "description": "published" + }, + "created": { + "type": "string", + "description": "created" + }, + "updated": { + "type": "string", + "description": "updated" + } + } + }, + "description": "data" + } + } + } + } + }, + "operationId": "Posts_get_all", + "summary": "Posts: Get a list of posts", + "description": "Get a list of posts that are accessible for the API token", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "A string that is used for searching in any profile field available for users, such as firstname, lastname, or location.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100)", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + } + ], + "x-ms-visibility": "important" + } + }, + "/posts/{pageID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "branchID": { + "type": "string", + "description": "", + "title": "branchID" + }, + "companyID": { + "type": "string", + "description": "", + "title": "companyID" + }, + "channelID": { + "type": "string", + "description": "", + "title": "channelID" + }, + "authorID": { + "type": "string", + "description": "", + "title": "authorID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Contents", + "title": "content" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Contents image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Contents image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Contents image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Contents image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Contents image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Contents image original", + "title": "mimeType" + }, + "created": { + "type": "string", + "description": "Contents image original", + "title": "created" + } + }, + "description": "original" + } + }, + "description": "image" + }, + "teaser": { + "type": "string", + "description": "Contents", + "title": "teaser" + }, + "title": { + "type": "string", + "description": "Contents", + "title": "title" + }, + "feedImage": { + "type": "string", + "description": "Contents", + "title": "feedImage" + }, + "mediaRefs": { + "type": "array", + "items": {}, + "description": "mediaRefs" + }, + "locale": { + "type": "string", + "description": "Contents", + "title": "locale" + } + } + }, + "description": "contents" + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Channel", + "title": "id" + }, + "pluginID": { + "type": "string", + "description": "Channel", + "title": "pluginID" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Channel config localization", + "title": "title" + }, + "locale": { + "type": "string", + "description": "Channel config localization", + "title": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + } + }, + "description": "channel" + }, + "published": { + "type": "string", + "description": "", + "title": "published" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + }, + "updated": { + "type": "string", + "description": "", + "title": "updated" + } + } + } + } + }, + "summary": "Posts: Get a post by ID", + "description": "Requests the specified posts including a set of comments", + "operationId": "Posts_get_byID", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The Staffbase Page ID", + "x-ms-visibility": "important", + "x-ms-summary": "PageID" + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "integer", + "format": "int32", + "description": "Identifier" + }, + "statusCode": { + "type": "integer", + "format": "int32", + "description": "StatusCode" + }, + "message": { + "type": "string", + "description": "Message" + }, + "type": { + "type": "string", + "description": "Type" + } + } + } + } + }, + "operationId": "Posts_delete", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "x-ms-summary": "PageID" + } + ], + "description": "Removes a post from the system", + "summary": "Posts: Removes a post", + "x-ms-visibility": "advanced" + }, + "put": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "Posts_put", + "description": "Updates a post, only changed field (incremental)", + "summary": "Posts: Updates a post", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "x-ms-summary": "PageID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "externalID": { + "type": "string", + "description": "ExternalID", + "title": "" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc.", + "title": "Locale" + }, + "content": { + "type": "string", + "description": "Enter news content here", + "title": "Content" + }, + "image": { + "type": "object", + "properties": {}, + "description": "image" + }, + "teaser": { + "type": "string", + "description": "Enter your teaser here", + "title": "Teaser" + }, + "title": { + "type": "string", + "description": "Enter your title here", + "title": "Title" + }, + "published": { + "type": "string", + "description": "Enter your date published here", + "title": "Published" + } + } + }, + "description": "contents" + } + } + } + } + ] + } + }, + "/users": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Get list of users", + "description": "Get a list of users, depending on the API access token", + "operationId": "User_get_all", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "Content filter", + "x-ms-summary": "SCIM notation can be used to filter", + "x-ms-visibility": "important" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Fulltext search in any profile field", + "x-ms-summary": "The fulltext search can be combined with the filter", + "x-ms-visibility": "important" + } + ] + }, + "post": { + "responses": { + "default": { + "description": "default", + "schema": {}, + "headers": { + "HTTP/1.1": { + "description": "HTTP/1.1", + "type": "string" + }, + "Location:": { + "description": "Location:", + "type": "string" + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "User_post", + "summary": "User: Invite user", + "description": "The user will receive an email to signup", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "email" + }, + "firstName": { + "type": "string", + "description": "firstname" + }, + "lastName": { + "type": "string", + "description": "lastname" + } + } + } + } + ] + } + }, + "/users/{userID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "externalID": { + "type": "string", + "description": "", + "title": "externalID" + }, + "firstName": { + "type": "string", + "description": "", + "title": "firstName" + }, + "lastName": { + "type": "string", + "description": "", + "title": "lastName" + }, + "publicEmailAddress": { + "type": "string", + "description": "", + "title": "publicEmailAddress" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Config", + "title": "locale" + } + }, + "description": "config" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Emails", + "title": "value" + }, + "primary": { + "type": "boolean", + "description": "Emails", + "title": "primary" + }, + "providerID": { + "type": "string", + "description": "Emails", + "title": "providerID" + } + } + }, + "description": "emails" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string", + "description": "GroupIDs", + "title": "" + }, + "description": "groupIDs" + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string", + "description": "MandatoryGroupIDs", + "title": "" + }, + "description": "mandatoryGroupIDs" + }, + "position": { + "type": "string", + "description": "", + "title": "position" + }, + "department": { + "type": "string", + "description": "", + "title": "department" + }, + "location": { + "type": "string", + "description": "", + "title": "location" + }, + "phoneNumber": { + "type": "string", + "description": "", + "title": "phoneNumber" + }, + "status": { + "type": "string", + "description": "", + "title": "status" + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Role", + "title": "type" + } + }, + "description": "role" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + }, + "updated": { + "type": "string", + "description": "", + "title": "updated" + }, + "activated": { + "type": "string", + "description": "", + "title": "activated" + } + } + } + } + }, + "summary": "User: Get user information", + "operationId": "User_get_byID", + "description": "Get specific user information by its user id", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "UserID", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user." + } + ], + "x-ms-visibility": "important" + }, + "delete": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Delete User", + "operationId": "User_delete", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + } + ], + "description": "Deletes the speicfied user" + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "externalID": { + "type": "string", + "description": "ExternalID" + }, + "firstName": { + "type": "string", + "description": "FirstName" + }, + "lastName": { + "type": "string", + "description": "LastName" + }, + "publicEmailAddress": { + "type": "string", + "description": "publicEmailAddress" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "locale" + } + }, + "description": "config" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value" + }, + "primary": { + "type": "boolean", + "description": "primary" + }, + "providerID": { + "type": "string", + "description": "providerID" + } + } + }, + "description": "emails" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "groupIDs" + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "mandatoryGroupIDs" + }, + "position": { + "type": "string", + "description": "position" + }, + "department": { + "type": "string", + "description": "department" + }, + "location": { + "type": "string", + "description": "location" + }, + "phoneNumber": { + "type": "string", + "description": "phoneNumber" + }, + "status": { + "type": "string", + "description": "Status" + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type" + } + }, + "description": "role" + }, + "created": { + "type": "string", + "description": "Created" + }, + "updated": { + "type": "string", + "description": "updated" + }, + "activated": { + "type": "string", + "description": "activated" + } + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "User_put", + "summary": "User: Update user information", + "x-ms-visibility": "important", + "description": "Update user information", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "externalID": { + "type": "string", + "description": "ExternalID" + }, + "firstName": { + "type": "string", + "description": "FirstName" + }, + "lastName": { + "type": "string", + "description": "LastName" + }, + "publicEmailAddress": { + "type": "string", + "description": "Public Email Address" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Locale" + } + }, + "description": "config" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value" + }, + "primary": { + "type": "boolean", + "description": "Primary" + }, + "providerID": { + "type": "string", + "description": "ProviderID" + } + } + }, + "description": "Emails" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "GroupIDs" + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "mandatoryGroupIDs" + }, + "position": { + "type": "string", + "description": "Position" + }, + "department": { + "type": "string", + "description": "Department" + }, + "location": { + "type": "string", + "description": "Location" + }, + "phoneNumber": { + "type": "string", + "description": "PhoneNumber" + }, + "status": { + "type": "string", + "description": "Status" + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type" + } + }, + "description": "role" + }, + "created": { + "type": "string", + "description": "Created" + }, + "updated": { + "type": "string", + "description": "Updated" + }, + "activated": { + "type": "string", + "description": "activated" + } + } + } + } + ] + } + }, + "/users/{userID}/recovery": { + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Send a recovery email", + "description": "Sends a recovery email to the specified user", + "operationId": "User_post_recovery", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + } + ] + } + }, + "/version": { + "get": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "Proxy_version_get", + "summary": "Proxy: Get version", + "description": "returns power-automate proxy version", + "parameters": [] + } + } + }, + "definitions": {}, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "API-Schl\u00fcssel": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + }, + "security": [ + { + "API-Schl\u00fcssel": [] + } + ], + "tags": [], + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://www.staffbase.com" + }, + { + "propertyName": "Privacy policy", + "propertyValue": "https://staffbase.com/en/privacy-policy/" + }, + { + "propertyName": "Categories", + "propertyValue": "Communication;Human Resources" + } + ] +} \ No newline at end of file diff --git a/custom-connectors/Staffbase/apiProperties.json b/custom-connectors/Staffbase/apiProperties.json new file mode 100644 index 0000000000..603659a6f6 --- /dev/null +++ b/custom-connectors/Staffbase/apiProperties.json @@ -0,0 +1,43 @@ +{ + "properties": { + "connectionParameters": { + "api_key": { + "type": "securestring", + "uiDefinition": { + "displayName": "API-Schl\u00fcssel", + "description": "\"API-Schl\u00fcssel\" f\u00fcr diese API", + "tooltip": "Stellen Sie \"API-Schl\u00fcssel\" bereit.", + "constraints": { + "tabIndex": 2, + "clearText": false, + "required": "true" + } + } + }, + "hostingURL": { + "type": "string", + "uiDefinition": { + "constraints": { + "required": "true" + }, + "description": "Specify your hosting url: hostingURL", + "displayName": "Hosting URL", + "tooltip": "Provide hosting URL here" + } + } + }, + "iconBrandColor": "#007ee5", + "capabilities": [], + "policyTemplateInstances": [ + { + "templateId": "dynamichosturl", + "title": "Route to keyvault", + "parameters": { + "x-ms-apimTemplateParameter.urlTemplate": "https://powerautomateproxy-@connectionParameters('hostingURL').staffbase.com" + } + } + ], + "publisher": "Staffbase", + "stackOwner": "Staffbase" + } +} \ No newline at end of file From 0bb40e86f5e5e808ecbc1cd7ff3538ddf98e26f3 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Wed, 5 May 2021 12:31:56 +0200 Subject: [PATCH 02/23] Staffbase Connector --- .../Staffbase/apiDefinition.swagger.json | 2691 +++++++++++++++++ .../Staffbase/apiProperties.json | 43 + 2 files changed, 2734 insertions(+) create mode 100644 custom-connectors/Staffbase/apiDefinition.swagger.json create mode 100644 custom-connectors/Staffbase/apiProperties.json diff --git a/custom-connectors/Staffbase/apiDefinition.swagger.json b/custom-connectors/Staffbase/apiDefinition.swagger.json new file mode 100644 index 0000000000..b219bee5d9 --- /dev/null +++ b/custom-connectors/Staffbase/apiDefinition.swagger.json @@ -0,0 +1,2691 @@ +{ + "swagger": "2.0", + "info": { + "title": "Staffbase", + "description": "This connector provides access to your Staffbase instance", + "version": "1.0", + "contact": { + "name": "Staffbase Support", + "url": "https://www.staffbase.com", + "email": "support@staffbase.com" + } + }, + "host": "powerautomateproxy-main-de1.staffbase.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [], + "produces": [], + "paths": { + "/channels": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + }, + "spaceID": { + "type": "string", + "description": "spaceID" + }, + "created": { + "type": "string", + "description": "created" + }, + "published": { + "type": "string", + "description": "published" + }, + "updated": { + "type": "string", + "description": "updated" + } + } + }, + "description": "data" + } + } + } + } + }, + "summary": "Channels: Get a list of news channels", + "description": "Get a list of news channels", + "operationId": "Channels_get_list", + "parameters": [] + } + }, + "/channels/{channelID}/posts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "authorID": { + "type": "string", + "description": "authorID" + }, + "branchID": { + "type": "string", + "description": "branchID" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "channelID": { + "type": "string", + "description": "channelID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "content" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original", + "title": "mimeType" + } + }, + "description": "Original" + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original_scaled", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image original_scaled", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original_scaled", + "title": "mimeType" + } + }, + "description": "original_scaled" + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image compact", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image compact", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image compact", + "title": "mimeType" + } + }, + "description": "compact" + }, + "publicID": { + "type": "string", + "description": "Image", + "title": "publicID" + } + }, + "description": "Image" + }, + "title": { + "type": "string", + "description": "title" + }, + "feedImage": { + "type": "string", + "description": "feedImage" + }, + "mediaRefs": { + "type": "array", + "items": {}, + "description": "mediaRefs" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "contents" + }, + "author": { + "type": "object", + "properties": { + "branchID": { + "type": "string", + "description": "branchID" + }, + "branchRole": { + "type": "string", + "description": "branchRole" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "companyRole": { + "type": "string", + "description": "companyRole" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "value" + }, + "primary": { + "type": "boolean", + "description": "primary" + }, + "providerID": { + "type": "string", + "description": "providerID" + } + } + }, + "description": "emails" + }, + "firstName": { + "type": "string", + "description": "firstName" + }, + "id": { + "type": "string", + "description": "id" + }, + "lastName": { + "type": "string", + "description": "lastName" + }, + "location": { + "type": "string", + "description": "location" + } + }, + "description": "author" + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + } + }, + "description": "channel" + }, + "published": { + "type": "string", + "description": "published" + }, + "created": { + "type": "string", + "description": "created" + }, + "updated": { + "type": "string", + "description": "updated" + } + } + }, + "description": "data" + } + } + } + } + }, + "operationId": "Channels_get_posts", + "summary": "Channels: Get a list of posts within the specified channel", + "description": "Get a list of posts within the specified channel", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Insert channel ID, e.g. retrieved by getChannels", + "x-ms-summary": "ChannelID" + } + ], + "x-ms-visibility": "important" + }, + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "summary": "Channels: Send a post to specific channel", + "description": "Send a post to specific news channel", + "operationId": "Channels_post_post", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "ChannelID", + "description": "Insert channel ID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "externalID": { + "type": "string", + "description": "Optional: Enter a external ID here", + "title": "ExternalID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc.", + "title": "Locale" + }, + "content": { + "type": "string", + "description": "Enter news content here", + "title": "Content" + }, + "image": { + "type": "object", + "properties": {}, + "description": "image" + }, + "teaser": { + "type": "string", + "description": "Enter your teaser here", + "title": "Teaser" + }, + "title": { + "type": "string", + "description": "Enter your title here", + "title": "Title" + }, + "published": { + "type": "string", + "description": "Enter your date published here", + "title": "Published" + } + } + }, + "description": "contents" + } + } + } + } + ] + } + }, + "/comments": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "", + "title": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "", + "title": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "", + "title": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "installationID": { + "type": "string", + "description": "", + "title": "installationID" + }, + "parentID": { + "type": "string", + "description": "", + "title": "parentID" + }, + "parentType": { + "type": "string", + "description": "", + "title": "parentType" + }, + "authorID": { + "type": "string", + "description": "", + "title": "authorID" + }, + "text": { + "type": "string", + "description": "", + "title": "text" + }, + "author": { + "type": "object", + "properties": { + "avatar": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Author avatar image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Author avatar image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Author avatar image original", + "title": "height", + "x-ms-visibility": "important" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Author avatar image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Author avatar original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Author avatar image original", + "title": "mimeType" + }, + "created": { + "type": "string", + "description": "Author avatar original", + "title": "created" + } + }, + "description": "Original" + }, + "icon": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Author avatar icon", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Author avatar icon", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Author avatar icon", + "title": "height" + }, + "format": { + "type": "string", + "description": "Author avatar icon", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Author avatar icon", + "title": "mimeType" + } + }, + "description": "Icon" + }, + "thumb": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Author avatar thumb", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Author avatar thumb", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Author avatar thumb", + "title": "height" + }, + "format": { + "type": "string", + "description": "Author avatar thumb", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Author avatar thumb", + "title": "mimeType" + } + }, + "description": "thumb" + }, + "publicID": { + "type": "string", + "description": "Author avatar", + "title": "publicID" + } + }, + "description": "avatar" + }, + "customServiceConfig": { + "type": "string", + "description": "Author", + "title": "customServiceConfig" + }, + "entityType": { + "type": "string", + "description": "Author", + "title": "entityType" + }, + "firstName": { + "type": "string", + "description": "Author", + "title": "firstName" + }, + "id": { + "type": "string", + "description": "Author", + "title": "id" + }, + "lastName": { + "type": "string", + "description": "Author", + "title": "lastName" + } + }, + "description": "Author" + }, + "likes": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Likes", + "title": "total" + }, + "isLiked": { + "type": "string", + "description": "Likes", + "title": "isLiked", + "enum": [ + "", + "true", + "false" + ] + } + }, + "description": "likes" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + }, + "updated": { + "type": "string", + "description": "", + "title": "updated" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original", + "title": "mimeType" + } + }, + "description": "Original" + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original_scaled", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image original_scaled", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original_scaled", + "title": "mimeType" + } + }, + "description": "original_scaled" + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image compact", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image compact", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image compact", + "title": "mimeType" + } + }, + "description": "compact" + }, + "publicID": { + "type": "string", + "description": "Image", + "title": "publicID" + } + }, + "description": "Image" + } + } + }, + "description": "Data" + } + } + } + } + }, + "summary": "Posts: Get comments", + "description": "Get a list of comments", + "operationId": "Comments_get", + "parameters": [ + { + "name": "manage", + "in": "query", + "required": false, + "type": "boolean", + "description": "When true and the token role allows manage comments - also not published comments will be shown in the list.", + "x-ms-summary": "Manage" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100)", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "Filter in SCIM2 format with partial support. For now only flat structure (no nested clauses) and comparison clauses like eq = \"equals\", gt = \"greater than\", ge = \"greater than or equals\", lt = \"less than\", le = \"less than or equals\" are supported. For comments supported filter fields are: created and updated. The value for these fields can be provided in UTC DateTime string representatiion or long number of milliseconds of Unix epoch. Example 1: filter=updated ge \"2020-11-26T10:14:48.947Z\" and updated le \"2020-11-26T10:14:48.947Z\". In this example the DateTime range filter is applied to updated field with ge and le comparison clauses and and boolean clause. Example 2: filter=created gt \"2020-11-26T10:14:48.947Z\". Get all comments, created after pointed date.", + "x-ms-summary": "Filter" + } + ], + "x-ms-visibility": "important" + } + }, + "/media": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "", + "title": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "", + "title": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "", + "title": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "ownerID": { + "type": "string", + "description": "", + "title": "ownerID" + }, + "ownerType": { + "type": "string", + "description": "", + "title": "ownerType" + }, + "parentID": { + "type": "string", + "description": "", + "title": "parentID" + }, + "publicID": { + "type": "string", + "description": "", + "title": "publicID" + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "ResourceInfo", + "title": "type" + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "bytes" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "height" + }, + "url": { + "type": "string", + "description": "ResourceInfo", + "title": "url" + }, + "format": { + "type": "string", + "description": "ResourceInfo", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "ResourceInfo", + "title": "mimeType" + } + }, + "description": "ResourceInfo" + }, + "transformations": { + "type": "object", + "properties": { + "t_preview": { + "type": "object", + "properties": { + "transformationString": { + "type": "string", + "description": "Transformations t_preview", + "title": "transformationString" + }, + "status": { + "type": "string", + "description": "Transformations t_preview", + "title": "status" + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "type" + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "Transformations t_preview resourceInfo", + "title": "bytes" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Transformations t_preview resourceInfo", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Transformations t_preview resourceInfo", + "title": "height" + }, + "url": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "url" + }, + "format": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Transformations t_preview resourceInfo", + "title": "mimeType" + } + }, + "description": "ResourceInfo" + } + }, + "description": "T_preview" + } + }, + "description": "Transformations" + }, + "fileName": { + "type": "string", + "description": "", + "title": "fileName" + }, + "references": { + "type": "integer", + "format": "int32", + "description": "", + "title": "references" + }, + "title": { + "type": "string", + "description": "", + "title": "title" + }, + "label": { + "type": "string", + "description": "", + "title": "label" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + } + } + }, + "description": "Data" + } + } + } + } + }, + "summary": "Media: Get all media", + "description": "Get metadata of all media that are accessible for the API token", + "operationId": "Media_get", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "default": 100, + "description": "Limit number of items", + "x-ms-visibility": "important", + "format": "int32", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "default": 0, + "description": "Offset for query", + "x-ms-visibility": "important", + "format": "int32", + "x-ms-summary": "Offset" + } + ] + } + }, + "/media/{mediumID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "ownerID": { + "type": "string", + "description": "", + "title": "ownerID" + }, + "ownerType": { + "type": "string", + "description": "", + "title": "ownerType" + }, + "parentID": { + "type": "string", + "description": "", + "title": "parentID" + }, + "publicID": { + "type": "string", + "description": "", + "title": "publicID" + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "ResourceInfo", + "title": "type" + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "ResourceInfo", + "title": "bytes" + }, + "url": { + "type": "string", + "description": "ResourceInfo", + "title": "url" + }, + "format": { + "type": "string", + "description": "ResourceInfo", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "ResourceInfo", + "title": "mimeType" + } + }, + "description": "ResourceInfo" + }, + "fileName": { + "type": "string", + "description": "", + "title": "fileName" + }, + "title": { + "type": "string", + "description": "", + "title": "title" + }, + "label": { + "type": "string", + "description": "", + "title": "label" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + } + } + } + } + }, + "summary": "Media: Get media by ID", + "operationId": "Media_get_byID", + "description": "Get metadata for single media by its ID", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Requests information on a specific medium.", + "x-ms-summary": "MediumID" + } + ] + }, + "delete": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "Media_delete", + "summary": "Media: Delete media", + "description": "Deletes the specified media in the current context", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "MediumID", + "description": "Deletes the medium by its ID. While this will immediately remove the resource from our servers, the CDN may still deliver the content via the URL stated in resourceInfo.url until CDN invalidation." + } + ], + "x-ms-visibility": "advanced" + } + }, + "/notifications": { + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "recipients": { + "type": "object", + "properties": { + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "AccessorIds" + } + }, + "description": "Recipients" + }, + "content": { + "type": "object", + "properties": { + "en_US": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title" + } + }, + "description": "en_US" + } + }, + "description": "Content" + }, + "link": { + "type": "string", + "description": "Link" + }, + "type": { + "type": "string", + "description": "Type" + }, + "reference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "entityType": { + "type": "string", + "description": "EntityType" + } + }, + "description": "Reference" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels" + }, + "createdAt": { + "type": "string", + "description": "CreatedAt" + } + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "Notification_post", + "x-ms-visibility": "important", + "summary": "Notification: Sends notification", + "description": "Sends notifications to specified user(s)", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "recipients": { + "type": "object", + "properties": { + "accessorIds": { + "type": "array", + "items": { + "type": "string", + "description": "Recipients ID", + "title": "Recipients" + }, + "description": "accessorIds" + } + }, + "description": "recipients" + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc.", + "title": "Locale" + }, + "title": { + "type": "string", + "description": "Insert language dependent title", + "title": "Title" + } + } + }, + "description": "content" + }, + "link": { + "type": "string", + "description": "https://...", + "title": "Link" + } + } + } + } + ] + } + }, + "/posts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "total" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "limit" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "offset" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "authorID": { + "type": "string", + "description": "authorID" + }, + "branchID": { + "type": "string", + "description": "branchID" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "channelID": { + "type": "string", + "description": "channelID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "content" + }, + "teaser": { + "type": "string", + "description": "content" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original", + "title": "mimeType" + } + }, + "description": "Original" + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image original_scaled", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image original_scaled", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image original_scaled", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image original_scaled", + "title": "mimeType" + } + }, + "description": "original_scaled" + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Image compact", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Image compact", + "title": "height" + }, + "format": { + "type": "string", + "description": "Image compact", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Image compact", + "title": "mimeType" + } + }, + "description": "compact" + }, + "publicID": { + "type": "string", + "description": "Image", + "title": "publicID" + } + }, + "description": "Image" + }, + "title": { + "type": "string", + "description": "title" + }, + "feedImage": { + "type": "string", + "description": "feedImage" + }, + "mediaRefs": { + "type": "array", + "items": {}, + "description": "mediaRefs" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "contents" + }, + "author": { + "type": "object", + "properties": { + "branchID": { + "type": "string", + "description": "branchID" + }, + "branchRole": { + "type": "string", + "description": "branchRole" + }, + "companyID": { + "type": "string", + "description": "companyID" + }, + "companyRole": { + "type": "string", + "description": "companyRole" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "value" + }, + "primary": { + "type": "boolean", + "description": "primary" + }, + "providerID": { + "type": "string", + "description": "providerID" + } + } + }, + "description": "emails" + }, + "firstName": { + "type": "string", + "description": "firstName" + }, + "id": { + "type": "string", + "description": "id" + }, + "lastName": { + "type": "string", + "description": "lastName" + }, + "location": { + "type": "string", + "description": "location" + } + }, + "description": "author" + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "title" + }, + "locale": { + "type": "string", + "description": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + } + }, + "description": "channel" + }, + "published": { + "type": "string", + "description": "published" + }, + "created": { + "type": "string", + "description": "created" + }, + "updated": { + "type": "string", + "description": "updated" + } + } + }, + "description": "data" + } + } + } + } + }, + "operationId": "Posts_get_all", + "summary": "Posts: Get a list of posts", + "description": "Get a list of posts that are accessible for the API token", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "A string that is used for searching in any profile field available for users, such as firstname, lastname, or location.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100)", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + } + ], + "x-ms-visibility": "important" + } + }, + "/posts/{pageID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "branchID": { + "type": "string", + "description": "", + "title": "branchID" + }, + "companyID": { + "type": "string", + "description": "", + "title": "companyID" + }, + "channelID": { + "type": "string", + "description": "", + "title": "channelID" + }, + "authorID": { + "type": "string", + "description": "", + "title": "authorID" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Contents", + "title": "content" + }, + "image": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Contents image original", + "title": "url" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Contents image original", + "title": "width" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Contents image original", + "title": "height" + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Contents image original", + "title": "size" + }, + "format": { + "type": "string", + "description": "Contents image original", + "title": "format" + }, + "mimeType": { + "type": "string", + "description": "Contents image original", + "title": "mimeType" + }, + "created": { + "type": "string", + "description": "Contents image original", + "title": "created" + } + }, + "description": "original" + } + }, + "description": "image" + }, + "teaser": { + "type": "string", + "description": "Contents", + "title": "teaser" + }, + "title": { + "type": "string", + "description": "Contents", + "title": "title" + }, + "feedImage": { + "type": "string", + "description": "Contents", + "title": "feedImage" + }, + "mediaRefs": { + "type": "array", + "items": {}, + "description": "mediaRefs" + }, + "locale": { + "type": "string", + "description": "Contents", + "title": "locale" + } + } + }, + "description": "contents" + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Channel", + "title": "id" + }, + "pluginID": { + "type": "string", + "description": "Channel", + "title": "pluginID" + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Channel config localization", + "title": "title" + }, + "locale": { + "type": "string", + "description": "Channel config localization", + "title": "locale" + } + } + }, + "description": "localization" + } + }, + "description": "config" + } + }, + "description": "channel" + }, + "published": { + "type": "string", + "description": "", + "title": "published" + }, + "entityType": { + "type": "string", + "description": "", + "title": "entityType" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + }, + "updated": { + "type": "string", + "description": "", + "title": "updated" + } + } + } + } + }, + "summary": "Posts: Get a post by ID", + "description": "Requests the specified posts including a set of comments", + "operationId": "Posts_get_byID", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The Staffbase Page ID", + "x-ms-visibility": "important", + "x-ms-summary": "PageID" + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "integer", + "format": "int32", + "description": "Identifier" + }, + "statusCode": { + "type": "integer", + "format": "int32", + "description": "StatusCode" + }, + "message": { + "type": "string", + "description": "Message" + }, + "type": { + "type": "string", + "description": "Type" + } + } + } + } + }, + "operationId": "Posts_delete", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "x-ms-summary": "PageID" + } + ], + "description": "Removes a post from the system", + "summary": "Posts: Removes a post", + "x-ms-visibility": "advanced" + }, + "put": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "Posts_put", + "description": "Updates a post, only changed field (incremental)", + "summary": "Posts: Updates a post", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "x-ms-summary": "PageID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "externalID": { + "type": "string", + "description": "ExternalID", + "title": "" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc.", + "title": "Locale" + }, + "content": { + "type": "string", + "description": "Enter news content here", + "title": "Content" + }, + "image": { + "type": "object", + "properties": {}, + "description": "image" + }, + "teaser": { + "type": "string", + "description": "Enter your teaser here", + "title": "Teaser" + }, + "title": { + "type": "string", + "description": "Enter your title here", + "title": "Title" + }, + "published": { + "type": "string", + "description": "Enter your date published here", + "title": "Published" + } + } + }, + "description": "contents" + } + } + } + } + ] + } + }, + "/users": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Get list of users", + "description": "Get a list of users, depending on the API access token", + "operationId": "User_get_all", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "Content filter", + "x-ms-summary": "SCIM notation can be used to filter", + "x-ms-visibility": "important" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Fulltext search in any profile field", + "x-ms-summary": "The fulltext search can be combined with the filter", + "x-ms-visibility": "important" + } + ] + }, + "post": { + "responses": { + "default": { + "description": "default", + "schema": {}, + "headers": { + "HTTP/1.1": { + "description": "HTTP/1.1", + "type": "string" + }, + "Location:": { + "description": "Location:", + "type": "string" + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "User_post", + "summary": "User: Invite user", + "description": "The user will receive an email to signup", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "email" + }, + "firstName": { + "type": "string", + "description": "firstname" + }, + "lastName": { + "type": "string", + "description": "lastname" + } + } + } + } + ] + } + }, + "/users/{userID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "", + "title": "id" + }, + "externalID": { + "type": "string", + "description": "", + "title": "externalID" + }, + "firstName": { + "type": "string", + "description": "", + "title": "firstName" + }, + "lastName": { + "type": "string", + "description": "", + "title": "lastName" + }, + "publicEmailAddress": { + "type": "string", + "description": "", + "title": "publicEmailAddress" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Config", + "title": "locale" + } + }, + "description": "config" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Emails", + "title": "value" + }, + "primary": { + "type": "boolean", + "description": "Emails", + "title": "primary" + }, + "providerID": { + "type": "string", + "description": "Emails", + "title": "providerID" + } + } + }, + "description": "emails" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string", + "description": "GroupIDs", + "title": "" + }, + "description": "groupIDs" + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string", + "description": "MandatoryGroupIDs", + "title": "" + }, + "description": "mandatoryGroupIDs" + }, + "position": { + "type": "string", + "description": "", + "title": "position" + }, + "department": { + "type": "string", + "description": "", + "title": "department" + }, + "location": { + "type": "string", + "description": "", + "title": "location" + }, + "phoneNumber": { + "type": "string", + "description": "", + "title": "phoneNumber" + }, + "status": { + "type": "string", + "description": "", + "title": "status" + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Role", + "title": "type" + } + }, + "description": "role" + }, + "created": { + "type": "string", + "description": "", + "title": "created" + }, + "updated": { + "type": "string", + "description": "", + "title": "updated" + }, + "activated": { + "type": "string", + "description": "", + "title": "activated" + } + } + } + } + }, + "summary": "User: Get user information", + "operationId": "User_get_byID", + "description": "Get specific user information by its user id", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "UserID", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user." + } + ], + "x-ms-visibility": "important" + }, + "delete": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Delete User", + "operationId": "User_delete", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + } + ], + "description": "Deletes the speicfied user" + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "externalID": { + "type": "string", + "description": "ExternalID" + }, + "firstName": { + "type": "string", + "description": "FirstName" + }, + "lastName": { + "type": "string", + "description": "LastName" + }, + "publicEmailAddress": { + "type": "string", + "description": "publicEmailAddress" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "locale" + } + }, + "description": "config" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value" + }, + "primary": { + "type": "boolean", + "description": "primary" + }, + "providerID": { + "type": "string", + "description": "providerID" + } + } + }, + "description": "emails" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "groupIDs" + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "mandatoryGroupIDs" + }, + "position": { + "type": "string", + "description": "position" + }, + "department": { + "type": "string", + "description": "department" + }, + "location": { + "type": "string", + "description": "location" + }, + "phoneNumber": { + "type": "string", + "description": "phoneNumber" + }, + "status": { + "type": "string", + "description": "Status" + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type" + } + }, + "description": "role" + }, + "created": { + "type": "string", + "description": "Created" + }, + "updated": { + "type": "string", + "description": "updated" + }, + "activated": { + "type": "string", + "description": "activated" + } + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "User_put", + "summary": "User: Update user information", + "x-ms-visibility": "important", + "description": "Update user information", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID" + }, + "externalID": { + "type": "string", + "description": "ExternalID" + }, + "firstName": { + "type": "string", + "description": "FirstName" + }, + "lastName": { + "type": "string", + "description": "LastName" + }, + "publicEmailAddress": { + "type": "string", + "description": "Public Email Address" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Locale" + } + }, + "description": "config" + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value" + }, + "primary": { + "type": "boolean", + "description": "Primary" + }, + "providerID": { + "type": "string", + "description": "ProviderID" + } + } + }, + "description": "Emails" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "GroupIDs" + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "mandatoryGroupIDs" + }, + "position": { + "type": "string", + "description": "Position" + }, + "department": { + "type": "string", + "description": "Department" + }, + "location": { + "type": "string", + "description": "Location" + }, + "phoneNumber": { + "type": "string", + "description": "PhoneNumber" + }, + "status": { + "type": "string", + "description": "Status" + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type" + } + }, + "description": "role" + }, + "created": { + "type": "string", + "description": "Created" + }, + "updated": { + "type": "string", + "description": "Updated" + }, + "activated": { + "type": "string", + "description": "activated" + } + } + } + } + ] + } + }, + "/users/{userID}/recovery": { + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Send a recovery email", + "description": "Sends a recovery email to the specified user", + "operationId": "User_post_recovery", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + } + ] + } + }, + "/version": { + "get": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "Proxy_version_get", + "summary": "Proxy: Get version", + "description": "returns power-automate proxy version", + "parameters": [] + } + } + }, + "definitions": {}, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "API-Schl\u00fcssel": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + }, + "security": [ + { + "API-Schl\u00fcssel": [] + } + ], + "tags": [], + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://www.staffbase.com" + }, + { + "propertyName": "Privacy policy", + "propertyValue": "https://staffbase.com/en/privacy-policy/" + }, + { + "propertyName": "Categories", + "propertyValue": "Communication;Human Resources" + } + ] +} \ No newline at end of file diff --git a/custom-connectors/Staffbase/apiProperties.json b/custom-connectors/Staffbase/apiProperties.json new file mode 100644 index 0000000000..603659a6f6 --- /dev/null +++ b/custom-connectors/Staffbase/apiProperties.json @@ -0,0 +1,43 @@ +{ + "properties": { + "connectionParameters": { + "api_key": { + "type": "securestring", + "uiDefinition": { + "displayName": "API-Schl\u00fcssel", + "description": "\"API-Schl\u00fcssel\" f\u00fcr diese API", + "tooltip": "Stellen Sie \"API-Schl\u00fcssel\" bereit.", + "constraints": { + "tabIndex": 2, + "clearText": false, + "required": "true" + } + } + }, + "hostingURL": { + "type": "string", + "uiDefinition": { + "constraints": { + "required": "true" + }, + "description": "Specify your hosting url: hostingURL", + "displayName": "Hosting URL", + "tooltip": "Provide hosting URL here" + } + } + }, + "iconBrandColor": "#007ee5", + "capabilities": [], + "policyTemplateInstances": [ + { + "templateId": "dynamichosturl", + "title": "Route to keyvault", + "parameters": { + "x-ms-apimTemplateParameter.urlTemplate": "https://powerautomateproxy-@connectionParameters('hostingURL').staffbase.com" + } + } + ], + "publisher": "Staffbase", + "stackOwner": "Staffbase" + } +} \ No newline at end of file From 05eda45b3dde280f50d239d99c1404136b1b0c61 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Thu, 19 Aug 2021 23:56:01 +0200 Subject: [PATCH 03/23] - Move common code to definitions - Fixed descriptions - Several minor fixes --- .../Staffbase/apiDefinition.swagger.json | 2691 +++++------------ 1 file changed, 711 insertions(+), 1980 deletions(-) diff --git a/custom-connectors/Staffbase/apiDefinition.swagger.json b/custom-connectors/Staffbase/apiDefinition.swagger.json index b219bee5d9..53322a5d9e 100644 --- a/custom-connectors/Staffbase/apiDefinition.swagger.json +++ b/custom-connectors/Staffbase/apiDefinition.swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "Staffbase", - "description": "This connector provides access to your Staffbase instance", + "description": "With the Staffbase Connector, you bridge disparate tools and systems and integrate the Staffbase platform into your automated workflows. That include your employee app or intranet to automate processes, run tasks on a schedule, or notify users when events occur.", "version": "1.0", "contact": { "name": "Staffbase Support", @@ -29,17 +29,17 @@ "total": { "type": "integer", "format": "int32", - "description": "total" + "description": "Total number of channels that are found." }, "limit": { "type": "integer", "format": "int32", - "description": "limit" + "description": "The amount of items that are returned." }, "offset": { "type": "integer", "format": "int32", - "description": "offset" + "description": "The current defined offset for getting the items starting at this number." }, "data": { "type": "array", @@ -48,7 +48,7 @@ "properties": { "id": { "type": "string", - "description": "id" + "description": "This is the ID of the channel." }, "config": { "type": "object", @@ -60,46 +60,43 @@ "properties": { "title": { "type": "string", - "description": "title" + "description": "The channel title which is localized." }, "locale": { "type": "string", - "description": "locale" + "description": "This is the locale of channel title." } } - }, - "description": "localization" + } } - }, - "description": "config" + } }, "spaceID": { "type": "string", - "description": "spaceID" + "description": "The ID of the space where the channel is assigned to." }, "created": { "type": "string", - "description": "created" + "description": "The created date of the channel." }, "published": { "type": "string", - "description": "published" + "description": "The published date of the channel." }, "updated": { "type": "string", - "description": "updated" + "description": "The updated date of the channel." } } - }, - "description": "data" + } } } } } }, "summary": "Channels: Get a list of news channels", - "description": "Get a list of news channels", - "operationId": "Channels_get_list", + "description": "Get a list of news channels.", + "operationId": "ChannelsGetList", "parameters": [] } }, @@ -114,315 +111,40 @@ "total": { "type": "integer", "format": "int32", - "description": "total" + "description": "Total number of posts that are found." }, "limit": { "type": "integer", "format": "int32", - "description": "limit" + "description": "The amount of items that are returned." }, "offset": { "type": "integer", "format": "int32", - "description": "offset" + "description": "The current defined offset for getting the items starting at this number." }, "data": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "id" - }, - "authorID": { - "type": "string", - "description": "authorID" - }, - "branchID": { - "type": "string", - "description": "branchID" - }, - "companyID": { - "type": "string", - "description": "companyID" - }, - "channelID": { - "type": "string", - "description": "channelID" - }, - "contents": { - "type": "array", - "items": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "content" - }, - "image": { - "type": "object", - "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image original", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "height" - }, - "size": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "size" - }, - "format": { - "type": "string", - "description": "Image original", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image original", - "title": "mimeType" - } - }, - "description": "Original" - }, - "original_scaled": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image original_scaled", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image original_scaled", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image original_scaled", - "title": "height" - }, - "format": { - "type": "string", - "description": "Image original_scaled", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image original_scaled", - "title": "mimeType" - } - }, - "description": "original_scaled" - }, - "compact": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image compact", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image compact", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image compact", - "title": "height" - }, - "format": { - "type": "string", - "description": "Image compact", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image compact", - "title": "mimeType" - } - }, - "description": "compact" - }, - "publicID": { - "type": "string", - "description": "Image", - "title": "publicID" - } - }, - "description": "Image" - }, - "title": { - "type": "string", - "description": "title" - }, - "feedImage": { - "type": "string", - "description": "feedImage" - }, - "mediaRefs": { - "type": "array", - "items": {}, - "description": "mediaRefs" - }, - "locale": { - "type": "string", - "description": "locale" - } - } - }, - "description": "contents" - }, - "author": { - "type": "object", - "properties": { - "branchID": { - "type": "string", - "description": "branchID" - }, - "branchRole": { - "type": "string", - "description": "branchRole" - }, - "companyID": { - "type": "string", - "description": "companyID" - }, - "companyRole": { - "type": "string", - "description": "companyRole" - }, - "emails": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "value" - }, - "primary": { - "type": "boolean", - "description": "primary" - }, - "providerID": { - "type": "string", - "description": "providerID" - } - } - }, - "description": "emails" - }, - "firstName": { - "type": "string", - "description": "firstName" - }, - "id": { - "type": "string", - "description": "id" - }, - "lastName": { - "type": "string", - "description": "lastName" - }, - "location": { - "type": "string", - "description": "location" - } - }, - "description": "author" - }, - "channel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "id" - }, - "config": { - "type": "object", - "properties": { - "localization": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "title" - }, - "locale": { - "type": "string", - "description": "locale" - } - } - }, - "description": "localization" - } - }, - "description": "config" - } - }, - "description": "channel" - }, - "published": { - "type": "string", - "description": "published" - }, - "created": { - "type": "string", - "description": "created" - }, - "updated": { - "type": "string", - "description": "updated" - } - } - }, - "description": "data" + "$ref": "#/definitions/postData" + } } } } } }, - "operationId": "Channels_get_posts", + "operationId": "ChannelsGetPosts", "summary": "Channels: Get a list of posts within the specified channel", - "description": "Get a list of posts within the specified channel", - "parameters": [ - { - "name": "channelID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "Insert channel ID, e.g. retrieved by getChannels", - "x-ms-summary": "ChannelID" - } - ], + "description": "Get a list of posts within the specified channel.", + "parameters": [{ + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Insert channel ID here, e.g. retrieved by getChannels.", + "x-ms-summary": "ChannelID" + }], "x-ms-visibility": "important" }, "post": { @@ -436,18 +158,17 @@ "application/json" ], "summary": "Channels: Send a post to specific channel", - "description": "Send a post to specific news channel", - "operationId": "Channels_post_post", + "description": "Send a post to specific news channel.", + "operationId": "ChannelsPostPost", "x-ms-visibility": "important", - "parameters": [ - { + "parameters": [{ "name": "channelID", "in": "path", "x-ms-url-encoding": "single", "required": true, "type": "string", "x-ms-summary": "ChannelID", - "description": "Insert channel ID" + "description": "Insert channel ID here." }, { "name": "body", @@ -458,8 +179,7 @@ "properties": { "externalID": { "type": "string", - "description": "Optional: Enter a external ID here", - "title": "ExternalID" + "description": "Optional: Enter an external ID here." }, "contents": { "type": "array", @@ -468,37 +188,31 @@ "properties": { "locale": { "type": "string", - "description": "Insert locale like, e.g. de_DE, en_US, etc.", - "title": "Locale" + "description": "Insert locale like, e.g. de_DE, en_US, etc." }, "content": { "type": "string", - "description": "Enter news content here", - "title": "Content" + "description": "Enter news content here." }, "image": { - "type": "object", - "properties": {}, - "description": "image" + "type": "string", + "description": "Enter image link here.", + "title": "image (link)" }, "teaser": { "type": "string", - "description": "Enter your teaser here", - "title": "Teaser" + "description": "Enter your teaser here." }, "title": { "type": "string", - "description": "Enter your title here", - "title": "Title" + "description": "Enter your title here." }, "published": { "type": "string", - "description": "Enter your date published here", - "title": "Published" + "description": "Enter your date published here." } } - }, - "description": "contents" + } } } } @@ -517,20 +231,17 @@ "total": { "type": "integer", "format": "int32", - "description": "", - "title": "total" + "description": "Total number of comments that are found." }, "limit": { "type": "integer", "format": "int32", - "description": "", - "title": "limit" + "description": "The amount of items that are returned." }, "offset": { "type": "integer", "format": "int32", - "description": "", - "title": "offset" + "description": "The current defined offset for getting the items starting at this number." }, "data": { "type": "array", @@ -539,186 +250,23 @@ "properties": { "id": { "type": "string", - "description": "", - "title": "id" - }, - "installationID": { - "type": "string", - "description": "", - "title": "installationID" + "description": "This is the ID of the comment." }, "parentID": { "type": "string", - "description": "", - "title": "parentID" + "description": "The ID of the comment's parent, can be either a post or a comment." }, "parentType": { "type": "string", - "description": "", - "title": "parentType" - }, - "authorID": { - "type": "string", - "description": "", - "title": "authorID" + "description": "The parent type can be either a post or a comment." }, "text": { "type": "string", - "description": "", - "title": "text" + "description": "This is the comments content / test itself.", + "title": "comment text" }, "author": { - "type": "object", - "properties": { - "avatar": { - "type": "object", - "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Author avatar image original", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Author avatar image original", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Author avatar image original", - "title": "height", - "x-ms-visibility": "important" - }, - "size": { - "type": "integer", - "format": "int32", - "description": "Author avatar image original", - "title": "size" - }, - "format": { - "type": "string", - "description": "Author avatar original", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Author avatar image original", - "title": "mimeType" - }, - "created": { - "type": "string", - "description": "Author avatar original", - "title": "created" - } - }, - "description": "Original" - }, - "icon": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Author avatar icon", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Author avatar icon", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Author avatar icon", - "title": "height" - }, - "format": { - "type": "string", - "description": "Author avatar icon", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Author avatar icon", - "title": "mimeType" - } - }, - "description": "Icon" - }, - "thumb": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Author avatar thumb", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Author avatar thumb", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Author avatar thumb", - "title": "height" - }, - "format": { - "type": "string", - "description": "Author avatar thumb", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Author avatar thumb", - "title": "mimeType" - } - }, - "description": "thumb" - }, - "publicID": { - "type": "string", - "description": "Author avatar", - "title": "publicID" - } - }, - "description": "avatar" - }, - "customServiceConfig": { - "type": "string", - "description": "Author", - "title": "customServiceConfig" - }, - "entityType": { - "type": "string", - "description": "Author", - "title": "entityType" - }, - "firstName": { - "type": "string", - "description": "Author", - "title": "firstName" - }, - "id": { - "type": "string", - "description": "Author", - "title": "id" - }, - "lastName": { - "type": "string", - "description": "Author", - "title": "lastName" - } - }, - "description": "Author" + "$ref": "#/definitions/authorObject" }, "likes": { "type": "object", @@ -726,166 +274,41 @@ "total": { "type": "integer", "format": "int32", - "description": "Likes", - "title": "total" + "description": "This is the number of comment likes." }, "isLiked": { "type": "string", - "description": "Likes", - "title": "isLiked", + "description": "Is this comment liked?", "enum": [ "", "true", "false" ] } - }, - "description": "likes" - }, - "entityType": { - "type": "string", - "description": "", - "title": "entityType" + } }, "created": { "type": "string", - "description": "", - "title": "created" + "description": "The created date of the comment." }, "updated": { "type": "string", - "description": "", - "title": "updated" + "description": "The updated date of the comment." }, "image": { - "type": "object", - "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image original", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "height" - }, - "size": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "size" - }, - "format": { - "type": "string", - "description": "Image original", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image original", - "title": "mimeType" - } - }, - "description": "Original" - }, - "original_scaled": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image original_scaled", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image original_scaled", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image original_scaled", - "title": "height" - }, - "format": { - "type": "string", - "description": "Image original_scaled", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image original_scaled", - "title": "mimeType" - } - }, - "description": "original_scaled" - }, - "compact": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image compact", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image compact", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image compact", - "title": "height" - }, - "format": { - "type": "string", - "description": "Image compact", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image compact", - "title": "mimeType" - } - }, - "description": "compact" - }, - "publicID": { - "type": "string", - "description": "Image", - "title": "publicID" - } - }, - "description": "Image" + "$ref": "#/definitions/imageObject" } } - }, - "description": "Data" + } } } } } }, "summary": "Posts: Get comments", - "description": "Get a list of comments", - "operationId": "Comments_get", - "parameters": [ - { + "description": "Get a list of comments.", + "operationId": "CommentsGet", + "parameters": [{ "name": "manage", "in": "query", "required": false, @@ -898,7 +321,7 @@ "in": "query", "required": false, "type": "integer", - "description": "The amount of items that should be returned (default and maximum 100)", + "description": "The amount of items that should be returned (default and maximum 100).", "x-ms-summary": "Limit" }, { @@ -932,212 +355,39 @@ "total": { "type": "integer", "format": "int32", - "description": "", - "title": "total" + "description": "Total number of assets that are found." }, "limit": { "type": "integer", "format": "int32", - "description": "", - "title": "limit" + "description": "The amount of items that are returned." }, "offset": { "type": "integer", "format": "int32", - "description": "", - "title": "offset" + "description": "The current defined offset for getting the items starting at this number." }, "data": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "", - "title": "id" - }, - "ownerID": { - "type": "string", - "description": "", - "title": "ownerID" - }, - "ownerType": { - "type": "string", - "description": "", - "title": "ownerType" - }, - "parentID": { - "type": "string", - "description": "", - "title": "parentID" - }, - "publicID": { - "type": "string", - "description": "", - "title": "publicID" - }, - "resourceInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "ResourceInfo", - "title": "type" - }, - "bytes": { - "type": "integer", - "format": "int32", - "description": "ResourceInfo", - "title": "bytes" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "ResourceInfo", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "ResourceInfo", - "title": "height" - }, - "url": { - "type": "string", - "description": "ResourceInfo", - "title": "url" - }, - "format": { - "type": "string", - "description": "ResourceInfo", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "ResourceInfo", - "title": "mimeType" - } - }, - "description": "ResourceInfo" - }, - "transformations": { - "type": "object", - "properties": { - "t_preview": { - "type": "object", - "properties": { - "transformationString": { - "type": "string", - "description": "Transformations t_preview", - "title": "transformationString" - }, - "status": { - "type": "string", - "description": "Transformations t_preview", - "title": "status" - }, - "resourceInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Transformations t_preview resourceInfo", - "title": "type" - }, - "bytes": { - "type": "integer", - "format": "int32", - "description": "Transformations t_preview resourceInfo", - "title": "bytes" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Transformations t_preview resourceInfo", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Transformations t_preview resourceInfo", - "title": "height" - }, - "url": { - "type": "string", - "description": "Transformations t_preview resourceInfo", - "title": "url" - }, - "format": { - "type": "string", - "description": "Transformations t_preview resourceInfo", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Transformations t_preview resourceInfo", - "title": "mimeType" - } - }, - "description": "ResourceInfo" - } - }, - "description": "T_preview" - } - }, - "description": "Transformations" - }, - "fileName": { - "type": "string", - "description": "", - "title": "fileName" - }, - "references": { - "type": "integer", - "format": "int32", - "description": "", - "title": "references" - }, - "title": { - "type": "string", - "description": "", - "title": "title" - }, - "label": { - "type": "string", - "description": "", - "title": "label" - }, - "entityType": { - "type": "string", - "description": "", - "title": "entityType" - }, - "created": { - "type": "string", - "description": "", - "title": "created" - } - } - }, - "description": "Data" + "$ref": "#/definitions/mediaData" + } } } } } }, "summary": "Media: Get all media", - "description": "Get metadata of all media that are accessible for the API token", - "operationId": "Media_get", + "description": "Get metadata of all media that are accessible for the API token.", + "operationId": "MediaGet", "x-ms-visibility": "important", - "parameters": [ - { + "parameters": [{ "name": "limit", "in": "query", "required": false, "type": "integer", "default": 100, - "description": "Limit number of items", + "description": "Limit the number of items here.", "x-ms-visibility": "important", "format": "int32", "x-ms-summary": "Limit" @@ -1148,7 +398,7 @@ "required": false, "type": "integer", "default": 0, - "description": "Offset for query", + "description": "Set an offset for the query.", "x-ms-visibility": "important", "format": "int32", "x-ms-summary": "Offset" @@ -1162,109 +412,23 @@ "200": { "description": "default", "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "", - "title": "id" - }, - "ownerID": { - "type": "string", - "description": "", - "title": "ownerID" - }, - "ownerType": { - "type": "string", - "description": "", - "title": "ownerType" - }, - "parentID": { - "type": "string", - "description": "", - "title": "parentID" - }, - "publicID": { - "type": "string", - "description": "", - "title": "publicID" - }, - "resourceInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "ResourceInfo", - "title": "type" - }, - "bytes": { - "type": "integer", - "format": "int32", - "description": "ResourceInfo", - "title": "bytes" - }, - "url": { - "type": "string", - "description": "ResourceInfo", - "title": "url" - }, - "format": { - "type": "string", - "description": "ResourceInfo", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "ResourceInfo", - "title": "mimeType" - } - }, - "description": "ResourceInfo" - }, - "fileName": { - "type": "string", - "description": "", - "title": "fileName" - }, - "title": { - "type": "string", - "description": "", - "title": "title" - }, - "label": { - "type": "string", - "description": "", - "title": "label" - }, - "entityType": { - "type": "string", - "description": "", - "title": "entityType" - }, - "created": { - "type": "string", - "description": "", - "title": "created" - } - } + "$ref": "#/definitions/mediaData" } } }, "summary": "Media: Get media by ID", - "operationId": "Media_get_byID", - "description": "Get metadata for single media by its ID", + "operationId": "MediaGetByID", + "description": "Get metadata for single media by its ID.", "x-ms-visibility": "important", - "parameters": [ - { - "name": "mediumID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "Requests information on a specific medium.", - "x-ms-summary": "MediumID" - } - ] + "parameters": [{ + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Requests information on a specific medium.", + "x-ms-summary": "MediumID" + }] }, "delete": { "responses": { @@ -1273,20 +437,18 @@ "schema": {} } }, - "operationId": "Media_delete", + "operationId": "MediaDelete", "summary": "Media: Delete media", - "description": "Deletes the specified media in the current context", - "parameters": [ - { - "name": "mediumID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "x-ms-summary": "MediumID", - "description": "Deletes the medium by its ID. While this will immediately remove the resource from our servers, the CDN may still deliver the content via the URL stated in resourceInfo.url until CDN invalidation." - } - ], + "description": "Deletes the specified media in the current context.", + "parameters": [{ + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "MediumID", + "description": "Deletes the medium by its ID. While this will immediately remove the resource from our servers, the CDN may still deliver the content via the URL stated in resourceInfo.url until CDN invalidation." + }], "x-ms-visibility": "advanced" } }, @@ -1300,7 +462,7 @@ "properties": { "id": { "type": "string", - "description": "ID" + "description": "This is the ID of the notification." }, "recipients": { "type": "object", @@ -1310,59 +472,41 @@ "items": { "type": "string" }, - "description": "AccessorIds" + "description": "This is the list of recipients IDs." } - }, - "description": "Recipients" + } }, "content": { - "type": "object", - "properties": { - "en_US": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Title" - } + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The notification's title which is localized." }, - "description": "en_US" + "locale": { + "type": "string", + "description": "This is the locale of the title." + } } - }, - "description": "Content" + } }, "link": { "type": "string", - "description": "Link" + "description": "This is the notification link." }, "type": { "type": "string", - "description": "Type" - }, - "reference": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID" - }, - "entityType": { - "type": "string", - "description": "EntityType" - } - }, - "description": "Reference" - }, - "channels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Channels" + "description": "This is the notification type." }, "createdAt": { "type": "string", - "description": "CreatedAt" + "description": "The created date of the notification." + }, + "created": { + "type": "string", + "description": "The created date of the notification." } } } @@ -1371,61 +515,52 @@ "consumes": [ "application/json" ], - "operationId": "Notification_post", + "operationId": "NotificationPost", "x-ms-visibility": "important", "summary": "Notification: Sends notification", - "description": "Sends notifications to specified user(s)", - "parameters": [ - { - "name": "body", - "in": "body", - "required": false, - "schema": { - "type": "object", - "properties": { - "recipients": { + "description": "Sends notifications to specified user(s).", + "parameters": [{ + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "recipients": { + "type": "object", + "properties": { + "accessorIds": { + "type": "array", + "items": { + "type": "string", + "description": "This is the list of recipients IDs." + } + } + } + }, + "content": { + "type": "array", + "items": { "type": "object", "properties": { - "accessorIds": { - "type": "array", - "items": { - "type": "string", - "description": "Recipients ID", - "title": "Recipients" - }, - "description": "accessorIds" - } - }, - "description": "recipients" - }, - "content": { - "type": "array", - "items": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "Insert locale like, e.g. de_DE, en_US, etc.", - "title": "Locale" - }, - "title": { - "type": "string", - "description": "Insert language dependent title", - "title": "Title" - } + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc." + }, + "title": { + "type": "string", + "description": "Insert language dependent title." } - }, - "description": "content" - }, - "link": { - "type": "string", - "description": "https://...", - "title": "Link" + } } + }, + "link": { + "type": "string", + "description": "Optinal: Insert link here." } } } - ] + }] } }, "/posts": { @@ -1434,315 +569,14 @@ "200": { "description": "default", "schema": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int32", - "description": "total" - }, - "limit": { - "type": "integer", - "format": "int32", - "description": "limit" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "offset" - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "id" - }, - "authorID": { - "type": "string", - "description": "authorID" - }, - "branchID": { - "type": "string", - "description": "branchID" - }, - "companyID": { - "type": "string", - "description": "companyID" - }, - "channelID": { - "type": "string", - "description": "channelID" - }, - "contents": { - "type": "array", - "items": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "content" - }, - "teaser": { - "type": "string", - "description": "content" - }, - "image": { - "type": "object", - "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image original", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "height" - }, - "size": { - "type": "integer", - "format": "int32", - "description": "Image original", - "title": "size" - }, - "format": { - "type": "string", - "description": "Image original", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image original", - "title": "mimeType" - } - }, - "description": "Original" - }, - "original_scaled": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image original_scaled", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image original_scaled", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image original_scaled", - "title": "height" - }, - "format": { - "type": "string", - "description": "Image original_scaled", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image original_scaled", - "title": "mimeType" - } - }, - "description": "original_scaled" - }, - "compact": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Image compact", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Image compact", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image compact", - "title": "height" - }, - "format": { - "type": "string", - "description": "Image compact", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Image compact", - "title": "mimeType" - } - }, - "description": "compact" - }, - "publicID": { - "type": "string", - "description": "Image", - "title": "publicID" - } - }, - "description": "Image" - }, - "title": { - "type": "string", - "description": "title" - }, - "feedImage": { - "type": "string", - "description": "feedImage" - }, - "mediaRefs": { - "type": "array", - "items": {}, - "description": "mediaRefs" - }, - "locale": { - "type": "string", - "description": "locale" - } - } - }, - "description": "contents" - }, - "author": { - "type": "object", - "properties": { - "branchID": { - "type": "string", - "description": "branchID" - }, - "branchRole": { - "type": "string", - "description": "branchRole" - }, - "companyID": { - "type": "string", - "description": "companyID" - }, - "companyRole": { - "type": "string", - "description": "companyRole" - }, - "emails": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "value" - }, - "primary": { - "type": "boolean", - "description": "primary" - }, - "providerID": { - "type": "string", - "description": "providerID" - } - } - }, - "description": "emails" - }, - "firstName": { - "type": "string", - "description": "firstName" - }, - "id": { - "type": "string", - "description": "id" - }, - "lastName": { - "type": "string", - "description": "lastName" - }, - "location": { - "type": "string", - "description": "location" - } - }, - "description": "author" - }, - "channel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "id" - }, - "config": { - "type": "object", - "properties": { - "localization": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "title" - }, - "locale": { - "type": "string", - "description": "locale" - } - } - }, - "description": "localization" - } - }, - "description": "config" - } - }, - "description": "channel" - }, - "published": { - "type": "string", - "description": "published" - }, - "created": { - "type": "string", - "description": "created" - }, - "updated": { - "type": "string", - "description": "updated" - } - } - }, - "description": "data" - } - } + "$ref": "#/definitions/postData" } } }, - "operationId": "Posts_get_all", + "operationId": "PostsGetAll", "summary": "Posts: Get a list of posts", - "description": "Get a list of posts that are accessible for the API token", - "parameters": [ - { + "description": "Get a list of posts that are accessible for the API token.", + "parameters": [{ "name": "query", "in": "query", "required": false, @@ -1755,7 +589,7 @@ "in": "query", "required": false, "type": "integer", - "description": "The amount of items that should be returned (default and maximum 100)", + "description": "The amount of items that should be returned (default and maximum 100).", "x-ms-summary": "Limit" }, { @@ -1776,203 +610,24 @@ "200": { "description": "default", "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "", - "title": "id" - }, - "branchID": { - "type": "string", - "description": "", - "title": "branchID" - }, - "companyID": { - "type": "string", - "description": "", - "title": "companyID" - }, - "channelID": { - "type": "string", - "description": "", - "title": "channelID" - }, - "authorID": { - "type": "string", - "description": "", - "title": "authorID" - }, - "contents": { - "type": "array", - "items": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "Contents", - "title": "content" - }, - "image": { - "type": "object", - "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Contents image original", - "title": "url" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Contents image original", - "title": "width" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Contents image original", - "title": "height" - }, - "size": { - "type": "integer", - "format": "int32", - "description": "Contents image original", - "title": "size" - }, - "format": { - "type": "string", - "description": "Contents image original", - "title": "format" - }, - "mimeType": { - "type": "string", - "description": "Contents image original", - "title": "mimeType" - }, - "created": { - "type": "string", - "description": "Contents image original", - "title": "created" - } - }, - "description": "original" - } - }, - "description": "image" - }, - "teaser": { - "type": "string", - "description": "Contents", - "title": "teaser" - }, - "title": { - "type": "string", - "description": "Contents", - "title": "title" - }, - "feedImage": { - "type": "string", - "description": "Contents", - "title": "feedImage" - }, - "mediaRefs": { - "type": "array", - "items": {}, - "description": "mediaRefs" - }, - "locale": { - "type": "string", - "description": "Contents", - "title": "locale" - } - } - }, - "description": "contents" - }, - "channel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Channel", - "title": "id" - }, - "pluginID": { - "type": "string", - "description": "Channel", - "title": "pluginID" - }, - "config": { - "type": "object", - "properties": { - "localization": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Channel config localization", - "title": "title" - }, - "locale": { - "type": "string", - "description": "Channel config localization", - "title": "locale" - } - } - }, - "description": "localization" - } - }, - "description": "config" - } - }, - "description": "channel" - }, - "published": { - "type": "string", - "description": "", - "title": "published" - }, - "entityType": { - "type": "string", - "description": "", - "title": "entityType" - }, - "created": { - "type": "string", - "description": "", - "title": "created" - }, - "updated": { - "type": "string", - "description": "", - "title": "updated" - } - } + "$ref": "#/definitions/postData" } } }, "summary": "Posts: Get a post by ID", - "description": "Requests the specified posts including a set of comments", - "operationId": "Posts_get_byID", + "description": "Requests the specified posts including a set of comments.", + "operationId": "PostsGetByID", "x-ms-visibility": "important", - "parameters": [ - { - "name": "pageID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "The Staffbase Page ID", - "x-ms-visibility": "important", - "x-ms-summary": "PageID" - } - ] + "parameters": [{ + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This is the ID of the post.", + "x-ms-visibility": "important", + "x-ms-summary": "PageID" + }] }, "delete": { "responses": { @@ -1984,38 +639,36 @@ "identifier": { "type": "integer", "format": "int32", - "description": "Identifier" + "description": "The Identifier of deletion." }, "statusCode": { "type": "integer", "format": "int32", - "description": "StatusCode" + "description": "The status code of the action." }, "message": { "type": "string", - "description": "Message" + "description": "The message of the action." }, "type": { "type": "string", - "description": "Type" + "description": "The type of the action." } } } } }, - "operationId": "Posts_delete", - "parameters": [ - { - "name": "pageID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", - "x-ms-summary": "PageID" - } - ], - "description": "Removes a post from the system", + "operationId": "PostsDelete", + "parameters": [{ + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "x-ms-summary": "PageID" + }], + "description": "Removes a post from the system.", "summary": "Posts: Removes a post", "x-ms-visibility": "advanced" }, @@ -2029,12 +682,11 @@ "consumes": [ "application/json" ], - "operationId": "Posts_put", - "description": "Updates a post, only changed field (incremental)", + "operationId": "PostsPut", + "description": "Updates a post, only changed field (incremental).", "summary": "Posts: Updates a post", "x-ms-visibility": "important", - "parameters": [ - { + "parameters": [{ "name": "pageID", "in": "path", "x-ms-url-encoding": "single", @@ -2052,8 +704,7 @@ "properties": { "externalID": { "type": "string", - "description": "ExternalID", - "title": "" + "description": "Optional: Enter an external ID here." }, "contents": { "type": "array", @@ -2062,37 +713,30 @@ "properties": { "locale": { "type": "string", - "description": "Insert locale like, e.g. de_DE, en_US, etc.", - "title": "Locale" + "description": "Insert locale like, e.g. de_DE, en_US, etc." }, "content": { "type": "string", - "description": "Enter news content here", - "title": "Content" + "description": "Enter news content here." }, "image": { - "type": "object", - "properties": {}, - "description": "image" + "type": "string", + "description": "Enter link to image here." }, "teaser": { "type": "string", - "description": "Enter your teaser here", - "title": "Teaser" + "description": "Enter your teaser here." }, "title": { "type": "string", - "description": "Enter your title here", - "title": "Title" + "description": "Enter your title here." }, "published": { "type": "string", - "description": "Enter your date published here", - "title": "Published" + "description": "Enter your date published here." } } - }, - "description": "contents" + } } } } @@ -2109,16 +753,15 @@ } }, "summary": "User: Get list of users", - "description": "Get a list of users, depending on the API access token", - "operationId": "User_get_all", + "description": "Get a list of users, depending on the API access token.", + "operationId": "UserGetAll", "x-ms-visibility": "important", - "parameters": [ - { + "parameters": [{ "name": "filter", "in": "query", "required": false, "type": "string", - "description": "Content filter", + "description": "SCIM notation can be used to filter.", "x-ms-summary": "SCIM notation can be used to filter", "x-ms-visibility": "important" }, @@ -2127,7 +770,7 @@ "in": "query", "required": false, "type": "string", - "description": "Fulltext search in any profile field", + "description": "Here you can serach in any profile field.", "x-ms-summary": "The fulltext search can be combined with the filter", "x-ms-visibility": "important" } @@ -2153,34 +796,32 @@ "consumes": [ "application/json" ], - "operationId": "User_post", + "operationId": "UserPost", "summary": "User: Invite user", - "description": "The user will receive an email to signup", + "description": "The user will receive an email to signup.", "x-ms-visibility": "important", - "parameters": [ - { - "name": "body", - "in": "body", - "required": false, - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "email" - }, - "firstName": { - "type": "string", - "description": "firstname" - }, - "lastName": { - "type": "string", - "description": "lastname" - } + "parameters": [{ + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "This is the email address of the user." + }, + "firstName": { + "type": "string", + "description": "This is the firstname of the user." + }, + "lastName": { + "type": "string", + "description": "This is the lastname of the user." } } } - ] + }] } }, "/users/{userID}": { @@ -2189,155 +830,22 @@ "200": { "description": "default", "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "", - "title": "id" - }, - "externalID": { - "type": "string", - "description": "", - "title": "externalID" - }, - "firstName": { - "type": "string", - "description": "", - "title": "firstName" - }, - "lastName": { - "type": "string", - "description": "", - "title": "lastName" - }, - "publicEmailAddress": { - "type": "string", - "description": "", - "title": "publicEmailAddress" - }, - "config": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "Config", - "title": "locale" - } - }, - "description": "config" - }, - "emails": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "Emails", - "title": "value" - }, - "primary": { - "type": "boolean", - "description": "Emails", - "title": "primary" - }, - "providerID": { - "type": "string", - "description": "Emails", - "title": "providerID" - } - } - }, - "description": "emails" - }, - "groupIDs": { - "type": "array", - "items": { - "type": "string", - "description": "GroupIDs", - "title": "" - }, - "description": "groupIDs" - }, - "mandatoryGroupIDs": { - "type": "array", - "items": { - "type": "string", - "description": "MandatoryGroupIDs", - "title": "" - }, - "description": "mandatoryGroupIDs" - }, - "position": { - "type": "string", - "description": "", - "title": "position" - }, - "department": { - "type": "string", - "description": "", - "title": "department" - }, - "location": { - "type": "string", - "description": "", - "title": "location" - }, - "phoneNumber": { - "type": "string", - "description": "", - "title": "phoneNumber" - }, - "status": { - "type": "string", - "description": "", - "title": "status" - }, - "role": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Role", - "title": "type" - } - }, - "description": "role" - }, - "created": { - "type": "string", - "description": "", - "title": "created" - }, - "updated": { - "type": "string", - "description": "", - "title": "updated" - }, - "activated": { - "type": "string", - "description": "", - "title": "activated" - } - } + "$ref": "#/definitions/userData" } } }, "summary": "User: Get user information", - "operationId": "User_get_byID", - "description": "Get specific user information by its user id", - "parameters": [ - { - "name": "userID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "x-ms-summary": "UserID", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user." - } - ], + "operationId": "UserGetByID", + "description": "Get specific user information by its user id.", + "parameters": [{ + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "UserID", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user." + }], "x-ms-visibility": "important" }, "delete": { @@ -2350,146 +858,34 @@ "summary": "User: Delete User", "operationId": "User_delete", "x-ms-visibility": "important", - "parameters": [ - { - "name": "userID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", - "x-ms-summary": "UserID" - } - ], - "description": "Deletes the speicfied user" + "parameters": [{ + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + }], + "description": "Deletes the speicfied user." }, "put": { "responses": { "200": { "description": "default", "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID" - }, - "externalID": { - "type": "string", - "description": "ExternalID" - }, - "firstName": { - "type": "string", - "description": "FirstName" - }, - "lastName": { - "type": "string", - "description": "LastName" - }, - "publicEmailAddress": { - "type": "string", - "description": "publicEmailAddress" - }, - "config": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "locale" - } - }, - "description": "config" - }, - "emails": { - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "Value" - }, - "primary": { - "type": "boolean", - "description": "primary" - }, - "providerID": { - "type": "string", - "description": "providerID" - } - } - }, - "description": "emails" - }, - "groupIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "groupIDs" - }, - "mandatoryGroupIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "mandatoryGroupIDs" - }, - "position": { - "type": "string", - "description": "position" - }, - "department": { - "type": "string", - "description": "department" - }, - "location": { - "type": "string", - "description": "location" - }, - "phoneNumber": { - "type": "string", - "description": "phoneNumber" - }, - "status": { - "type": "string", - "description": "Status" - }, - "role": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type" - } - }, - "description": "role" - }, - "created": { - "type": "string", - "description": "Created" - }, - "updated": { - "type": "string", - "description": "updated" - }, - "activated": { - "type": "string", - "description": "activated" - } - } + "$ref": "#/definitions/userData" } } }, "consumes": [ "application/json" ], - "operationId": "User_put", + "operationId": "UserPut", "summary": "User: Update user information", "x-ms-visibility": "important", - "description": "Update user information", - "parameters": [ - { + "description": "Update user information.", + "parameters": [{ "name": "userID", "in": "path", "x-ms-url-encoding": "single", @@ -2503,162 +899,500 @@ "in": "body", "required": false, "schema": { + "$ref": "#/definitions/userData" + } + } + ] + } + }, + "/users/{userID}/recovery": { + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Send a recovery email", + "description": "Sends a recovery email to the specified user.", + "operationId": "UserPostRecovery", + "x-ms-visibility": "important", + "parameters": [{ + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + }] + } + }, + "/version": { + "get": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "ProxyVersionGet", + "summary": "Proxy: Get version", + "description": "Returns the current proxy version.", + "parameters": [] + } + } + }, + "definitions": { + "mediaData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the asset." + }, + "ownerID": { + "type": "string", + "description": "This is the ID of the owner of this asset." + }, + "parentID": { + "type": "string", + "description": "This is the ID of the parent media asset." + }, + "publicID": { + "type": "string", + "description": "This is the public ID for accessing the asset." + }, + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the asset resource type." + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "This is the resource size (in bytes)." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the resource width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the resource height." + }, + "url": { + "type": "string", + "description": "This is the resource url." + }, + "format": { + "type": "string", + "description": "This is the resource format." + }, + "mimeType": { + "type": "string", + "description": "This is the resource MIME type." + } + } + }, + "fileName": { + "type": "string", + "description": "This is the media filename." + }, + "title": { + "type": "string", + "description": "This is the media title." + }, + "label": { + "type": "string", + "description": "This is the media label." + }, + "created": { + "type": "string", + "description": "The created date of the asset." + } + } + }, + "userData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the user" + }, + "externalID": { + "type": "string", + "description": "The external ID of the user" + }, + "firstName": { + "type": "string", + "description": "The firstname of the user" + }, + "lastName": { + "type": "string", + "description": "The lastname of the user" + }, + "publicEmailAddress": { + "type": "string", + "description": "The public eMail of the user" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "The locale of the user" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The email address", + "title": "email" + }, + "primary": { + "type": "boolean", + "description": "Is it the primary email?" + } + } + }, + "description": "User email information" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string", + "description": "List of groups the user is assigned to" + } + }, + "position": { + "type": "string", + "description": "The position of the user" + }, + "department": { + "type": "string", + "description": "The department of the user" + }, + "location": { + "type": "string", + "description": "The location of the user" + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the user" + }, + "created": { + "type": "string", + "description": "The created date of the user" + }, + "updated": { + "type": "string", + "description": "The updated date of the user" + }, + "activated": { + "type": "string", + "description": "Is the user activated?" + } + } + }, + "postData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the post." + }, + "author": { + "$ref": "#/definitions/authorObject" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The post content, which is localized." + }, + "image": { + "$ref": "#/definitions/imageObject" + }, + "teaser": { + "type": "string", + "description": "The post teaser, which is localized." + }, + "title": { + "type": "string", + "description": "The post title, which is localized." + }, + "locale": { + "type": "string", + "description": "This is the locale of the item." + } + } + } + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the channel." + }, + "config": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "ID" - }, - "externalID": { - "type": "string", - "description": "ExternalID" - }, - "firstName": { - "type": "string", - "description": "FirstName" - }, - "lastName": { - "type": "string", - "description": "LastName" - }, - "publicEmailAddress": { - "type": "string", - "description": "Public Email Address" - }, - "config": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "Locale" - } - }, - "description": "config" - }, - "emails": { + "localization": { "type": "array", "items": { "type": "object", "properties": { - "value": { + "title": { "type": "string", - "description": "Value" - }, - "primary": { - "type": "boolean", - "description": "Primary" + "description": "This is the channel title, which is localized." }, - "providerID": { + "locale": { "type": "string", - "description": "ProviderID" + "description": "This is the channel title's locale." } } - }, - "description": "Emails" + } + } + } + } + } + }, + "published": { + "type": "string", + "description": "The published date of the post." + }, + "created": { + "type": "string", + "description": "The created date of the post." + }, + "updated": { + "type": "string", + "description": "The updated date of the post." + } + } + }, + "authorObject": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "This is the firstname of the author." + }, + "id": { + "type": "string", + "description": "This is the ID of the author." + }, + "lastName": { + "type": "string", + "description": "This is the lastname of the author." + }, + "avatar": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the author avatar image original url." }, - "groupIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "GroupIDs" + "width": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar image original width." }, - "mandatoryGroupIDs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "mandatoryGroupIDs" + "height": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar image original height." }, - "position": { + "size": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar image original sie (in bytes)." + }, + "format": { "type": "string", - "description": "Position" + "description": "This is the author avatar original format." }, - "department": { + "mimeType": { "type": "string", - "description": "Department" + "description": "This is the athor avatar image original mimeType." }, - "location": { + "created": { "type": "string", - "description": "Location" + "description": "This is the author avatar original created date." + } + } + }, + "icon": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the author avatar icon url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar icon width." }, - "phoneNumber": { + "height": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar icon height." + }, + "format": { "type": "string", - "description": "PhoneNumber" + "description": "This is the author avatar icon format." }, - "status": { + "mimeType": { + "type": "string", + "description": "This is the author avatar icon mimeType." + } + } + }, + "thumb": { + "type": "object", + "properties": { + "url": { "type": "string", - "description": "Status" + "description": "This is the author avatar thumb url." }, - "role": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type" - } - }, - "description": "role" + "width": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar thumb width." }, - "created": { - "type": "string", - "description": "Created" + "height": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar thumb height." }, - "updated": { + "format": { "type": "string", - "description": "Updated" + "description": "This is the author avatar thumb format." }, - "activated": { + "mimeType": { "type": "string", - "description": "activated" + "description": "This is the athor avatar thumb mimeType." } } + }, + "publicID": { + "type": "string", + "description": "This is the author avatar public ID." } } - ] + } } }, - "/users/{userID}/recovery": { - "post": { - "responses": { - "default": { - "description": "default", - "schema": {} + "imageObject": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the image original url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the image original width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the image original height." + }, + "size": { + "type": "integer", + "format": "int32", + "description": "This is the image original size (in bytes)." + }, + "format": { + "type": "string", + "description": "This is the image original format." + }, + "mimeType": { + "type": "string", + "description": "This is the image original mimeType." + } } }, - "summary": "User: Send a recovery email", - "description": "Sends a recovery email to the specified user", - "operationId": "User_post_recovery", - "x-ms-visibility": "important", - "parameters": [ - { - "name": "userID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", - "x-ms-summary": "UserID" - } - ] - } - }, - "/version": { - "get": { - "responses": { - "default": { - "description": "default", - "schema": {} + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the image original url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the image original width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the image original height." + }, + "format": { + "type": "string", + "description": "This is the image original format." + }, + "mimeType": { + "type": "string", + "description": "This is the image original mimeType." + } } }, - "operationId": "Proxy_version_get", - "summary": "Proxy: Get version", - "description": "returns power-automate proxy version", - "parameters": [] + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the image compact url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the image compact width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the image compact height." + }, + "format": { + "type": "string", + "description": "This is the image compact format." + }, + "mimeType": { + "type": "string", + "description": "This is the image compact mimeType." + } + } + } } } }, - "definitions": {}, "parameters": {}, "responses": {}, "securityDefinitions": { @@ -2668,14 +1402,11 @@ "name": "Authorization" } }, - "security": [ - { - "API-Schl\u00fcssel": [] - } - ], + "security": [{ + "API-Schl\u00fcssel": [] + }], "tags": [], - "x-ms-connector-metadata": [ - { + "x-ms-connector-metadata": [{ "propertyName": "Website", "propertyValue": "https://www.staffbase.com" }, From 27b62219bc391c9fd9d23bda2b72c6c44cbbb9c9 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 20 Aug 2021 12:33:42 +0200 Subject: [PATCH 04/23] Fixed spelling Error --- custom-connectors/Staffbase/apiDefinition.swagger.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom-connectors/Staffbase/apiDefinition.swagger.json b/custom-connectors/Staffbase/apiDefinition.swagger.json index 53322a5d9e..e0b773094f 100644 --- a/custom-connectors/Staffbase/apiDefinition.swagger.json +++ b/custom-connectors/Staffbase/apiDefinition.swagger.json @@ -866,8 +866,7 @@ "type": "string", "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", "x-ms-summary": "UserID" - }], - "description": "Deletes the speicfied user." + }] }, "put": { "responses": { From 623c12e5234fbf745fd52027af94ecb6714e4653 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 20 Aug 2021 12:36:11 +0200 Subject: [PATCH 05/23] Fixed description for /posts query parameter --- custom-connectors/Staffbase/apiDefinition.swagger.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-connectors/Staffbase/apiDefinition.swagger.json b/custom-connectors/Staffbase/apiDefinition.swagger.json index e0b773094f..7e167f2de9 100644 --- a/custom-connectors/Staffbase/apiDefinition.swagger.json +++ b/custom-connectors/Staffbase/apiDefinition.swagger.json @@ -581,7 +581,7 @@ "in": "query", "required": false, "type": "string", - "description": "A string that is used for searching in any profile field available for users, such as firstname, lastname, or location.", + "description": "A string that can be used for searching the post content.", "x-ms-summary": "Query" }, { From 34a9ff20fb8e9ec942e7fe815505170c7f4add4a Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 20 Aug 2021 12:38:58 +0200 Subject: [PATCH 06/23] Moved connector from custom-connectors into certified connectors --- .../Staffbase/apiDefinition.swagger.json | 0 .../Staffbase/apiProperties.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {custom-connectors => certified-connectors}/Staffbase/apiDefinition.swagger.json (100%) rename {custom-connectors => certified-connectors}/Staffbase/apiProperties.json (100%) diff --git a/custom-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json similarity index 100% rename from custom-connectors/Staffbase/apiDefinition.swagger.json rename to certified-connectors/Staffbase/apiDefinition.swagger.json diff --git a/custom-connectors/Staffbase/apiProperties.json b/certified-connectors/Staffbase/apiProperties.json similarity index 100% rename from custom-connectors/Staffbase/apiProperties.json rename to certified-connectors/Staffbase/apiProperties.json From 0f5ff519f0a4bad729f9514afeb502f3c44299f5 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 20 Aug 2021 12:52:30 +0200 Subject: [PATCH 07/23] Fixed missing description --- certified-connectors/Staffbase/apiDefinition.swagger.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index 7e167f2de9..5498dcb426 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -866,7 +866,8 @@ "type": "string", "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", "x-ms-summary": "UserID" - }] + }], + "description": "Deletes the specified user." }, "put": { "responses": { From 7d0efe692c5b48ba3d3b37e472a1968ee13aeca8 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 20 Aug 2021 12:54:54 +0200 Subject: [PATCH 08/23] Fixed icon brand color --- certified-connectors/Staffbase/apiProperties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certified-connectors/Staffbase/apiProperties.json b/certified-connectors/Staffbase/apiProperties.json index 603659a6f6..d4d1c2b5bc 100644 --- a/certified-connectors/Staffbase/apiProperties.json +++ b/certified-connectors/Staffbase/apiProperties.json @@ -26,7 +26,7 @@ } } }, - "iconBrandColor": "#007ee5", + "iconBrandColor": "#45A2F7", "capabilities": [], "policyTemplateInstances": [ { From d5d27139119194a6a33bc906c53e483ef98a80b4 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Tue, 24 Aug 2021 11:35:57 +0200 Subject: [PATCH 09/23] Fixed: - OperationID for delete Users - Definition for Post news into channel --- .../Staffbase/apiDefinition.swagger.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index 5498dcb426..389ac11774 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -206,13 +206,13 @@ "title": { "type": "string", "description": "Enter your title here." - }, - "published": { - "type": "string", - "description": "Enter your date published here." } } } + }, + "published": { + "type": "string", + "description": "Enter your date published here." } } } @@ -856,7 +856,7 @@ } }, "summary": "User: Delete User", - "operationId": "User_delete", + "operationId": "UserDelete", "x-ms-visibility": "important", "parameters": [{ "name": "userID", From 2526bb439b2cd5d22d40c7a53f0a0c5fdb9dc49a Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Thu, 26 Aug 2021 11:53:52 +0200 Subject: [PATCH 10/23] Added missing README.md Fixed: - Unicode characters - German wording translated --- certified-connectors/Staffbase/README.md | 108 ++++++++++++++++++ .../Staffbase/apiDefinition.swagger.json | 14 +-- 2 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 certified-connectors/Staffbase/README.md diff --git a/certified-connectors/Staffbase/README.md b/certified-connectors/Staffbase/README.md new file mode 100644 index 0000000000..5964d4e640 --- /dev/null +++ b/certified-connectors/Staffbase/README.md @@ -0,0 +1,108 @@ +# Staffbase connector +With the Staffbase connector for Power Automate you bridge the gap between different tools and systems and include the Staffbase platform in your automated workflows. Leverage the power of automated workflows that include your employee app or intranet to automate processes, run tasks on a schedule, or notify users as events take place. + +## Prerequisites +* A Microsoft Power Apps or Power Automate plan with custom connector feature +* A Staffbase license for your organization +* The role of administrator for your organization on the Staffbase platform +* The [API token](https://support.staffbase.com/hc/en-us/articles/360015755691) to configure authentication +* Information on which Staffasbe infrastructure your application is hosted on, reach out to support@staffbase.com for more information + +## Supported Operations + +### ChannelsGetList +Get a list of news channels + +### ChannelsGetPosts +Get a list of posts within the specified channel + +### ChannelsPostPost +Send a post to specific channel + +### CommentsGet +Get all comments from your Staffbase instance + +### MediaGet +Get all media from your Staffbase instance + +### MediaGetByID +Get media by ID + +### MediaDelete +Delete media by ID + +### NotificationPost +Sends notification to user(s) + +### PostsGetAll +Get a list of posts + +### PostsGetByID +Get a post by ID + +### PostsDelete +Removes a post + +### PostsPut +Updates a post + +### UserGetAll +Get list of users + +### UserPost +Invite an user by firstname, lastname and eMail + +### UserGetByID +Get user information + +### User_delete +Delete User by ID + +### UserPut +Update user information + +### UserPostRecovery +Send a recovery email + +### ProxyVersionGet +Just for internal usage, to check the current API proxy version + +## Obtaining Credentials +For the basic authentication between your Staffbase platform and the workflow created in Power Automate, you need an API token. You can [generate the API](https://support.staffbase.com/hc/en-us/articles/360015755691-Generating-an-API-Token) token from the Staffbase Experience Studio. + +## Getting Started +Configure the connector with basic authentication and the hosting URL. + +1. In Power Automate, navigate to Connectors. +2. Search for Staffbase connector. +3. Click on the Staffbase connector. +A dialog to configure the connector opens. +5. In the API Token field, add the API token using the following syntax: Basic [API-Token] + +__Note__: You need to add an empty space between 'Basic' and the API token. + +In the Host ID field, enter the identifier for the infrastructure where your Staffbase platform is hosted: + * German infrastructure: **main-de1** + * International infrastructure: **main-us1** + +For detailed information, visit the [Staffbase Support Portal](https://support.staffbase.com/hc/en-us/articles/360017381759-Automating-Workflows-With-the-Staffbase-Connector-for-Power-Automate). + +## Known Issues and Limitations +The Staffbase connector currently does not support all Staffbase API features. +For more detailed information on Staffbase APIs, visit the [Staffbase Developer Portal](http://rs.staffbase.com/#developer-portal). + + +## Frequently Asked Questions + +### What business workflows can be automated using the Staffbase connector? +Many business processes can be automated using the Staffbase connector. For example, notify your employees directly in their employee app or intranet as and when actions take place in other tools. Learn more about such business use cases [here](https://support.staffbase.com/hc/en-us/articles/360017639140-Automate-Business-Workflows-With-Staffbase-and-Power-Automate). + +### Are there tutorials to help me get started with an automated workflow using the Staffbase connector? +Staffbase offers tutorials that use our Forms plugin and the Staffbase connector to automate your facility management. Learn all about how to set it up in this [section](https://support.staffbase.com/hc/en-us/sections/360004870179-Integration-Using-Forms-Plugin). + + +## Deployment Instructions +Run the following commands and follow the prompts: +```paconn +paconn create --api-def apiDefinition.swagger.json --api-prop apiProperties.json --secret +``` \ No newline at end of file diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index 389ac11774..e707e9f444 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -254,7 +254,7 @@ }, "parentID": { "type": "string", - "description": "The ID of the comment's parent, can be either a post or a comment." + "description": "The ID of the parent of the comment, can be either a post or a comment." }, "parentType": { "type": "string", @@ -483,7 +483,7 @@ "properties": { "title": { "type": "string", - "description": "The notification's title which is localized." + "description": "The title of the notification which is localized." }, "locale": { "type": "string", @@ -665,7 +665,7 @@ "x-ms-url-encoding": "single", "required": true, "type": "string", - "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "description": "This could be either the post ID defined by the API or if set the post externalID.", "x-ms-summary": "PageID" }], "description": "Removes a post from the system.", @@ -692,7 +692,7 @@ "x-ms-url-encoding": "single", "required": true, "type": "string", - "description": "This could be either the post\u2019s ID defined by the API or if set the post\u2019s externalID.", + "description": "This could be either the post ID defined by the API or if set the post externalID.", "x-ms-summary": "PageID" }, { @@ -1162,7 +1162,7 @@ }, "locale": { "type": "string", - "description": "This is the channel title's locale." + "description": "This is the locale of the channel title." } } } @@ -1396,14 +1396,14 @@ "parameters": {}, "responses": {}, "securityDefinitions": { - "API-Schl\u00fcssel": { + "API-Key": { "type": "apiKey", "in": "header", "name": "Authorization" } }, "security": [{ - "API-Schl\u00fcssel": [] + "API-Key": [] }], "tags": [], "x-ms-connector-metadata": [{ From 416c94ee22216c61709431c954d144d0afbc6f62 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Wed, 1 Sep 2021 12:44:50 +0200 Subject: [PATCH 11/23] Fixed apiProperties.json Unicode problems --- certified-connectors/Staffbase/apiProperties.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certified-connectors/Staffbase/apiProperties.json b/certified-connectors/Staffbase/apiProperties.json index d4d1c2b5bc..41a0359665 100644 --- a/certified-connectors/Staffbase/apiProperties.json +++ b/certified-connectors/Staffbase/apiProperties.json @@ -4,9 +4,9 @@ "api_key": { "type": "securestring", "uiDefinition": { - "displayName": "API-Schl\u00fcssel", - "description": "\"API-Schl\u00fcssel\" f\u00fcr diese API", - "tooltip": "Stellen Sie \"API-Schl\u00fcssel\" bereit.", + "displayName": "API-Key", + "description": "\"API-Key\" for the Staffbase instance", + "tooltip": "Insert your \"API-Key\" here. It can be obtained via the Staffbase Experience Studio settings.", "constraints": { "tabIndex": 2, "clearText": false, From e9e3e539138ea9c36e32582f5628992724345197 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Mon, 27 Sep 2021 16:37:24 +0200 Subject: [PATCH 12/23] Fixed Background Color --- certified-connectors/Staffbase/apiProperties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certified-connectors/Staffbase/apiProperties.json b/certified-connectors/Staffbase/apiProperties.json index 41a0359665..c28783e2e8 100644 --- a/certified-connectors/Staffbase/apiProperties.json +++ b/certified-connectors/Staffbase/apiProperties.json @@ -26,7 +26,7 @@ } } }, - "iconBrandColor": "#45A2F7", + "iconBrandColor": "#00A5FD", "capabilities": [], "policyTemplateInstances": [ { From 0f49b426b6559bd289271b83884bee95a7d00102 Mon Sep 17 00:00:00 2001 From: Nm-jens <68378054+Nm-jens@users.noreply.github.com> Date: Tue, 28 Sep 2021 12:06:32 +0200 Subject: [PATCH 13/23] Delete Readme.md --- .../Asite (US Gov.)/Readme.md | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 certified-connectors/Asite (US Gov.)/Readme.md diff --git a/certified-connectors/Asite (US Gov.)/Readme.md b/certified-connectors/Asite (US Gov.)/Readme.md deleted file mode 100644 index b4769d1835..0000000000 --- a/certified-connectors/Asite (US Gov.)/Readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# About - -Asite is an open construction platform that enables organizations with comprehensive range of solutions connect dispersed teams across the lifecycle of capital assets by collaborate, plan, design, and build with seamless information sharing across the entire supply chain which helps capital project owners stay at the forefront of innovation, maintaining a golden thread of information. - -The Asite connector helps to build a connection between two systems for file exchange. The connector collaborates both systems by uploading and downloading files based on triggers. - -# Pre-requisites - -- An active Asite CDE Subscription -- An active Microsoft Power Automate subscription -- An active workflow configuration in Asite platform, configured workflow trigger with the type "Microsoft Flow" - -# Actions - -Following are the internal and external actions used during connection flow to share a file - -| **Name** | **Trigger / Action Name** | **API EndPoint** | **Description** | **Visibility** | -| -------- | ------------------------- | ---------------- | --------------- | -------------- | -| Select Project Name || /workspaceList | It will list out all the Asite's projects where you have access. | Internal | -| Select Folder Name || /folderAndFileList | It will list out all the accessible folders based on your access from the selected Project. | Internal | -| When an Asite workflow event is triggered | Trigger | /asitePullDataWebhook | To upload file with metadata and download file on defined folder based on triggered workflow. | Important | -| Get file content | Action | /downloadFileByUrl | Retrieves the file content from Asite | Important | -| List of configured Triggers from Asite Platform | | /triggerList | To display list of configured Triggers from Asite Platform | Internal | -| Delete configured trigger || /deleteAsitePullDataWebhook/{id} | To Delete configured trigger | Internal | -| Get Dynamic Schema based on project and folder | | /getFolderAttributes | Get Dynamic Schema based on project and folder | Internal | -| Set file metadata | Action | /saveMetadataForUpload | Retrieves standard and custom metadata | Important | -| Create file | Action | /uploadFileFromExternalSystem | Upload a file in Asite project folder. | Important | -| Get dynamic schema based on project Id and trigger Id || /getFolderAttributesFromTrigger | Get dynamic schema based on project Id and trigger Id | Internal | -| Select Folder Name || /getSubFolderList | List out all the accessible folders based on your access from the above selected Project. | Internal | - -# Reference Link: - -Please refer help document for authorize connector and configure flow. [Click here](https://adoddleqa2ak.asite.com/adoddle%20online%20help/Asite_Integration_via_Microsoft_Power_Automate.htm) \ No newline at end of file From c296bdd4200c9de6927e7c1b37bf298c6bc4616b Mon Sep 17 00:00:00 2001 From: Nm-jens <68378054+Nm-jens@users.noreply.github.com> Date: Tue, 28 Sep 2021 12:06:55 +0200 Subject: [PATCH 14/23] Delete apiDefinition.swagger.json --- .../apiDefinition.swagger.json | 957 ------------------ 1 file changed, 957 deletions(-) delete mode 100644 certified-connectors/Asite (US Gov.)/apiDefinition.swagger.json diff --git a/certified-connectors/Asite (US Gov.)/apiDefinition.swagger.json b/certified-connectors/Asite (US Gov.)/apiDefinition.swagger.json deleted file mode 100644 index 59af0ee6ae..0000000000 --- a/certified-connectors/Asite (US Gov.)/apiDefinition.swagger.json +++ /dev/null @@ -1,957 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Asite (US Gov.)", - "description": "Transform how your teams work together with the Asite connector, the ultimate collaboration solution to build connections between business systems.", - "version": "1.0.0", - "contact": { - "name": "Asite Solutions Limited", - "url": "https://www.asite.com/contact-support", - "email": "support@asite.com" - } - }, - "host": "integrationusgov.asite.com", - "basePath": "/api", - "x-ms-connector-metadata": [ - { - "propertyName": "Website", - "propertyValue": "https://www.asite.com/" - }, - { - "propertyName": "Privacy policy", - "propertyValue": "https://www.asite.com/legal-terms-of-use#privacy" - }, - { - "propertyName": "Categories", - "propertyValue": "Collaboration;Content and Files" - } - ], - "schemes": [ - "https" - ], - "consumes": [ - "application/json", - "application/x-www-form-urlencoded" - ], - "produces": [ - "application/json" - ], - "paths": { - "/workspaceList": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "projectName": { - "type": "string", - "description": "projectName" - }, - "cloudUrl": { - "type": "string", - "description": "cloudUrl" - } - } - } - } - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "operationId": "GET_ASITE_PROJECT_LIST", - "summary": "Select Project Name", - "description": "List out all the Asite's projects where you have access. Please contact support@asite.com for access on required project.", - "x-ms-visibility": "internal", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "parameters": [ - { - "name": "getJsonResult", - "in": "query", - "required": true, - "type": "boolean" - }, - { - "name": "Accept", - "in": "header", - "type": "string", - "required": true - } - ] - } - }, - "/folderAndFileList": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "type": "object", - "properties": { - "folderData": { - "type": "array", - "items": { - "type": "object", - "properties": { - "folder_title": { - "type": "string", - "description": "Please select Folder Name followed by Project name." - }, - "folderId": { - "type": "string", - "description": "Unique identification of folder." - } - } - }, - "description": "There is array of folder data." - } - } - } - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "summary": "Select Folder Name", - "description": "List out all the accessible folders based on your access from the above selected Project.", - "operationId": "GET_ASITE_FOLDER_LIST", - "x-ms-visibility": "internal", - "consumes": [ - "application/x-www-form-urlencoded" - ], - "parameters": [ - { - "name": "projectId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "isWorkspace", - "in": "query", - "required": true, - "type": "integer" - }, - { - "name": "isFolderDataReq", - "in": "query", - "required": true, - "type": "boolean" - }, - { - "name": "Accept", - "in": "header", - "type": "string", - "required": true - } - ] - } - }, - "/getSubFolderList": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "folder_title": { - "type": "string", - "description": "Please select Folder Name followed by Project name." - }, - "folderId": { - "type": "string", - "description": "Unique identification of folder." - }, - "folderPath": { - "type": "string", - "description": "Unique identification of folder path." - }, - "hasSubFolder": { - "type": "boolean", - "description": "identification of sub-folder." - } - } - }, - "description": "There is array of folder data." - } - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "summary": "Select Folder Name", - "description": "List out all the accessible folders based on your access from the above selected Project.", - "operationId": "GET_ASITE_SUB_FOLDER_LIST", - "x-ms-visibility": "internal", - "parameters": [ - { - "name": "projectId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "folderId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "hasSubFolder", - "in": "query", - "required": true, - "type": "boolean" - } - ] - } - }, - "/asitePullDataWebhook": { - "x-ms-notification-content": { - "description": "When trigger is initiated in Asite.", - "schema": { - "type": "object", - "x-ms-dynamic-schema": { - "operationId": "GET_DYNAMIC_SCHEMA_PROJECTID_TRIGGERID", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "triggerId": { - "parameter": "resourceId" - }, - "Accept": "*/*" - } - }, - "x-ms-dynamic-properties": { - "operationId": "GET_DYNAMIC_SCHEMA_PROJECTID_TRIGGERID", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "triggerId": { - "parameterReference": "body/resourceId" - }, - "Accept": { - "value": "*/*" - } - } - } - } - }, - "post": { - "responses": { - "201": { - "description": "Created" - } - }, - "summary": "When an Asite workflow event is triggered", - "description": "Triggers a workflow event to upload a file to the project folder.", - "operationId": "ASITE_TRIGGER_EVENT", - "x-ms-trigger": "single", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "Accept", - "in": "header", - "required": true, - "type": "string", - "x-ms-visibility": "internal", - "default": "*/*" - }, - { - "name": "projectId", - "type": "string", - "required": true, - "in": "query", - "description": "Select a Project", - "x-ms-dynamic-values": { - "operationId": "GET_ASITE_PROJECT_LIST", - "value-title": "projectName", - "value-path": "cloudUrl", - "parameters": { - "getJsonResult": true, - "Accept": "*/*" - } - }, - "x-ms-dynamic-list": { - "operationId": "GET_ASITE_PROJECT_LIST", - "itemValuePath": "cloudUrl", - "itemTitlePath": "projectName", - "parameters": { - "getJsonResult": { - "value": true - }, - "Accept": { - "value": "*/*" - } - } - }, - "x-ms-summary": "Project Name" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "webhookUrl": { - "type": "string", - "description": "Webhook URL", - "x-ms-notification-url": true, - "x-ms-visibility": "internal", - "x-ms-summary": "Webhook URL" - }, - "resourceId": { - "type": "string", - "description": "Select a Trigger configured for selected project", - "x-ms-summary": "Trigger Name", - "x-ms-dynamic-values": { - "operationId": "ASITE_TRIGGER_LIST", - "value-title": "triggerName", - "value-path": "triggerId", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "ruleContext": 3 - } - }, - "x-ms-dynamic-list": { - "operationId": "ASITE_TRIGGER_LIST", - "itemValuePath": "triggerId", - "itemTitlePath": "triggerName", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "ruleContext": { - "value": 3 - } - } - } - }, - "resourceType": { - "type": "integer", - "description": "Resource Type", - "x-ms-summary": "Resource Type", - "x-ms-visibility": "internal", - "default": 1 - } - }, - "required": [ - "webhookUrl", - "resourceId", - "resourceType" - ] - } - } - ] - } - }, - "/downloadFileByUrl": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "format": "binary", - "description": "The content of the file.", - "type": "string", - "x-ms-summary": "File Content" - } - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "summary": "Get file content", - "description": "Retrieves the file content from Asite.", - "operationId": "FILE_DOWNLOAD_BY_URL", - "parameters": [ - { - "name": "downloadUrl", - "in": "query", - "required": true, - "type": "string", - "description": "Select 'DirectLink' metadata to download a file", - "x-ms-summary": "URL Selection" - } - ] - } - }, - "/triggerList": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "triggerId": { - "type": "integer", - "format": "int32", - "description": "Trigger ID" - }, - "triggerName": { - "type": "string", - "description": "Trigger Name" - } - } - } - } - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "summary": "List of configured Triggers from Asite Platform", - "description": "List of configured Triggers from Asite Platform", - "operationId": "ASITE_TRIGGER_LIST", - "x-ms-visibility": "internal", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "projectId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "ruleContext", - "in": "query", - "required": true, - "type": "integer" - } - ] - } - }, - "/deleteAsitePullDataWebhook/{id}": { - "delete": { - "responses": { - "200": { - "description": "OK, Success" - } - }, - "summary": "Delete configured trigger", - "description": "Delete configured trigger", - "operationId": "DELETE_TRIGGER_WEBHOOK", - "x-ms-visibility": "internal", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "x-ms-url-encoding": "single", - "type": "string" - } - ] - } - }, - "/getFolderAttributes": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": {} - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "summary": "Get Dynamic Schema based on project and folder", - "description": "Get Dynamic Schema based on project and folder", - "operationId": "GET_CUSTOM_ATTR_DYNAMIC_SCHEMA", - "x-ms-visibility": "internal", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "Accept", - "in": "header", - "required": true, - "type": "string", - "x-ms-visibility": "internal", - "default": "*/*" - }, - { - "name": "projectId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "folderId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "isRequiredField", - "in": "query", - "required": true, - "type": "boolean", - "default": false - } - ] - } - }, - "/saveMetadataForUpload": { - "post": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "type": "string", - "title": "Metadata Id" - } - } - }, - "summary": "Set file metadata", - "description": "Retrieves the defined file meta-data and sets the values during the file upload process. Note: it is mandatory to set this action before the Create file action is triggered.", - "operationId": "SET_FILE_METADATA", - "parameters": [ - { - "name": "projectId", - "description": "Select a Project", - "in": "query", - "required": true, - "type": "string", - "x-ms-summary": "Project Name", - "x-ms-dynamic-values": { - "operationId": "GET_ASITE_PROJECT_LIST", - "value-title": "projectName", - "value-path": "cloudUrl", - "parameters": { - "getJsonResult": true, - "Accept": "*/*" - } - }, - "x-ms-dynamic-list": { - "operationId": "GET_ASITE_PROJECT_LIST", - "itemValuePath": "cloudUrl", - "itemTitlePath": "projectName", - "parameters": { - "getJsonResult": { - "value": true - }, - "Accept": { - "value": "*/*" - } - } - } - }, - { - "name": "folderId", - "description": "Select a Folder", - "in": "query", - "required": true, - "type": "string", - "x-ms-summary": "Folder Name", - "x-ms-dynamic-values": { - "capability": "file-picker", - "value-title": "folder_title", - "value-path": "folderId", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "fileFilter": [], - "hasSubFolder": true - } - }, - "x-ms-dynamic-tree": { - "settings": { - "canSelectParentNodes": true, - "canSelectLeafNodes": false - }, - "open": { - "operationId": "GET_ASITE_FOLDER_LIST", - "itemValuePath": "folderId", - "itemTitlePath": "folder_title", - "itemFullTitlePath": "folderPath", - "itemIsParent": "true", - "itemsPath": "folderData", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "isFolderDataReq": { - "value": true - }, - "isWorkspace": { - "value": 1 - }, - "Accept": { - "value": "*/*" - } - } - }, - "browse": { - "operationId": "GET_ASITE_SUB_FOLDER_LIST", - "itemValuePath": "folderId", - "itemTitlePath": "folder_title", - "itemFullTitlePath": "folderPath", - "itemIsParent": "true", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "folderId": { - "selectedItemValuePath": "folderId" - }, - "hasSubFolder": { - "value": true - } - } - } - } - }, - { - "name": "items", - "in": "body", - "required": true, - "schema": { - "type": "object", - "x-ms-dynamic-schema": { - "operationId": "GET_CUSTOM_ATTR_DYNAMIC_SCHEMA", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "folderId": { - "parameter": "folderId" - }, - "Accept": "*/*", - "isRequiredField": true - } - }, - "x-ms-dynamic-properties": { - "operationId": "GET_CUSTOM_ATTR_DYNAMIC_SCHEMA", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "folderId": { - "parameterReference": "folderId" - }, - "Accept": { - "value": "*/*" - }, - "isRequiredField": { - "value": true - } - } - } - } - } - ] - } - }, - "/uploadFileFromExternalSystem": { - "post": { - "responses": { - "200": { - "description": "OK, Success", - "schema": { - "type": "object", - "x-ms-dynamic-schema": { - "operationId": "GET_CUSTOM_ATTR_DYNAMIC_SCHEMA", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "folderId": { - "parameter": "folderId" - }, - "Accept": "*/*", - "isRequiredField": false - } - }, - "x-ms-dynamic-properties": { - "operationId": "GET_CUSTOM_ATTR_DYNAMIC_SCHEMA", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "folderId": { - "parameterReference": "folderId" - }, - "Accept": { - "value": "*/*" - }, - "isRequiredField": { - "value": false - } - } - } - } - }, - "400": { - "description": "BAD REQUEST, Invalid request" - } - }, - "summary": "Create file", - "description": "Upload a file in Asite project folder.", - "operationId": "UPLOAD_BINARY_FILE", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "projectId", - "description": "Select a Project", - "in": "query", - "required": true, - "type": "string", - "x-ms-summary": "Project Name", - "x-ms-dynamic-values": { - "operationId": "GET_ASITE_PROJECT_LIST", - "value-title": "projectName", - "value-path": "cloudUrl", - "parameters": { - "getJsonResult": true, - "Accept": "*/*" - } - }, - "x-ms-dynamic-list": { - "operationId": "GET_ASITE_PROJECT_LIST", - "itemValuePath": "cloudUrl", - "itemTitlePath": "projectName", - "parameters": { - "getJsonResult": { - "value": true - }, - "Accept": { - "value": "*/*" - } - } - } - }, - { - "name": "folderId", - "description": "Select a Folder", - "in": "query", - "required": true, - "type": "string", - "x-ms-summary": "Folder Name", - "x-ms-dynamic-values": { - "capability": "file-picker", - "value-title": "folder_title", - "value-path": "folderId", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "fileFilter": [], - "hasSubFolder": true - } - }, - "x-ms-dynamic-tree": { - "settings": { - "canSelectParentNodes": true, - "canSelectLeafNodes": false - }, - "open": { - "operationId": "GET_ASITE_FOLDER_LIST", - "itemValuePath": "folderId", - "itemTitlePath": "folder_title", - "itemFullTitlePath": "folderPath", - "itemIsParent": "true", - "itemsPath": "folderData", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "isFolderDataReq": { - "value": true - }, - "isWorkspace": { - "value": 1 - }, - "Accept": { - "value": "*/*" - } - } - }, - "browse": { - "operationId": "GET_ASITE_SUB_FOLDER_LIST", - "itemValuePath": "folderId", - "itemTitlePath": "folder_title", - "itemFullTitlePath": "folderPath", - "itemIsParent": "true", - "parameters": { - "projectId": { - "parameterReference": "projectId" - }, - "folderId": { - "selectedItemValuePath": "folderId" - }, - "hasSubFolder": { - "value": true - } - } - } - } - }, - { - "name": "fileName", - "in": "query", - "required": true, - "type": "string", - "x-ms-summary": "File Name", - "description": "Enter File name with file type extension" - }, - { - "name": "metadataId", - "in": "query", - "required": true, - "type": "string", - "x-ms-summary": "File Metadata", - "description": "Select Metadata ID from Dynamic Content section" - }, - { - "name": "fileBinary", - "in": "body", - "x-ms-summary": "File Content", - "required": true, - "schema": { - "type": "string", - "format": "binary", - "description": "Binary file content" - } - } - ] - } - }, - "/getFolderAttributesFromTrigger": { - "get": { - "responses": { - "200": { - "description": "OK, Success", - "schema": {} - } - }, - "summary": "Get dynamic schema based on project Id and trigger Id", - "parameters": [ - { - "name": "projectId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "triggerId", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "Accept", - "in": "header", - "required": true, - "type": "string" - } - ], - "description": "Get dynamic schema based on project Id and trigger Id", - "operationId": "GET_DYNAMIC_SCHEMA_PROJECTID_TRIGGERID", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "x-ms-visibility": "internal" - } - } - }, - "definitions": {}, - "parameters": {}, - "responses": {}, - "securityDefinitions": { - "oauth2_auth": { - "type": "oauth2", - "flow": "accessCode", - "authorizationUrl": "https://oauthusgov.asite.com/oauth/authorize", - "tokenUrl": "https://oauthusgov.asite.com/oauth/token", - "scopes": { - "DOCUMENT_READ DOCUMENT_WRITE": "DOCUMENT_READ DOCUMENT_WRITE" - } - } - }, - "security": [ - { - "oauth2_auth": [ - "DOCUMENT_READ DOCUMENT_WRITE" - ] - } - ], - "tags": [], - "x-ms-capabilities": { - "file-picker": { - "open": { - "operationId": "GET_ASITE_FOLDER_LIST", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "isFolderDataReq": { - "value": true - }, - "isWorkspace": { - "value": 1 - }, - "Accept": { - "value": "*/*" - } - } - }, - "browse": { - "operationId": "GET_ASITE_SUB_FOLDER_LIST", - "parameters": { - "projectId": { - "parameter": "projectId" - }, - "folderId": { - "value-property": "folderId" - }, - "hasSubFolder": { - "value": true - } - } - }, - "value-title": "folder_title", - "value-path": "folderId", - "value-media-property": "MediaType", - "value-folder-property": "hasSubFolder" - } - } -} \ No newline at end of file From 295aa1a3e9fd1138b21a4928c9fe5091e8303768 Mon Sep 17 00:00:00 2001 From: Nm-jens <68378054+Nm-jens@users.noreply.github.com> Date: Tue, 28 Sep 2021 12:07:11 +0200 Subject: [PATCH 15/23] Delete apiProperties.json --- .../Asite (US Gov.)/apiProperties.json | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 certified-connectors/Asite (US Gov.)/apiProperties.json diff --git a/certified-connectors/Asite (US Gov.)/apiProperties.json b/certified-connectors/Asite (US Gov.)/apiProperties.json deleted file mode 100644 index 7b93d8074b..0000000000 --- a/certified-connectors/Asite (US Gov.)/apiProperties.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "properties": { - "connectionParameters": { - "token": { - "type": "oauthSetting", - "oAuthSettings": { - "identityProvider": "oauth2", - "clientId": "{{ client id }}", - "scopes": [ - "DOCUMENT_READ DOCUMENT_WRITE" - ], - "redirectMode": "Global", - "properties": { - "IsFirstParty": "False" - }, - "customParameters": { - "authorizationUrl": { - "value": "https://oauthusgov.asite.com/oauth/authorize" - }, - "tokenUrl": { - "value": "https://oauthusgov.asite.com/oauth/token" - }, - "refreshUrl": { - "value": "https://oauthusgov.asite.com/oauth/token" - } - } - } - } - }, - "iconBrandColor": "#1F344A", - "capabilities": [], - "policyTemplateInstances": [ - { - "templateId": "dynamichosturl", - "title": "set Host URL", - "parameters": { - "x-ms-apimTemplateParameter.urlTemplate": "@queryParameters('projectId')", - "x-ms-apimTemplate-operationName": [ - "GET_ASITE_FOLDER_LIST", - "ASITE_TRIGGER_LIST", - "DELETE_TRIGGER_WEBHOOK", - "GET_CUSTOM_ATTR_DYNAMIC_SCHEMA", - "SET_FILE_METADATA", - "UPLOAD_BINARY_FILE", - "GET_DYNAMIC_SCHEMA_PROJECTID_TRIGGERID", - "ASITE_TRIGGER_EVENT", - "GET_ASITE_SUB_FOLDER_LIST" - ] - } - } - ], - "publisher": "Asite Solutions Limited", - "stackOwner": "Asite Solutions Limited" - } -} \ No newline at end of file From 558a4a7d1d115e155da2fb1b8613bf1ad1ee65ac Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Thu, 14 Oct 2021 22:53:13 +0200 Subject: [PATCH 16/23] Fixed connection renamed hosting URL to host --- certified-connectors/Staffbase/apiProperties.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/certified-connectors/Staffbase/apiProperties.json b/certified-connectors/Staffbase/apiProperties.json index c28783e2e8..0511670bc3 100644 --- a/certified-connectors/Staffbase/apiProperties.json +++ b/certified-connectors/Staffbase/apiProperties.json @@ -14,15 +14,15 @@ } } }, - "hostingURL": { + "hostID": { "type": "string", "uiDefinition": { "constraints": { "required": "true" }, - "description": "Specify your hosting url: hostingURL", - "displayName": "Hosting URL", - "tooltip": "Provide hosting URL here" + "description": "Specify your hosting ID: hostID", + "displayName": "Host ID", + "tooltip": "Provide hosting ID here" } } }, @@ -33,7 +33,7 @@ "templateId": "dynamichosturl", "title": "Route to keyvault", "parameters": { - "x-ms-apimTemplateParameter.urlTemplate": "https://powerautomateproxy-@connectionParameters('hostingURL').staffbase.com" + "x-ms-apimTemplateParameter.urlTemplate": "https://powerautomateproxy-@connectionParameters('hostID').staffbase.com" } } ], From 673d6ccada84cbfb96a7add7b065210944316dcb Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 22 Oct 2021 09:11:49 +0200 Subject: [PATCH 17/23] Fix for Hosting ID field description --- certified-connectors/Staffbase/apiProperties.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/certified-connectors/Staffbase/apiProperties.json b/certified-connectors/Staffbase/apiProperties.json index 0511670bc3..9644207dbc 100644 --- a/certified-connectors/Staffbase/apiProperties.json +++ b/certified-connectors/Staffbase/apiProperties.json @@ -14,14 +14,14 @@ } } }, - "hostID": { + "hostingID": { "type": "string", "uiDefinition": { "constraints": { "required": "true" }, - "description": "Specify your hosting ID: hostID", - "displayName": "Host ID", + "description": "Specify your hosting ID: hostingID", + "displayName": "Hosting ID", "tooltip": "Provide hosting ID here" } } @@ -33,7 +33,7 @@ "templateId": "dynamichosturl", "title": "Route to keyvault", "parameters": { - "x-ms-apimTemplateParameter.urlTemplate": "https://powerautomateproxy-@connectionParameters('hostID').staffbase.com" + "x-ms-apimTemplateParameter.urlTemplate": "https://powerautomateproxy-@connectionParameters('hostingID').staffbase.com" } } ], From 91cc61668e01be5638263c00446d94521c8c2feb Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Mon, 29 Aug 2022 17:41:18 +0200 Subject: [PATCH 18/23] Version 3 Update --- certified-connectors/Staffbase/README.md | 4 +- .../Staffbase/apiDefinition.swagger.json | 68 ++++++++++++++++--- 2 files changed, 59 insertions(+), 13 deletions(-) diff --git a/certified-connectors/Staffbase/README.md b/certified-connectors/Staffbase/README.md index 5964d4e640..8bfe30fc12 100644 --- a/certified-connectors/Staffbase/README.md +++ b/certified-connectors/Staffbase/README.md @@ -82,8 +82,8 @@ A dialog to configure the connector opens. __Note__: You need to add an empty space between 'Basic' and the API token. In the Host ID field, enter the identifier for the infrastructure where your Staffbase platform is hosted: - * German infrastructure: **main-de1** - * International infrastructure: **main-us1** + * German infrastructure: **de1** + * International infrastructure: **us1** For detailed information, visit the [Staffbase Support Portal](https://support.staffbase.com/hc/en-us/articles/360017381759-Automating-Workflows-With-the-Staffbase-Connector-for-Power-Automate). diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index e707e9f444..6068b068c6 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -10,7 +10,7 @@ "email": "support@staffbase.com" } }, - "host": "powerautomateproxy-main-de1.staffbase.com", + "host": "powerautomateproxy-de1.staffbase.com", "basePath": "/", "schemes": [ "https" @@ -136,15 +136,33 @@ "operationId": "ChannelsGetPosts", "summary": "Channels: Get a list of posts within the specified channel", "description": "Get a list of posts within the specified channel.", - "parameters": [{ - "name": "channelID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "Insert channel ID here, e.g. retrieved by getChannels.", - "x-ms-summary": "ChannelID" - }], + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Insert channel ID here, e.g. retrieved by getChannels.", + "x-ms-summary": "ChannelID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100).", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + } + ], "x-ms-visibility": "important" }, "post": { @@ -265,6 +283,11 @@ "description": "This is the comments content / test itself.", "title": "comment text" }, + "rootID": { + "type": "string", + "description": "This is the ID of the post this comment is related to", + "title": "post ID" + }, "author": { "$ref": "#/definitions/authorObject" }, @@ -569,7 +592,30 @@ "200": { "description": "default", "schema": { - "$ref": "#/definitions/postData" + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of posts that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/postData" + } + } + } } } }, From b1fcf84b3f4589f5e56875e3e54b32cf634fb9cb Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Thu, 20 Oct 2022 18:48:21 +0200 Subject: [PATCH 19/23] Added parameters for posts: manageable and content type --- .../Staffbase/apiDefinition.swagger.json | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index 6068b068c6..68cb13437e 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -136,8 +136,7 @@ "operationId": "ChannelsGetPosts", "summary": "Channels: Get a list of posts within the specified channel", "description": "Get a list of posts within the specified channel.", - "parameters": [ - { + "parameters": [{ "name": "channelID", "in": "path", "x-ms-url-encoding": "single", @@ -645,6 +644,23 @@ "type": "integer", "description": "Define an offset for getting the items starting at this number.", "x-ms-summary": "Offset" + }, + { + "name": "manageable", + "in": "query", + "required": false, + "type": "boolean", + "default": false, + "description": "Optional filter for the given post content types. Defaults to not filtering.", + "x-ms-summary": "Manageable" + }, + { + "name": "contentType", + "in": "query", + "required": false, + "type": "string", + "description": "Optional filter for the given post content types: [articles, pictures, updates]. (Defaults to not filtering)", + "x-ms-summary": "ContentType" } ], "x-ms-visibility": "important" @@ -1349,6 +1365,7 @@ }, "imageObject": { "type": "object", + "x-nullable": true, "properties": { "original": { "type": "object", From 451dfb974f1e36783d6669c06273bf7c34f95991 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Thu, 20 Oct 2022 21:17:43 +0200 Subject: [PATCH 20/23] PostsGetAll: Added enum for contentType parameter --- certified-connectors/Staffbase/apiDefinition.swagger.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index ec10f22d97..30ab05cd8b 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -136,8 +136,7 @@ "operationId": "ChannelsGetPosts", "summary": "Channels: Get a list of posts within the specified channel", "description": "Get a list of posts within the specified channel.", - "parameters": [ - { + "parameters": [{ "name": "channelID", "in": "path", "x-ms-url-encoding": "single", @@ -660,7 +659,9 @@ "in": "query", "required": false, "type": "string", - "description": "Optional filter for the given post content types: [articles, pictures, updates]. (Defaults to not filtering)", + "uniqueItems": true, + "enum": ["articles", "pictures", "updates"], + "description": "Optional filter for the given post content types. (Defaults to not filtering)", "x-ms-summary": "ContentType" } ], From 7a5e7287086b4130507c23df2dcef097a5f5c193 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 21 Oct 2022 10:21:33 +0200 Subject: [PATCH 21/23] Removed code-workspace from repo --- staffbase.code-workspace | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 staffbase.code-workspace diff --git a/staffbase.code-workspace b/staffbase.code-workspace deleted file mode 100644 index 08cdccd821..0000000000 --- a/staffbase.code-workspace +++ /dev/null @@ -1,15 +0,0 @@ -{ - "folders": [ - { - "path": "." - }, - { - "path": "../../staffbase-powerautomate-proxy" - } - ], - "settings": { - "files.associations": { - "*.schema.json": "jsonc" - } - } -} \ No newline at end of file From 3788ada07722151badc40259a26a84a64233da5f Mon Sep 17 00:00:00 2001 From: PrzemekPierscinski <120649653+PrzemekPierscinski@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:22:23 +0200 Subject: [PATCH 22/23] MINT-999 update description --- certified-connectors/Staffbase/apiDefinition.swagger.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index 30ab05cd8b..08dad18a8e 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -400,7 +400,7 @@ } }, "summary": "Media: Get all media", - "description": "Get metadata of all media that are accessible for the API token.", + "description": "Requests description of all media available in the current context.", "operationId": "MediaGet", "x-ms-visibility": "important", "parameters": [{ @@ -1484,4 +1484,4 @@ "propertyValue": "Communication;Human Resources" } ] -} \ No newline at end of file +} From b033536db7d8a40683504ea2d2cef859b056710a Mon Sep 17 00:00:00 2001 From: Max Scholz Date: Sat, 21 Mar 2026 17:22:08 +0100 Subject: [PATCH 23/23] =?UTF-8?q?feat:=20full=20update=20=E2=80=94=20align?= =?UTF-8?q?=20Staffbase=20connector=20with=20all=20available=20APIs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- certified-connectors/Staffbase/README.md | 297 +- .../Staffbase/apiDefinition.swagger.json | 8140 ++++++++++++++--- 2 files changed, 7332 insertions(+), 1105 deletions(-) diff --git a/certified-connectors/Staffbase/README.md b/certified-connectors/Staffbase/README.md index 8bfe30fc12..a9a98c4e25 100644 --- a/certified-connectors/Staffbase/README.md +++ b/certified-connectors/Staffbase/README.md @@ -1,107 +1,258 @@ # Staffbase connector + With the Staffbase connector for Power Automate you bridge the gap between different tools and systems and include the Staffbase platform in your automated workflows. Leverage the power of automated workflows that include your employee app or intranet to automate processes, run tasks on a schedule, or notify users as events take place. ## Prerequisites + * A Microsoft Power Apps or Power Automate plan with custom connector feature -* A Staffbase license for your organization +* A Staffbase license for your organization * The role of administrator for your organization on the Staffbase platform * The [API token](https://support.staffbase.com/hc/en-us/articles/360015755691) to configure authentication -* Information on which Staffasbe infrastructure your application is hosted on, reach out to support@staffbase.com for more information - -## Supported Operations - -### ChannelsGetList -Get a list of news channels - -### ChannelsGetPosts -Get a list of posts within the specified channel - -### ChannelsPostPost -Send a post to specific channel - -### CommentsGet -Get all comments from your Staffbase instance - -### MediaGet -Get all media from your Staffbase instance - -### MediaGetByID -Get media by ID +* [Information](https://support.staffbase.com/hc/en-us/articles/4404976026386) on which Staffbase infrastructure your application is hosted on -### MediaDelete -Delete media by ID - -### NotificationPost -Sends notification to user(s) - -### PostsGetAll -Get a list of posts - -### PostsGetByID -Get a post by ID +## Obtaining Credentials -### PostsDelete -Removes a post +For authentication between your Staffbase platform and Power Automate, you need an API token. You can [generate an API token](https://support.staffbase.com/hc/en-us/articles/360015755691) from the Staffbase Studio. -### PostsPut -Updates a post +## Getting Started -### UserGetAll -Get list of users +Configure the connector with basic authentication and the hosting URL. -### UserPost -Invite an user by firstname, lastname and eMail +1. In Power Automate, navigate to **Connectors**. +2. Search for **Staffbase connector**. +3. Click on the Staffbase connector. A dialog to configure the connector opens. +4. In the **API Token** field, add the API token using the following syntax: `Basic [API-Token]` -### UserGetByID -Get user information +> **Note:** You need to add an empty space between `Basic` and the API token. -### User_delete -Delete User by ID +In the **Host ID** field, enter the identifier for the infrastructure where your Staffbase platform is hosted: +* German infrastructure: **de1** +* International infrastructure: **us1** -### UserPut -Update user information +For detailed information, visit the [Staffbase Support Portal](https://support.staffbase.com/hc/en-us/articles/360017381759). -### UserPostRecovery -Send a recovery email +## Token Permissions -### ProxyVersionGet -Just for internal usage, to check the current API proxy version +| Level | Suitable For | +|---|---| +| **Read-only** | Analytics, Tags, Post/Channel/User/Space search operations | +| **Editorial** | Notifications, creating/updating Posts, Pages, Campaigns | +| **Admin** | Users (create/update/delete), Groups, Spaces, CSV Import, File Management, Quick Links, Media (upload/delete) | -## Obtaining Credentials -For the basic authentication between your Staffbase platform and the workflow created in Power Automate, you need an API token. You can [generate the API](https://support.staffbase.com/hc/en-us/articles/360015755691-Generating-an-API-Token) token from the Staffbase Experience Studio. +## Supported Operations -## Getting Started -Configure the connector with basic authentication and the hosting URL. - -1. In Power Automate, navigate to Connectors. -2. Search for Staffbase connector. -3. Click on the Staffbase connector. -A dialog to configure the connector opens. -5. In the API Token field, add the API token using the following syntax: Basic [API-Token] - -__Note__: You need to add an empty space between 'Basic' and the API token. - -In the Host ID field, enter the identifier for the infrastructure where your Staffbase platform is hosted: - * German infrastructure: **de1** - * International infrastructure: **us1** - -For detailed information, visit the [Staffbase Support Portal](https://support.staffbase.com/hc/en-us/articles/360017381759-Automating-Workflows-With-the-Staffbase-Connector-for-Power-Automate). +### Notifications + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Send Notification | POST | /branch/notifications | Important | + +### Posts & Channels + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Channels: Get list | GET | /channels | Important | +| Channels: Get branch channels | GET | /branch/channels | Important | +| Channels: Get by ID | GET | /channels/{channelID} | Important | +| Channels: Get posts in channel | GET | /channels/{channelID}/posts | Important | +| Channels: Create post in channel | POST | /channels/{channelID}/posts | Important | +| Posts: Get all | GET | /posts | Important | +| Posts: Create post | POST | /posts | Important | +| Posts: Get by ID | GET | /posts/{pageID} | Important | +| Posts: Update | PUT | /posts/{pageID} | Important | +| Posts: Delete | DELETE | /posts/{pageID} | Advanced | +| Posts: Search | GET | /posts/search | Important | +| Posts: Resend notifications | POST | /posts/{pageID}/notifications | Important | +| Posts: Get acknowledgements | GET | /posts/{pageID}/acknowledgements | Advanced | + +### Comments + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Comments: Get all | GET | /comments | Important | + +### Media + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Media: Get all | GET | /media | Important | +| Media: Upload | POST | /media | Important | +| Media: Get by ID | GET | /media/{mediumID} | Important | +| Media: Delete | DELETE | /media/{mediumID} | Advanced | +| Media: Replace | PUT | /media/{mediumID} | Important | +| Media: Search | GET | /media/search | Important | +| Media: Publish | POST | /media/publish | Important | + +### Users + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Users: Get all | GET | /users | Important | +| Users: Create user | POST | /users | Important | +| Users: Get by ID | GET | /users/{userID} | Important | +| Users: Update | PUT | /users/{userID} | Important | +| Users: Delete | DELETE | /users/{userID} | Advanced | +| Users: Partial update | PATCH | /users/{userID} | Important | +| Users: Search | GET | /users/search | Important | +| Users: Sync | GET | /users/sync | Important | +| Users: Get groups | GET | /users/{userID}/groups | Important | +| Users: Search groups | GET | /users/{userID}/groups/search | Important | +| Users: Get visible groups | GET | /users/{userID}/groups/visible | Important | +| Users: Delete sessions | DELETE | /users/{userID}/sessions | Advanced | +| Users: Send recovery email | POST | /users/{userID}/recovery | Important | + +### Pages + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Pages: Get list | GET | /pages | Important | +| Pages: Create | POST | /pages | Important | +| Pages: Sync (external system sync) | GET | /pages/sync | Advanced | +| Pages: Get by ID | GET | /pages/{pageId} | Important | +| Pages: Update | PUT | /pages/{pageId} | Important | +| Pages: Delete | DELETE | /pages/{pageId} | Advanced | + +### Groups + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Groups: Get list | GET | /groups | Important | +| Groups: Create | POST | /groups | Important | +| Groups: Search | GET | /groups/search | Important | +| Groups: Get by ID | GET | /groups/{groupId} | Important | +| Groups: Partial update | PATCH | /groups/{groupId} | Important | +| Groups: Delete | DELETE | /groups/{groupId} | Advanced | +| Groups: Search members | GET | /groups/{groupId}/members/search | Important | +| Groups: Add or remove members | PATCH | /groups/{groupId}/members | Important | + +### Spaces + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Spaces: Get list | GET | /spaces | Important | +| Spaces: Create | POST | /spaces | Important | +| Spaces: Search | GET | /spaces/search | Important | +| Spaces: Get by ID | GET | /spaces/{spaceId} | Important | +| Spaces: Update | PUT | /spaces/{spaceId} | Important | +| Spaces: Delete | DELETE | /spaces/{spaceId} | Advanced | + +### Campaigns + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Campaigns: List | GET | /campaigns | Important | +| Campaigns: Create | POST | /campaigns | Important | +| Campaigns: Get by ID | GET | /campaigns/{campaignId} | Important | +| Campaigns: Update | PUT | /campaigns/{campaignId} | Important | +| Campaigns: Delete | DELETE | /campaigns/{campaignId} | Advanced | +| Campaigns: List references | GET | /campaigns/{campaignId}/references | Important | +| Campaigns: Add reference | POST | /campaigns/{campaignId}/references | Important | +| Campaigns: Delete reference | DELETE | /campaigns/{campaignId}/references/{sourceType}/{sourceId} | Advanced | + +### Tags + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Tags: Get user profile tags | GET | /tags | Important | + +### Quick Links + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Quick Links: Get all | GET | /branch/quicklinks | Important | +| Quick Links: Create | POST | /branch/quicklinks | Important | +| Quick Links: Get by ID | GET | /branch/quicklinks/{quickLinkId} | Important | +| Quick Links: Update | POST | /branch/quicklinks/{quickLinkId} | Important | +| Quick Links: Delete | DELETE | /branch/quicklinks/{quickLinkId} | Advanced | + +### Page Templates + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Templates: Get list | GET | /templates | Important | +| Templates: Create | POST | /templates | Important | +| Templates: Get by ID | GET | /templates/{templateId} | Important | +| Templates: Update | PUT | /templates/{templateId} | Important | +| Templates: Delete | DELETE | /templates/{templateId} | Advanced | + +### Installations + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Installations: Search | GET | /installations/search | Important | + +### Analytics + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Analytics: Post performance rankings | GET | /branch/analytics/posts/rankings | Advanced | +| Analytics: Post performance timeseries | GET | /branch/analytics/posts/timeseries | Advanced | +| Analytics: Content performance rankings | GET | /branch/analytics/contents/rankings | Advanced | +| Analytics: Chat activity timeseries | GET | /branch/analytics/chats/timeseries | Advanced | +| Analytics: User engagement timeseries | GET | /branch/analytics/v2/users/timeseries | Advanced | + +### Email Performance + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| Email Performance: List emails | GET | /email-performance/emails | Advanced | +| Email Performance: Get email metadata | GET | /email-performance/emails/{emailId} | Advanced | +| Email Performance: Get click rate | GET | /email-performance/{emailId}/clicks | Advanced | +| Email Performance: Get open rate | GET | /email-performance/{emailId}/opens | Advanced | +| Email Performance: Get recipient count | GET | /email-performance/{emailId}/recipient-count | Advanced | +| Email Performance: Get top clicked links | GET | /email-performance/{emailId}/top-clicked-links | Advanced | +| Email Performance: Get engagement trend | GET | /email-performance/{emailId}/engagement-trend | Advanced | +| Email Performance: Get total activity over time | GET | /email-performance/{emailId}/total-activity-over-time | Advanced | +| Email Performance: Get unique activity over time | GET | /email-performance/{emailId}/unique-activity-over-time | Advanced | +| Email Performance: Get audience groups | GET | /email-performance/{emailId}/user-groups | Advanced | + +### CSV Import + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| CSV Import: List imports | GET | /users/imports | Important | +| CSV Import: Upload CSV file | POST | /users/imports | Important | +| CSV Import: Get import by ID | GET | /users/imports/{importId} | Important | +| CSV Import: Update import status | PATCH | /users/imports/{importId} | Important | +| CSV Import: Delete import | DELETE | /users/imports/{importId} | Advanced | +| CSV Import: Get processing status | GET | /users/imports/{importId}/status | Important | +| CSV Import: Get configuration | GET | /users/imports/{importId}/config | Advanced | +| CSV Import: Set configuration | PATCH | /users/imports/{importId}/config | Advanced | + +### File Management + +| Operation | Method | Path | Visibility | +|---|---|---|---| +| File Management: Create collection | POST | /medialibrary/collections | Important | +| File Management: List collections | GET | /medialibrary/collections | Important | +| File Management: List all collections (admin) | GET | /medialibrary/collections/all | Advanced | +| File Management: Get collection | GET | /medialibrary/collections/{collectionId} | Important | +| File Management: Update collection | PUT | /medialibrary/collections/{collectionId} | Important | +| File Management: Delete collection | DELETE | /medialibrary/collections/{collectionId} | Important | +| File Management: Add files to collection | POST | /medialibrary/collections/{collectionId}/entries | Important | +| File Management: List files in collection | GET | /medialibrary/collections/{collectionId}/entries | Important | +| File Management: Remove files from collection | POST | /medialibrary/collections/{collectionId}/entries/delete | Important | +| File Management: Search media files | POST | /medialibrary/entries | Important | +| File Management: Associate file with media library | PUT | /medialibrary/entries/{mediumId} | Important | ## Known Issues and Limitations -The Staffbase connector currently does not support all Staffbase API features. -For more detailed information on Staffbase APIs, visit the [Staffbase Developer Portal](http://rs.staffbase.com/#developer-portal). +* The Staffbase connector does not support all Staffbase API features. +* Search Settings API locale transformation is not supported. +* For more detailed information on Staffbase APIs, visit the [Staffbase Developer Portal](http://developers.staffbase.com). ## Frequently Asked Questions ### What business workflows can be automated using the Staffbase connector? -Many business processes can be automated using the Staffbase connector. For example, notify your employees directly in their employee app or intranet as and when actions take place in other tools. Learn more about such business use cases [here](https://support.staffbase.com/hc/en-us/articles/360017639140-Automate-Business-Workflows-With-Staffbase-and-Power-Automate). + +Many business processes can be automated using the Staffbase connector. For example, notify your employees directly in their employee app or intranet as and when actions take place in other tools. Learn more about such business use cases [here](https://support.staffbase.com/hc/en-us/articles/360017639140). ### Are there tutorials to help me get started with an automated workflow using the Staffbase connector? -Staffbase offers tutorials that use our Forms plugin and the Staffbase connector to automate your facility management. Learn all about how to set it up in this [section](https://support.staffbase.com/hc/en-us/sections/360004870179-Integration-Using-Forms-Plugin). +Staffbase offers tutorials that use our Forms plugin and the Staffbase connector to automate your facility management. Learn all about how to set it up in this [section](https://support.staffbase.com/hc/en-us/sections/360004870179). ## Deployment Instructions + Run the following commands and follow the prompts: ```paconn paconn create --api-def apiDefinition.swagger.json --api-prop apiProperties.json --secret diff --git a/certified-connectors/Staffbase/apiDefinition.swagger.json b/certified-connectors/Staffbase/apiDefinition.swagger.json index 08dad18a8e..decc152c5e 100644 --- a/certified-connectors/Staffbase/apiDefinition.swagger.json +++ b/certified-connectors/Staffbase/apiDefinition.swagger.json @@ -18,7 +18,7 @@ "consumes": [], "produces": [], "paths": { - "/channels": { + "/branch/analytics/chats/timeseries": { "get": { "responses": { "200": { @@ -26,81 +26,83 @@ "schema": { "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int32", - "description": "Total number of channels that are found." - }, - "limit": { - "type": "integer", - "format": "int32", - "description": "The amount of items that are returned." + "timeseries": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Time series data points." }, - "offset": { + "total": { "type": "integer", "format": "int32", - "description": "The current defined offset for getting the items starting at this number." - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This is the ID of the channel." - }, - "config": { - "type": "object", - "properties": { - "localization": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "The channel title which is localized." - }, - "locale": { - "type": "string", - "description": "This is the locale of channel title." - } - } - } - } - } - }, - "spaceID": { - "type": "string", - "description": "The ID of the space where the channel is assigned to." - }, - "created": { - "type": "string", - "description": "The created date of the channel." - }, - "published": { - "type": "string", - "description": "The published date of the channel." - }, - "updated": { - "type": "string", - "description": "The updated date of the channel." - } - } - } + "description": "Total chat count." } } } } }, - "summary": "Channels: Get a list of news channels", - "description": "Get a list of news channels.", - "operationId": "ChannelsGetList", - "parameters": [] + "operationId": "GetChatTimeseries", + "summary": "Analytics: Get chat activity timeseries", + "description": "Get chat activity metrics over time.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "groupBy", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "year", + "month", + "week", + "day", + "hour", + "fixed" + ], + "description": "Time grouping.", + "x-ms-summary": "Group By" + }, + { + "name": "since", + "in": "query", + "required": false, + "type": "string", + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" + }, + { + "name": "until", + "in": "query", + "required": false, + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": false, + "type": "string", + "description": "Timezone.", + "x-ms-summary": "Timezone" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "json", + "csv" + ], + "description": "Response format.", + "x-ms-summary": "Format" + } + ] } }, - "/channels/{channelID}/posts": { + "/branch/analytics/contents/rankings": { "get": { "responses": { "200": { @@ -108,136 +110,115 @@ "schema": { "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int32", - "description": "Total number of posts that are found." - }, - "limit": { - "type": "integer", - "format": "int32", - "description": "The amount of items that are returned." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The current defined offset for getting the items starting at this number." + "entities": { + "type": "object", + "description": "Map of entity IDs to entity objects." }, - "data": { + "ranking": { "type": "array", "items": { - "$ref": "#/definitions/postData" - } + "type": "object" + }, + "description": "Ranked list of content items." } } } } }, - "operationId": "ChannelsGetPosts", - "summary": "Channels: Get a list of posts within the specified channel", - "description": "Get a list of posts within the specified channel.", - "parameters": [{ - "name": "channelID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, + "operationId": "GetContentRankings", + "summary": "Analytics: Get content performance rankings", + "description": "Get a ranked list of content items by performance metrics.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "since", + "in": "query", + "required": false, "type": "string", - "description": "Insert channel ID here, e.g. retrieved by getChannels.", - "x-ms-summary": "ChannelID" + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" + }, + { + "name": "until", + "in": "query", + "required": false, + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": false, + "type": "string", + "description": "Timezone.", + "x-ms-summary": "Timezone" + }, + { + "name": "language", + "in": "query", + "required": false, + "type": "string", + "description": "Language filter.", + "x-ms-summary": "Language" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "json", + "csv" + ], + "description": "Response format.", + "x-ms-summary": "Format" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "SCIM filter string.", + "x-ms-summary": "Filter" }, { "name": "limit", "in": "query", "required": false, "type": "integer", - "description": "The amount of items that should be returned (default and maximum 100).", + "maximum": 50000, + "description": "Max results.", "x-ms-summary": "Limit" }, { - "name": "offset", + "name": "sort", "in": "query", "required": false, - "type": "integer", - "description": "Define an offset for getting the items starting at this number.", - "x-ms-summary": "Offset" - } - ], - "x-ms-visibility": "important" - }, - "post": { - "responses": { - "default": { - "description": "default", - "schema": {} - } - }, - "consumes": [ - "application/json" - ], - "summary": "Channels: Send a post to specific channel", - "description": "Send a post to specific news channel.", - "operationId": "ChannelsPostPost", - "x-ms-visibility": "important", - "parameters": [{ - "name": "channelID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, "type": "string", - "x-ms-summary": "ChannelID", - "description": "Insert channel ID here." + "description": "Sort field.", + "x-ms-summary": "Sort" }, { - "name": "body", - "in": "body", + "name": "groupBy", + "in": "query", "required": false, - "schema": { - "type": "object", - "properties": { - "externalID": { - "type": "string", - "description": "Optional: Enter an external ID here." - }, - "contents": { - "type": "array", - "items": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "Insert locale like, e.g. de_DE, en_US, etc." - }, - "content": { - "type": "string", - "description": "Enter news content here." - }, - "image": { - "type": "string", - "description": "Enter image link here.", - "title": "image (link)" - }, - "teaser": { - "type": "string", - "description": "Enter your teaser here." - }, - "title": { - "type": "string", - "description": "Enter your title here." - } - } - } - }, - "published": { - "type": "string", - "description": "Enter your date published here." - } - } - } + "type": "string", + "description": "Group results by field.", + "x-ms-summary": "Group By" + }, + { + "name": "enrich", + "in": "query", + "required": false, + "type": "boolean", + "description": "Enrich results with metadata.", + "x-ms-summary": "Enrich" } ] } }, - "/comments": { + "/branch/analytics/posts/rankings": { "get": { "responses": { "200": { @@ -245,128 +226,107 @@ "schema": { "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int32", - "description": "Total number of comments that are found." - }, - "limit": { - "type": "integer", - "format": "int32", - "description": "The amount of items that are returned." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The current defined offset for getting the items starting at this number." + "entities": { + "type": "object", + "description": "Map of entity IDs to entity objects." }, - "data": { + "ranking": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This is the ID of the comment." - }, - "parentID": { - "type": "string", - "description": "The ID of the parent of the comment, can be either a post or a comment." - }, - "parentType": { - "type": "string", - "description": "The parent type can be either a post or a comment." - }, - "text": { - "type": "string", - "description": "This is the comments content / test itself.", - "title": "comment text" - }, - "rootID": { - "type": "string", - "description": "This is the ID of the post this comment is related to", - "title": "post ID" - }, - "author": { - "$ref": "#/definitions/authorObject" - }, - "likes": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int32", - "description": "This is the number of comment likes." - }, - "isLiked": { - "type": "string", - "description": "Is this comment liked?", - "enum": [ - "", - "true", - "false" - ] - } - } - }, - "created": { - "type": "string", - "description": "The created date of the comment." - }, - "updated": { - "type": "string", - "description": "The updated date of the comment." - }, - "image": { - "$ref": "#/definitions/imageObject" - } - } - } + "type": "object" + }, + "description": "Ranked list of posts with analytics data." } } } } }, - "summary": "Posts: Get comments", - "description": "Get a list of comments.", - "operationId": "CommentsGet", - "parameters": [{ - "name": "manage", + "operationId": "GetPostRankings", + "summary": "Analytics: Get post performance rankings", + "description": "Get a ranked list of posts by performance metrics.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "since", "in": "query", "required": false, - "type": "boolean", - "description": "When true and the token role allows manage comments - also not published comments will be shown in the list.", - "x-ms-summary": "Manage" + "type": "string", + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" + }, + { + "name": "until", + "in": "query", + "required": false, + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": false, + "type": "string", + "description": "Timezone (e.g. Europe/Berlin).", + "x-ms-summary": "Timezone" + }, + { + "name": "language", + "in": "query", + "required": false, + "type": "string", + "description": "Language filter.", + "x-ms-summary": "Language" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "json", + "csv" + ], + "description": "Response format.", + "x-ms-summary": "Format" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "SCIM filter string.", + "x-ms-summary": "Filter" }, { "name": "limit", "in": "query", "required": false, "type": "integer", - "description": "The amount of items that should be returned (default and maximum 100).", + "maximum": 50000, + "description": "Max results (up to 50000).", "x-ms-summary": "Limit" }, { - "name": "offset", + "name": "sort", "in": "query", "required": false, - "type": "integer", - "description": "Define an offset for getting the items starting at this number.", - "x-ms-summary": "Offset" + "type": "string", + "description": "Sort field.", + "x-ms-summary": "Sort" }, { - "name": "filter", + "name": "groupBy", "in": "query", "required": false, "type": "string", - "description": "Filter in SCIM2 format with partial support. For now only flat structure (no nested clauses) and comparison clauses like eq = \"equals\", gt = \"greater than\", ge = \"greater than or equals\", lt = \"less than\", le = \"less than or equals\" are supported. For comments supported filter fields are: created and updated. The value for these fields can be provided in UTC DateTime string representatiion or long number of milliseconds of Unix epoch. Example 1: filter=updated ge \"2020-11-26T10:14:48.947Z\" and updated le \"2020-11-26T10:14:48.947Z\". In this example the DateTime range filter is applied to updated field with ge and le comparison clauses and and boolean clause. Example 2: filter=created gt \"2020-11-26T10:14:48.947Z\". Get all comments, created after pointed date.", - "x-ms-summary": "Filter" + "description": "Group results by field.", + "x-ms-summary": "Group By" } - ], - "x-ms-visibility": "important" + ] } }, - "/media": { + "/branch/analytics/posts/timeseries": { "get": { "responses": { "200": { @@ -374,219 +334,233 @@ "schema": { "type": "object", "properties": { - "total": { - "type": "integer", - "format": "int32", - "description": "Total number of assets that are found." - }, - "limit": { - "type": "integer", - "format": "int32", - "description": "The amount of items that are returned." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The current defined offset for getting the items starting at this number." - }, - "data": { + "timeseries": { "type": "array", "items": { - "$ref": "#/definitions/mediaData" - } + "type": "object" + }, + "description": "Time series data points." } } } } }, - "summary": "Media: Get all media", - "description": "Requests description of all media available in the current context.", - "operationId": "MediaGet", - "x-ms-visibility": "important", - "parameters": [{ - "name": "limit", + "operationId": "GetPostTimeseries", + "summary": "Analytics: Get post performance timeseries", + "description": "Get post performance metrics over time.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "groupBy", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "year", + "month", + "week", + "day", + "hour", + "fixed" + ], + "description": "Time grouping.", + "x-ms-summary": "Group By" + }, + { + "name": "since", "in": "query", "required": false, - "type": "integer", - "default": 100, - "description": "Limit the number of items here.", - "x-ms-visibility": "important", - "format": "int32", - "x-ms-summary": "Limit" + "type": "string", + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" }, { - "name": "offset", + "name": "until", "in": "query", "required": false, - "type": "integer", - "default": 0, - "description": "Set an offset for the query.", - "x-ms-visibility": "important", - "format": "int32", - "x-ms-summary": "Offset" + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": false, + "type": "string", + "description": "Timezone.", + "x-ms-summary": "Timezone" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "json", + "csv" + ], + "description": "Response format.", + "x-ms-summary": "Format" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "SCIM filter string.", + "x-ms-summary": "Filter" } ] } }, - "/media/{mediumID}": { + "/branch/analytics/v2/users/timeseries": { "get": { - "responses": { - "200": { - "description": "default", - "schema": { - "$ref": "#/definitions/mediaData" - } - } - }, - "summary": "Media: Get media by ID", - "operationId": "MediaGetByID", - "description": "Get metadata for single media by its ID.", - "x-ms-visibility": "important", - "parameters": [{ - "name": "mediumID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "Requests information on a specific medium.", - "x-ms-summary": "MediumID" - }] - }, - "delete": { - "responses": { - "default": { - "description": "default", - "schema": {} - } - }, - "operationId": "MediaDelete", - "summary": "Media: Delete media", - "description": "Deletes the specified media in the current context.", - "parameters": [{ - "name": "mediumID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "x-ms-summary": "MediumID", - "description": "Deletes the medium by its ID. While this will immediately remove the resource from our servers, the CDN may still deliver the content via the URL stated in resourceInfo.url until CDN invalidation." - }], - "x-ms-visibility": "advanced" - } - }, - "/notifications": { - "post": { "responses": { "200": { "description": "default", "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "This is the ID of the notification." - }, - "recipients": { - "type": "object", - "properties": { - "accessorIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "This is the list of recipients IDs." - } - } - }, - "content": { + "timeseries": { "type": "array", "items": { "type": "object", "properties": { - "title": { + "period": { "type": "string", - "description": "The title of the notification which is localized." + "description": "Time period label." }, - "locale": { - "type": "string", - "description": "This is the locale of the title." + "totalUsers": { + "type": "integer", + "format": "int32" + }, + "registeredUsers": { + "type": "integer", + "format": "int32" + }, + "activeUsers": { + "type": "integer", + "format": "int32" + }, + "engagedUsers": { + "type": "integer", + "format": "int32" } } - } - }, - "link": { - "type": "string", - "description": "This is the notification link." - }, - "type": { - "type": "string", - "description": "This is the notification type." - }, - "createdAt": { - "type": "string", - "description": "The created date of the notification." + }, + "description": "User engagement metrics per period." }, - "created": { - "type": "string", - "description": "The created date of the notification." + "total": { + "type": "integer", + "format": "int32", + "description": "Total user count." } } } } }, - "consumes": [ - "application/json" - ], - "operationId": "NotificationPost", - "x-ms-visibility": "important", - "summary": "Notification: Sends notification", - "description": "Sends notifications to specified user(s).", - "parameters": [{ - "name": "body", - "in": "body", - "required": false, - "schema": { - "type": "object", - "properties": { - "recipients": { - "type": "object", - "properties": { - "accessorIds": { - "type": "array", - "items": { - "type": "string", - "description": "This is the list of recipients IDs." - } - } - } - }, - "content": { - "type": "array", - "items": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "Insert locale like, e.g. de_DE, en_US, etc." - }, - "title": { - "type": "string", - "description": "Insert language dependent title." - } - } - } - }, - "link": { - "type": "string", - "description": "Optinal: Insert link here." - } - } - } - }] - } - }, - "/posts": { - "get": { + "operationId": "GetUserTimeseries", + "summary": "Analytics: Get user engagement timeseries", + "description": "Get user engagement metrics over time.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "groupBy", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "year", + "month", + "week", + "day", + "hour" + ], + "description": "Time grouping.", + "x-ms-summary": "Group By" + }, + { + "name": "since", + "in": "query", + "required": true, + "type": "string", + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" + }, + { + "name": "until", + "in": "query", + "required": true, + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": false, + "type": "string", + "description": "Timezone.", + "x-ms-summary": "Timezone" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "json", + "csv" + ], + "description": "Response format.", + "x-ms-summary": "Format" + }, + { + "name": "platform", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "web", + "ios", + "android" + ], + "description": "Filter by platform.", + "x-ms-summary": "Platform" + }, + { + "name": "creationType", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "sso", + "csv" + ], + "description": "Filter by user creation type.", + "x-ms-summary": "Creation Type" + }, + { + "name": "groupId", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by group ID.", + "x-ms-summary": "Group ID" + }, + { + "name": "spaceId", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by space ID.", + "x-ms-summary": "Space ID" + } + ] + } + }, + "/branch/channels": { + "get": { "responses": { "200": { "description": "default", @@ -596,7 +570,7 @@ "total": { "type": "integer", "format": "int32", - "description": "Total number of posts that are found." + "description": "Total number of channels that are found." }, "limit": { "type": "integer", @@ -611,22 +585,67 @@ "data": { "type": "array", "items": { - "$ref": "#/definitions/postData" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the channel." + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The channel title which is localized." + }, + "locale": { + "type": "string", + "description": "This is the locale of channel title." + } + } + } + } + } + }, + "spaceID": { + "type": "string", + "description": "The ID of the space where the channel is assigned to." + }, + "created": { + "type": "string", + "description": "The created date of the channel." + }, + "published": { + "type": "string", + "description": "The published date of the channel." + }, + "updated": { + "type": "string", + "description": "The updated date of the channel." + } + } } } } } } }, - "operationId": "PostsGetAll", - "summary": "Posts: Get a list of posts", - "description": "Get a list of posts that are accessible for the API token.", - "parameters": [{ + "summary": "Channels: Get list of manageable channels (admin)", + "description": "Returns channels the token has management rights over. Requires editorial or admin token.", + "operationId": "BranchChannelsGetList", + "x-ms-visibility": "important", + "parameters": [ + { "name": "query", "in": "query", "required": false, "type": "string", - "description": "A string that can be used for searching the post content.", + "description": "Search string to filter channels.", "x-ms-summary": "Query" }, { @@ -634,173 +653,122 @@ "in": "query", "required": false, "type": "integer", - "description": "The amount of items that should be returned (default and maximum 100).", + "maximum": 100, + "description": "The amount of items that should be returned (maximum 100).", "x-ms-summary": "Limit" }, { - "name": "offset", + "name": "cursor", "in": "query", "required": false, - "type": "integer", - "description": "Define an offset for getting the items starting at this number.", - "x-ms-summary": "Offset" + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" }, { - "name": "manageable", + "name": "sort", "in": "query", "required": false, - "type": "boolean", - "default": false, - "description": "Optional filter for the given post content types. Defaults to not filtering.", - "x-ms-summary": "Manageable" + "type": "string", + "enum": [ + "created_DESC", + "published_DESC", + "updated_DESC", + "priority_ASC" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" }, { "name": "contentType", "in": "query", "required": false, "type": "string", - "uniqueItems": true, - "enum": ["articles", "pictures", "updates"], - "description": "Optional filter for the given post content types. (Defaults to not filtering)", + "enum": [ + "articles", + "pictures", + "updates" + ], + "description": "Filter by content type.", "x-ms-summary": "ContentType" } - ], - "x-ms-visibility": "important" + ] } }, - "/posts/{pageID}": { - "get": { - "responses": { - "200": { - "description": "default", - "schema": { - "$ref": "#/definitions/postData" - } - } - }, - "summary": "Posts: Get a post by ID", - "description": "Requests the specified posts including a set of comments.", - "operationId": "PostsGetByID", - "x-ms-visibility": "important", - "parameters": [{ - "name": "pageID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "This is the ID of the post.", - "x-ms-visibility": "important", - "x-ms-summary": "PageID" - }] - }, - "delete": { + "/branch/notifications": { + "post": { "responses": { - "204": { - "description": "default", + "201": { + "description": "Notification created.", "schema": { "type": "object", "properties": { - "identifier": { - "type": "integer", - "format": "int32", - "description": "The Identifier of deletion." - }, - "statusCode": { - "type": "integer", - "format": "int32", - "description": "The status code of the action." - }, - "message": { - "type": "string", - "description": "The message of the action." - }, - "type": { + "notificationId": { "type": "string", - "description": "The type of the action." + "description": "The ID of the created notification." } } } } }, - "operationId": "PostsDelete", - "parameters": [{ - "name": "pageID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "This could be either the post ID defined by the API or if set the post externalID.", - "x-ms-summary": "PageID" - }], - "description": "Removes a post from the system.", - "summary": "Posts: Removes a post", - "x-ms-visibility": "advanced" - }, - "put": { - "responses": { - "default": { - "description": "default", - "schema": {} - } - }, "consumes": [ "application/json" ], - "operationId": "PostsPut", - "description": "Updates a post, only changed field (incremental).", - "summary": "Posts: Updates a post", + "operationId": "SendNotification", "x-ms-visibility": "important", - "parameters": [{ - "name": "pageID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "This could be either the post ID defined by the API or if set the post externalID.", - "x-ms-summary": "PageID" - }, + "summary": "Notifications: Send notification to users or groups", + "description": "Send a notification to specific users, groups, or a branch.", + "parameters": [ { "name": "body", "in": "body", - "required": false, + "required": true, "schema": { "type": "object", + "required": [ + "accessorIds", + "content" + ], "properties": { - "externalID": { - "type": "string", - "description": "Optional: Enter an external ID here." + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs, group IDs, or branch ID to send the notification to.", + "x-ms-summary": "Accessor IDs" }, - "contents": { + "content": { "type": "array", "items": { "type": "object", "properties": { "locale": { "type": "string", - "description": "Insert locale like, e.g. de_DE, en_US, etc." - }, - "content": { - "type": "string", - "description": "Enter news content here." - }, - "image": { - "type": "string", - "description": "Enter link to image here." - }, - "teaser": { - "type": "string", - "description": "Enter your teaser here." - }, - "title": { - "type": "string", - "description": "Enter your title here." + "description": "Locale of the notification text, e.g. en_US, de_DE." }, - "published": { + "text": { "type": "string", - "description": "Enter your date published here." + "description": "The notification text for this locale." } } - } + }, + "description": "Localized notification content. The proxy converts this array to a locale-keyed object." + }, + "channels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "notificationCenter", + "push" + ] + }, + "description": "Optional: Specify which notification channels to use." + }, + "link": { + "type": "string", + "description": "Optional: Absolute or relative URL to include in the notification." } } } @@ -808,652 +776,6757 @@ ] } }, - "/users": { + "/branch/quicklinks": { "get": { "responses": { "200": { "description": "default", - "schema": {} + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/quickLinkData" + } + } + } + } } }, - "summary": "User: Get list of users", - "description": "Get a list of users, depending on the API access token.", - "operationId": "UserGetAll", + "operationId": "GetQuickLinks", + "summary": "Quick Links: Get all Quick Links", + "description": "Get all Quick Links for a platform.", "x-ms-visibility": "important", - "parameters": [{ - "name": "filter", - "in": "query", - "required": false, - "type": "string", - "description": "SCIM notation can be used to filter.", - "x-ms-summary": "SCIM notation can be used to filter", - "x-ms-visibility": "important" - }, + "parameters": [ { - "name": "query", + "name": "platform", "in": "query", - "required": false, + "required": true, "type": "string", - "description": "Here you can serach in any profile field.", - "x-ms-summary": "The fulltext search can be combined with the filter", - "x-ms-visibility": "important" + "enum": [ + "desktop", + "mobile" + ], + "description": "Platform to get Quick Links for.", + "x-ms-summary": "Platform" } ] }, "post": { "responses": { - "default": { + "200": { "description": "default", - "schema": {}, - "headers": { - "HTTP/1.1": { - "description": "HTTP/1.1", - "type": "string" - }, - "Location:": { - "description": "Location:", - "type": "string" - } + "schema": { + "$ref": "#/definitions/quickLinkData" } } }, "consumes": [ "application/json" ], - "operationId": "UserPost", - "summary": "User: Invite user", - "description": "The user will receive an email to signup.", + "operationId": "CreateQuickLink", + "summary": "Quick Links: Create a Quick Link", + "description": "Create a new Quick Link. Proxy converts localization array to locale-keyed object automatically.", "x-ms-visibility": "important", - "parameters": [{ - "name": "body", - "in": "body", - "required": false, - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "This is the email address of the user." - }, - "firstName": { - "type": "string", - "description": "This is the firstname of the user." - }, - "lastName": { - "type": "string", - "description": "This is the lastname of the user." + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "platform": { + "type": "string", + "enum": [ + "desktop", + "mobile" + ], + "description": "Platform for this Quick Link." + }, + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "description": "Localized names." + }, + "link": { + "type": "string", + "description": "URL target for the Quick Link." + }, + "priority": { + "type": "integer", + "description": "Display priority order." + }, + "enforceNewWindow": { + "type": "boolean", + "description": "Open link in a new window." + }, + "showIosNavBar": { + "type": "boolean", + "description": "Show iOS navigation bar." + }, + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "IDs of users or groups who can see this link." + }, + "visibleInPublicArea": { + "type": "boolean", + "description": "Visible in public area." + } } } } - }] + ] } }, - "/users/{userID}": { + "/branch/quicklinks/{quickLinkId}": { "get": { "responses": { "200": { "description": "default", "schema": { - "$ref": "#/definitions/userData" + "$ref": "#/definitions/quickLinkData" } } }, - "summary": "User: Get user information", - "operationId": "UserGetByID", - "description": "Get specific user information by its user id.", - "parameters": [{ - "name": "userID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "x-ms-summary": "UserID", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user." - }], - "x-ms-visibility": "important" - }, - "delete": { - "responses": { - "default": { - "description": "default", - "schema": {} - } - }, - "summary": "User: Delete User", - "operationId": "UserDelete", + "operationId": "GetQuickLink", + "summary": "Quick Links: Get a Quick Link by ID", + "description": "Get a specific Quick Link by its ID.", "x-ms-visibility": "important", - "parameters": [{ - "name": "userID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", - "x-ms-summary": "UserID" - }], - "description": "Deletes the specified user." + "parameters": [ + { + "name": "quickLinkId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the Quick Link.", + "x-ms-summary": "QuickLinkID" + } + ] }, - "put": { + "post": { "responses": { "200": { "description": "default", "schema": { - "$ref": "#/definitions/userData" + "$ref": "#/definitions/quickLinkData" } } }, "consumes": [ "application/json" ], - "operationId": "UserPut", - "summary": "User: Update user information", + "operationId": "UpdateQuickLink", + "summary": "Quick Links: Update a Quick Link", + "description": "Update an existing Quick Link. Proxy converts localization array to locale-keyed object automatically.", "x-ms-visibility": "important", - "description": "Update user information.", - "parameters": [{ - "name": "userID", + "parameters": [ + { + "name": "quickLinkId", "in": "path", "x-ms-url-encoding": "single", "required": true, "type": "string", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", - "x-ms-summary": "UserID" + "description": "The ID of the Quick Link.", + "x-ms-summary": "QuickLinkID" }, { "name": "body", "in": "body", "required": false, "schema": { - "$ref": "#/definitions/userData" + "type": "object", + "properties": { + "platform": { + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + }, + "link": { + "type": "string" + }, + "priority": { + "type": "integer" + }, + "enforceNewWindow": { + "type": "boolean" + }, + "showIosNavBar": { + "type": "boolean" + }, + "accessorIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "visibleInPublicArea": { + "type": "boolean" + } + } } } ] + }, + "delete": { + "responses": { + "202": { + "description": "Quick Link deleted.", + "schema": {} + } + }, + "operationId": "DeleteQuickLink", + "summary": "Quick Links: Delete a Quick Link", + "description": "Delete a specific Quick Link by its ID.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "quickLinkId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the Quick Link.", + "x-ms-summary": "QuickLinkID" + } + ] } }, - "/users/{userID}/recovery": { - "post": { + "/campaigns": { + "get": { "responses": { - "default": { + "200": { "description": "default", - "schema": {} + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/campaignData" + } + } + } + } } }, - "summary": "User: Send a recovery email", - "description": "Sends a recovery email to the specified user.", - "operationId": "UserPostRecovery", + "operationId": "ListCampaigns", + "summary": "Campaigns: Get list of campaigns", + "description": "Get a list of campaigns.", "x-ms-visibility": "important", - "parameters": [{ - "name": "userID", - "in": "path", - "x-ms-url-encoding": "single", - "required": true, - "type": "string", - "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", - "x-ms-summary": "UserID" - }] + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "created_ASC", + "created_DESC", + "title_ASC", + "title_DESC", + "startAt_ASC" + ], + "description": "Sort order.", + "x-ms-summary": "Sort" + }, + { + "name": "range", + "in": "query", + "required": false, + "type": "string", + "description": "SCIM2 filter string for date range.", + "x-ms-summary": "Range" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + }, + { + "name": "includeStats", + "in": "query", + "required": false, + "type": "boolean", + "description": "Whether to include campaign statistics.", + "x-ms-summary": "Include Stats" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "Campaign created.", + "schema": { + "$ref": "#/definitions/campaignData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "CreateCampaign", + "summary": "Campaigns: Create a campaign", + "description": "Create a new campaign.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "The campaign title." + }, + "goal": { + "type": "string", + "description": "The campaign goal." + }, + "color": { + "type": "string", + "description": "Campaign color code." + }, + "startAt": { + "type": "string", + "description": "Campaign start date (ISO 8601)." + }, + "endAt": { + "type": "string", + "description": "Campaign end date (ISO 8601)." + } + } + } + } + ] } }, - "/version": { + "/campaigns/{campaignId}": { "get": { "responses": { - "default": { + "200": { "description": "default", - "schema": {} + "schema": { + "$ref": "#/definitions/campaignData" + } } }, - "operationId": "ProxyVersionGet", - "summary": "Proxy: Get version", - "description": "Returns the current proxy version.", - "parameters": [] - } - } - }, - "definitions": { - "mediaData": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This is the ID of the asset." - }, - "ownerID": { - "type": "string", - "description": "This is the ID of the owner of this asset." - }, - "parentID": { - "type": "string", - "description": "This is the ID of the parent media asset." + "operationId": "GetCampaign", + "summary": "Campaigns: Get a campaign by ID", + "description": "Get a specific campaign by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "campaignId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the campaign.", + "x-ms-summary": "CampaignID" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/campaignData" + } + } }, - "publicID": { - "type": "string", + "consumes": [ + "application/json" + ], + "operationId": "UpdateCampaign", + "summary": "Campaigns: Update a campaign", + "description": "Update an existing campaign.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "campaignId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the campaign.", + "x-ms-summary": "CampaignID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "goal": { + "type": "string" + }, + "color": { + "type": "string" + }, + "startAt": { + "type": "string" + }, + "endAt": { + "type": "string" + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Campaign deleted.", + "schema": {} + } + }, + "operationId": "DeleteCampaign", + "summary": "Campaigns: Delete a campaign", + "description": "Delete a specific campaign by its ID.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "campaignId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the campaign.", + "x-ms-summary": "CampaignID" + } + ] + } + }, + "/campaigns/{campaignId}/references": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/referenceData" + } + } + } + } + } + }, + "operationId": "ListCampaignReferences", + "summary": "Campaigns: List references of a campaign", + "description": "Get references (posts or emails) linked to a campaign.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "campaignId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the campaign.", + "x-ms-summary": "CampaignID" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "description": "Sort order.", + "x-ms-summary": "Sort" + }, + { + "name": "includeStats", + "in": "query", + "required": false, + "type": "boolean", + "description": "Whether to include statistics.", + "x-ms-summary": "Include Stats" + }, + { + "name": "sourceTypes", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by source type (POST or EMAIL, comma-separated).", + "x-ms-summary": "Source Types" + } + ] + }, + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/referenceData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "CreateCampaignReference", + "summary": "Campaigns: Add a reference to a campaign", + "description": "Link a post or email to a campaign.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "campaignId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the campaign.", + "x-ms-summary": "CampaignID" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "sourceType", + "sourceId" + ], + "properties": { + "sourceType": { + "type": "string", + "enum": [ + "POST", + "EMAIL" + ], + "description": "The type of the reference source." + }, + "sourceId": { + "type": "string", + "description": "The ID of the source post or email." + } + } + } + } + ] + } + }, + "/campaigns/{campaignId}/references/{sourceType}/{sourceId}": { + "delete": { + "responses": { + "204": { + "description": "Reference deleted.", + "schema": {} + } + }, + "operationId": "DeleteCampaignReference", + "summary": "Campaigns: Delete a campaign reference", + "description": "Remove a reference from a campaign.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "campaignId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the campaign.", + "x-ms-summary": "CampaignID" + }, + { + "name": "sourceType", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "enum": [ + "POST", + "EMAIL" + ], + "description": "The type of the reference source.", + "x-ms-summary": "Source Type" + }, + { + "name": "sourceId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the source.", + "x-ms-summary": "Source ID" + } + ] + } + }, + "/channels": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of channels that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the channel." + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The channel title which is localized." + }, + "locale": { + "type": "string", + "description": "This is the locale of channel title." + } + } + } + } + } + }, + "spaceID": { + "type": "string", + "description": "The ID of the space where the channel is assigned to." + }, + "created": { + "type": "string", + "description": "The created date of the channel." + }, + "published": { + "type": "string", + "description": "The published date of the channel." + }, + "updated": { + "type": "string", + "description": "The updated date of the channel." + } + } + } + } + } + } + } + }, + "summary": "Channels: Get a list of news channels", + "description": "Get a list of news channels.", + "operationId": "ChannelsGetList", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search string to filter channels.", + "x-ms-summary": "Query" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "created_DESC", + "published_DESC", + "updated_DESC", + "priority_ASC" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" + }, + { + "name": "contentType", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "articles", + "pictures", + "updates" + ], + "description": "Filter by content type.", + "x-ms-summary": "ContentType" + } + ] + } + }, + "/channels/{channelID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the channel." + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The channel title which is localized." + }, + "locale": { + "type": "string", + "description": "This is the locale of channel title." + } + } + } + } + } + }, + "spaceID": { + "type": "string", + "description": "The ID of the space where the channel is assigned to." + }, + "created": { + "type": "string", + "description": "The created date of the channel." + }, + "published": { + "type": "string", + "description": "The published date of the channel." + }, + "updated": { + "type": "string", + "description": "The updated date of the channel." + } + } + } + } + }, + "summary": "Channels: Get a channel by ID", + "description": "Get a specific news channel by its ID.", + "operationId": "ChannelsGetByID", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the channel to retrieve.", + "x-ms-summary": "ChannelID" + } + ] + } + }, + "/channels/{channelID}/posts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of posts that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/postData" + } + } + } + } + } + }, + "operationId": "ChannelsGetPosts", + "summary": "Channels: Get a list of posts within the specified channel", + "description": "Get a list of posts within the specified channel.", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Insert channel ID here, e.g. retrieved by getChannels.", + "x-ms-summary": "ChannelID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100).", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "created_DESC", + "published_DESC", + "updated_DESC" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ], + "x-ms-visibility": "important" + }, + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "summary": "Channels: Send a post to specific channel", + "description": "Send a post to specific news channel.", + "operationId": "ChannelsPostPost", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "channelID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "ChannelID", + "description": "Insert channel ID here." + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "externalID": { + "type": "string", + "description": "Optional: Enter an external ID here." + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc." + }, + "content": { + "type": "string", + "description": "Enter news content here." + }, + "image": { + "type": "string", + "description": "Enter image link here.", + "title": "image (link)" + }, + "teaser": { + "type": "string", + "description": "Enter your teaser here." + }, + "title": { + "type": "string", + "description": "Enter your title here." + } + } + } + }, + "published": { + "type": "string", + "description": "Enter your date published here." + }, + "notificationChannels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "email", + "push" + ] + }, + "description": "Which notification channels to use when publishing this post." + }, + "planned": { + "type": "string", + "description": "ISO 8601 date string for planned publication." + }, + "campaignId": { + "type": "string", + "description": "Optional campaign ID to associate with this post." + } + } + } + } + ] + } + }, + "/comments": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of comments that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the comment." + }, + "parentID": { + "type": "string", + "description": "The ID of the parent of the comment, can be either a post or a comment." + }, + "parentType": { + "type": "string", + "description": "The parent type can be either a post or a comment." + }, + "text": { + "type": "string", + "description": "This is the comments content / test itself.", + "title": "comment text" + }, + "rootID": { + "type": "string", + "description": "This is the ID of the post this comment is related to", + "title": "post ID" + }, + "author": { + "$ref": "#/definitions/authorObject" + }, + "likes": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "This is the number of comment likes." + }, + "isLiked": { + "type": "string", + "description": "Is this comment liked?", + "enum": [ + "", + "true", + "false" + ] + } + } + }, + "created": { + "type": "string", + "description": "The created date of the comment." + }, + "updated": { + "type": "string", + "description": "The updated date of the comment." + }, + "image": { + "$ref": "#/definitions/imageObject" + }, + "installationID": { + "type": "string", + "description": "The installation ID associated with this comment." + }, + "authorID": { + "type": "string", + "description": "The ID of the author of this comment." + }, + "published": { + "type": "boolean", + "description": "Whether this comment is published." + }, + "rights": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Rights associated with this comment." + } + } + } + } + } + } + } + }, + "summary": "Posts: Get comments", + "description": "Get a list of comments.", + "operationId": "CommentsGet", + "parameters": [ + { + "name": "manage", + "in": "query", + "required": false, + "type": "boolean", + "description": "When true and the token role allows manage comments - also not published comments will be shown in the list.", + "x-ms-summary": "Manage" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100).", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "Filter in SCIM2 format with partial support. For now only flat structure (no nested clauses) and comparison clauses like eq = \"equals\", gt = \"greater than\", ge = \"greater than or equals\", lt = \"less than\", le = \"less than or equals\" are supported. For comments supported filter fields are: created and updated. The value for these fields can be provided in UTC DateTime string representatiion or long number of milliseconds of Unix epoch. Example 1: filter=updated ge \"2020-11-26T10:14:48.947Z\" and updated le \"2020-11-26T10:14:48.947Z\". In this example the DateTime range filter is applied to updated field with ge and le comparison clauses and and boolean clause. Example 2: filter=created gt \"2020-11-26T10:14:48.947Z\". Get all comments, created after pointed date.", + "x-ms-summary": "Filter" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "updated_DESC", + "updated_ASC", + "created_ASC", + "created_DESC" + ], + "description": "Sort order for the comments.", + "x-ms-summary": "Sort" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "rich", + "plain" + ], + "description": "Format of the comment text.", + "x-ms-summary": "Format" + } + ], + "x-ms-visibility": "important" + } + }, + "/email-performance/emails": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "Cursor for pagination." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/emailMetadata" + }, + "description": "List of emails." + } + } + } + } + }, + "operationId": "ListEmails", + "summary": "Email Performance: List emails", + "description": "List all tracked email campaigns.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ] + } + }, + "/email-performance/emails/{emailId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/emailMetadata" + } + } + }, + "operationId": "GetEmailMetadata", + "summary": "Email Performance: Get email metadata", + "description": "Get metadata and performance summary for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + } + ] + } + }, + "/email-performance/{emailId}/clicks": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "percentage": { + "type": "number", + "format": "float", + "description": "Click rate as a percentage." + }, + "totalClicks": { + "type": "integer", + "format": "int32", + "description": "Total number of clicks." + }, + "uniqueClicks": { + "type": "integer", + "format": "int32", + "description": "Unique click count." + } + } + } + } + }, + "operationId": "GetEmailClickRate", + "summary": "Email Performance: Get click rate", + "description": "Get click rate metrics for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + }, + { + "name": "groupId", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by group ID.", + "x-ms-summary": "Group ID" + } + ] + } + }, + "/email-performance/{emailId}/engagement-trend": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "clicks": { + "type": "integer", + "format": "int32", + "description": "Total clicks." + }, + "opens": { + "type": "integer", + "format": "int32", + "description": "Total opens." + }, + "totalRecipients": { + "type": "integer", + "format": "int32", + "description": "Total recipients." + } + } + } + } + }, + "operationId": "GetEmailEngagementTrend", + "summary": "Email Performance: Get engagement trend", + "description": "Get engagement trend (clicks, opens, recipients) for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + } + ] + } + }, + "/email-performance/{emailId}/opens": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "percentage": { + "type": "number", + "format": "float", + "description": "Open rate as a percentage." + }, + "totalOpens": { + "type": "integer", + "format": "int32", + "description": "Total number of opens." + }, + "uniqueOpens": { + "type": "integer", + "format": "int32", + "description": "Unique open count." + } + } + } + } + }, + "operationId": "GetEmailOpenRate", + "summary": "Email Performance: Get open rate", + "description": "Get open rate metrics for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + } + ] + } + }, + "/email-performance/{emailId}/recipient-count": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "Total recipient count." + } + } + } + } + }, + "operationId": "GetEmailRecipientCount", + "summary": "Email Performance: Get recipient count", + "description": "Get the total recipient count for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + } + ] + } + }, + "/email-performance/{emailId}/top-clicked-links": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The clicked URL." + }, + "uniqueClicks": { + "type": "integer", + "format": "int32", + "description": "Unique click count for this URL." + } + } + } + } + } + }, + "operationId": "GetTopClickedLinks", + "summary": "Email Performance: Get top clicked links", + "description": "Get the most clicked links in a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + } + ] + } + }, + "/email-performance/{emailId}/total-activity-over-time": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "timeseries": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Activity over time data points." + } + } + } + } + }, + "operationId": "GetEmailTotalActivityOverTime", + "summary": "Email Performance: Get total activity over time", + "description": "Get total clicks and opens over time for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + }, + { + "name": "groupBy", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "HOUR", + "DAY", + "WEEK" + ], + "description": "Time grouping.", + "x-ms-summary": "Group By" + }, + { + "name": "since", + "in": "query", + "required": true, + "type": "string", + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" + }, + { + "name": "until", + "in": "query", + "required": true, + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": true, + "type": "string", + "description": "Timezone.", + "x-ms-summary": "Timezone" + }, + { + "name": "groupId", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by group ID.", + "x-ms-summary": "Group ID" + } + ] + } + }, + "/email-performance/{emailId}/unique-activity-over-time": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "timeseries": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Unique activity over time data points." + } + } + } + } + }, + "operationId": "GetEmailUniqueActivityOverTime", + "summary": "Email Performance: Get unique activity over time", + "description": "Get unique clicks and opens over time for a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + }, + { + "name": "groupBy", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "HOUR", + "DAY", + "WEEK" + ], + "description": "Time grouping.", + "x-ms-summary": "Group By" + }, + { + "name": "since", + "in": "query", + "required": true, + "type": "string", + "description": "Start date (ISO 8601).", + "x-ms-summary": "Since" + }, + { + "name": "until", + "in": "query", + "required": true, + "type": "string", + "description": "End date (ISO 8601).", + "x-ms-summary": "Until" + }, + { + "name": "timezone", + "in": "query", + "required": true, + "type": "string", + "description": "Timezone.", + "x-ms-summary": "Timezone" + }, + { + "name": "groupId", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by group ID.", + "x-ms-summary": "Group ID" + } + ] + } + }, + "/email-performance/{emailId}/user-groups": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Audience group data." + } + } + } + } + }, + "operationId": "GetEmailUserGroups", + "summary": "Email Performance: Get audience groups", + "description": "Get user groups in the audience of a specific email.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "emailId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the email.", + "x-ms-summary": "EmailID" + } + ] + } + }, + "/groups": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of groups." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Items returned." + }, + "cursor": { + "type": "string", + "description": "Cursor for pagination." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/groupData" + } + } + } + } + } + }, + "operationId": "GetGroups", + "produces": [ + "application/vnd.staffbase.accessors.groups.v2+json" + ], + "summary": "Groups: Get list of groups", + "description": "Get a list of groups.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 500, + "description": "Items to return (max 500).", + "x-ms-summary": "Limit" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "Group created.", + "schema": { + "$ref": "#/definitions/groupData" + } + } + }, + "consumes": [ + "application/vnd.staffbase.accessors.group-create.v2+json" + ], + "operationId": "CreateGroup", + "summary": "Groups: Create a group", + "description": "Create a new group. Proxy converts localization array to locale-keyed object automatically.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Locale." + }, + "name": { + "type": "string", + "description": "Group name." + }, + "description": { + "type": "string", + "description": "Group description." + } + } + } + } + } + }, + "externalId": { + "type": "string", + "description": "External identifier." + }, + "accessorIds": { + "type": "object", + "properties": { + "branchAccess": { + "type": "boolean", + "description": "Whether all branch members have access." + } + } + }, + "adminIds": { + "type": "object", + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "groupIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + ] + } + }, + "/groups/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/groupData" + } + } + } + } + } + }, + "operationId": "SearchGroups", + "produces": [ + "application/vnd.staffbase.accessors.groups-search.v1+json" + ], + "summary": "Groups: Search groups", + "description": "Search for groups by query or filter.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "description": "Sort order.", + "x-ms-summary": "Sort" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + }, + { + "name": "type", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "conditional", + "internal", + "open" + ], + "description": "Filter by group type.", + "x-ms-summary": "Type" + }, + { + "name": "permission", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "manage", + "access" + ], + "description": "Filter by permission.", + "x-ms-summary": "Permission" + } + ] + } + }, + "/groups/{groupId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/groupData" + } + } + }, + "operationId": "GetGroup", + "produces": [ + "application/vnd.staffbase.accessors.group.v3+json" + ], + "summary": "Groups: Get a group by ID", + "description": "Get a specific group by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "groupId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the group.", + "x-ms-summary": "GroupID" + } + ] + }, + "patch": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/groupData" + } + } + }, + "consumes": [ + "application/vnd.staffbase.accessors.group-update.v1+json" + ], + "operationId": "PatchGroup", + "summary": "Groups: Partially update a group", + "description": "Partially update a group.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "groupId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the group.", + "x-ms-summary": "GroupID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + }, + "externalId": { + "type": "string" + }, + "accessorIds": { + "type": "object", + "properties": { + "branchAccess": { + "type": "boolean" + } + } + }, + "adminIds": { + "type": "object", + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "groupIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Group deleted.", + "schema": {} + } + }, + "operationId": "DeleteGroup", + "summary": "Groups: Delete a group", + "description": "Delete a specific group by its ID.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "groupId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the group.", + "x-ms-summary": "GroupID" + } + ] + } + }, + "/groups/{groupId}/members": { + "patch": { + "responses": { + "204": { + "description": "Members updated.", + "schema": {} + } + }, + "operationId": "PatchGroupMembers", + "summary": "Groups: Add or remove group members", + "description": "Add or remove members from a group. The Content-Type header determines the operation: add members uses application/vnd.staffbase.accessors.group.members-add.v1+json, remove members uses application/vnd.staffbase.accessors.group.members-remove.v1+json.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "Content-Type", + "in": "header", + "required": true, + "type": "string", + "enum": [ + "application/vnd.staffbase.accessors.group.members-add.v1+json", + "application/vnd.staffbase.accessors.group.members-remove.v1+json" + ], + "default": "application/vnd.staffbase.accessors.group.members-add.v1+json", + "description": "Use the add type to add members, or the remove type to remove members.", + "x-ms-summary": "Operation" + }, + { + "name": "groupId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the group.", + "x-ms-summary": "GroupID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of user IDs or email addresses to add or remove." + } + } + } + } + ] + } + }, + "/groups/{groupId}/members/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/userData" + } + } + } + } + } + }, + "operationId": "SearchGroupMembers", + "produces": [ + "application/vnd.staffbase.accessors.group.members-search.v1+json" + ], + "summary": "Groups: Search members of a group", + "description": "Search users who are members of a specific group.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "groupId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the group.", + "x-ms-summary": "GroupID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + }, + { + "name": "status", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "pending", + "activated", + "deactivated", + "contact" + ], + "description": "Filter by status.", + "x-ms-summary": "Status" + } + ] + } + }, + "/installations/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/installationData" + } + } + }, + "description": "List of installation entries." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "nextCursor": { + "type": "string", + "description": "Cursor for next page." + } + } + } + } + }, + "operationId": "SearchInstallations", + "summary": "Installations: Search plugin installations", + "description": "Search plugin installations. Proxy converts locale-keyed contents and config.localization to arrays automatically.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 100, + "description": "Items to return (max 100).", + "x-ms-summary": "Limit" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "updated_asc", + "updated_desc", + "published_asc", + "published_desc", + "created_asc", + "created_desc", + "relevance_asc", + "relevance_desc" + ], + "description": "Sort order.", + "x-ms-summary": "Sort" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ] + } + }, + "/media": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of assets that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/mediaData" + } + } + } + } + } + }, + "summary": "Media: Get all media", + "description": "Requests description of all media available in the current context.", + "operationId": "MediaGet", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "default": 100, + "description": "Limit the number of items here.", + "x-ms-visibility": "important", + "format": "int32", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "default": 0, + "description": "Set an offset for the query.", + "x-ms-visibility": "important", + "format": "int32", + "x-ms-summary": "Offset" + } + ] + }, + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/mediaData" + } + } + }, + "consumes": [ + "multipart/form-data" + ], + "operationId": "MediaUpload", + "summary": "Media: Upload media", + "description": "Upload a media file to the media library.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "file", + "in": "formData", + "required": true, + "type": "string", + "format": "binary", + "description": "The file to upload.", + "x-ms-summary": "File" + }, + { + "name": "metadata", + "in": "formData", + "required": false, + "type": "string", + "description": "Optional metadata for the file.", + "x-ms-summary": "Metadata" + } + ] + } + }, + "/media/publish": { + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of published URLs." + } + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "MediaPublish", + "summary": "Media: Publish media URLs (admin)", + "description": "WARNING: Published URLs are permanent and cannot be revoked.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "urls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of media URLs to publish." + } + } + } + } + ] + } + }, + "/media/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the media." + }, + "url": { + "type": "string", + "description": "The URL of the media." + } + } + } + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of media items found." + } + } + } + } + }, + "operationId": "MediaSearch", + "summary": "Media: Search media (beta)", + "description": "Search for media items by query string.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search query string.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "relevance_desc", + "created_asc", + "created_desc" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ] + } + }, + "/media/{mediumID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/mediaData" + } + } + }, + "summary": "Media: Get media by ID", + "operationId": "MediaGetByID", + "description": "Get metadata for single media by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "Requests information on a specific medium.", + "x-ms-summary": "MediumID" + } + ] + }, + "delete": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "MediaDelete", + "summary": "Media: Delete media", + "description": "Deletes the specified media in the current context.", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "MediumID", + "description": "Deletes the medium by its ID. While this will immediately remove the resource from our servers, the CDN may still deliver the content via the URL stated in resourceInfo.url until CDN invalidation." + } + ], + "x-ms-visibility": "advanced" + }, + "put": { + "responses": { + "204": { + "description": "Media replaced.", + "schema": {} + } + }, + "consumes": [ + "multipart/form-data" + ], + "operationId": "MediaReplace", + "summary": "Media: Replace media (admin)", + "description": "Replace an existing media file.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "mediumID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the media to replace.", + "x-ms-summary": "MediumID" + }, + { + "name": "file", + "in": "formData", + "required": true, + "type": "string", + "format": "binary", + "description": "The replacement file.", + "x-ms-summary": "File" + }, + { + "name": "note", + "in": "formData", + "required": true, + "type": "string", + "description": "A note describing the replacement.", + "x-ms-summary": "Note" + } + ] + } + }, + "/medialibrary/collections": { + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/mediaCollectionData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "CreateMediaCollection", + "summary": "File Management: Create a media collection", + "description": "Create a new media collection.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Collection name." + }, + "adminIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Admin user or group IDs." + }, + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Accessor user or group IDs." + } + } + } + } + ] + }, + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/mediaCollectionData" + } + } + } + } + } + }, + "operationId": "ListMediaCollections", + "summary": "File Management: List media collections", + "description": "List media collections accessible to the current user.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 500, + "description": "Items to return (max 500).", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "dateAddedAsc", + "dateAddedDesc", + "dateModifiedAsc", + "dateModifiedDesc", + "collectionNameAsc", + "collectionNameDesc" + ], + "description": "Sort order.", + "x-ms-summary": "Sort By" + } + ] + } + }, + "/medialibrary/collections/all": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/mediaCollectionData" + } + } + } + } + } + }, + "operationId": "ListAllCollections", + "summary": "File Management: List all collections (admin)", + "description": "Administrative: platform-wide collection listing.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 500, + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "dateAddedAsc", + "dateAddedDesc", + "dateModifiedAsc", + "dateModifiedDesc", + "collectionNameAsc", + "collectionNameDesc" + ], + "description": "Sort order.", + "x-ms-summary": "Sort By" + } + ] + } + }, + "/medialibrary/collections/{collectionId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/mediaCollectionData" + } + } + }, + "operationId": "GetMediaCollection", + "summary": "File Management: Get a media collection", + "description": "Get a specific media collection by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the collection.", + "x-ms-summary": "CollectionID" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/mediaCollectionData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "UpdateMediaCollection", + "summary": "File Management: Update a media collection", + "description": "Update the name of a media collection.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the collection.", + "x-ms-summary": "CollectionID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New collection name." + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Collection deleted.", + "schema": {} + } + }, + "operationId": "DeleteMediaCollection", + "summary": "File Management: Delete a media collection", + "description": "Delete a specific media collection.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the collection.", + "x-ms-summary": "CollectionID" + } + ] + } + }, + "/medialibrary/collections/{collectionId}/entries": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/mediaData" + }, + "description": "Files in the collection." + } + } + } + } + }, + "operationId": "ListFilesInCollection", + "summary": "File Management: List files in a collection", + "description": "List media files in a specific collection.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the collection.", + "x-ms-summary": "CollectionID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "dateAddedAsc", + "dateAddedDesc", + "dateModifiedAsc", + "dateModifiedDesc", + "collectionNameAsc", + "collectionNameDesc" + ], + "description": "Sort order.", + "x-ms-summary": "Sort By" + } + ] + }, + "post": { + "responses": { + "200": { + "description": "Files added to collection.", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "AddFilesToCollection", + "summary": "File Management: Add files to a collection", + "description": "Add media files to a collection by their IDs.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the collection.", + "x-ms-summary": "CollectionID" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "entryIds" + ], + "properties": { + "entryIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of medium IDs to add to the collection." + } + } + } + } + ] + } + }, + "/medialibrary/collections/{collectionId}/entries/delete": { + "post": { + "responses": { + "204": { + "description": "Files removed from collection.", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "RemoveFilesFromCollection", + "summary": "File Management: Remove files from a collection", + "description": "Remove files from a collection. This removes the association only \u2014 it does NOT delete the files from the platform.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the collection.", + "x-ms-summary": "CollectionID" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "entryIds" + ], + "properties": { + "entryIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of medium IDs to remove from the collection." + } + } + } + } + ] + } + }, + "/medialibrary/entries": { + "post": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/mediaData" + } + } + } + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "SearchMediaFiles", + "summary": "File Management: Search media files", + "description": "Search media files in the media library.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "q", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ] + } + }, + "/medialibrary/entries/{mediumId}": { + "put": { + "responses": { + "204": { + "description": "File associated with media library.", + "schema": {} + } + }, + "operationId": "AddFileToMediaLibrary", + "summary": "File Management: Associate file with media library", + "description": "Associates a media file (by ID from Media API upload) with the media library.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "mediumId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the media file.", + "x-ms-summary": "MediumID" + } + ] + } + }, + "/pages": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items returned." + }, + "cursor": { + "type": "string", + "description": "Cursor for pagination." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/pageData" + } + } + } + } + } + }, + "operationId": "GetPages", + "summary": "Pages: Get list of pages", + "description": "Get a list of pages.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Number of items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "CREATED_ASC", + "CREATED_DESC", + "PUBLISHED_ASC", + "PUBLISHED_DESC", + "UPDATED_ASC", + "UPDATED_DESC", + "TITLE_ASC", + "TITLE_DESC", + "PRIORITY_ASC", + "PRIORITY_DESC" + ], + "description": "Order results by field.", + "x-ms-summary": "Order By" + }, + { + "name": "status", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "DRAFT", + "PUBLISHED" + ], + "description": "Filter by page status.", + "x-ms-summary": "Status" + }, + { + "name": "spaceIds", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by space IDs (comma-separated).", + "x-ms-summary": "Space IDs" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "Page created.", + "schema": { + "$ref": "#/definitions/pageData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "CreatePage", + "summary": "Pages: Create a page", + "description": "Create a new page. Proxy converts contents array to locale-keyed object automatically.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "contents" + ], + "properties": { + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Locale, e.g. en_US." + }, + "title": { + "type": "string", + "description": "Page title." + }, + "content": { + "type": "string", + "description": "Page content (HTML)." + } + } + }, + "description": "Localized content. Proxy converts to locale-keyed object." + }, + "spaceId": { + "type": "string", + "description": "ID of the space to place the page in." + }, + "published": { + "type": "boolean", + "description": "Whether the page is published." + }, + "externalId": { + "type": "string", + "description": "External identifier." + }, + "readerIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "IDs of users or groups who can read this page." + }, + "adminIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "IDs of users or groups who can administer this page." + } + } + } + } + ] + } + }, + "/pages/sync": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "Cursor for pagination." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "updated", + "deleted" + ], + "description": "Whether the page was updated or deleted." + }, + "entity": { + "$ref": "#/definitions/pageData" + } + } + } + } + } + } + } + }, + "operationId": "SyncPages", + "summary": "Pages: Sync pages by cursor (external system sync)", + "description": "Pages updated or deleted in last 60 days. For external system sync.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Number of items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "includeDelete", + "in": "query", + "required": false, + "type": "boolean", + "description": "Whether to include deleted pages.", + "x-ms-summary": "Include Deleted" + } + ] + } + }, + "/pages/{pageId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/pageData" + } + } + }, + "operationId": "GetPage", + "summary": "Pages: Get a page by ID", + "description": "Get a specific page by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the page.", + "x-ms-summary": "PageID" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/pageData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "UpdatePage", + "summary": "Pages: Update a page", + "description": "Update an existing page. Proxy converts contents array to locale-keyed object automatically.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the page.", + "x-ms-summary": "PageID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + } + } + }, + "spaceId": { + "type": "string" + }, + "published": { + "type": "boolean" + }, + "externalId": { + "type": "string" + }, + "readerIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "adminIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Page deleted.", + "schema": {} + } + }, + "operationId": "DeletePage", + "summary": "Pages: Delete a page", + "description": "Delete a specific page by its ID.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "pageId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the page.", + "x-ms-summary": "PageID" + } + ] + } + }, + "/posts": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of posts that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/postData" + } + } + } + } + } + }, + "operationId": "PostsGetAll", + "summary": "Posts: Get a list of posts", + "description": "Get a list of posts that are accessible for the API token.", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "A string that can be used for searching the post content.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned (default and maximum 100).", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items starting at this number.", + "x-ms-summary": "Offset" + }, + { + "name": "manageable", + "in": "query", + "required": false, + "type": "boolean", + "default": false, + "description": "Optional filter for the given post content types. Defaults to not filtering.", + "x-ms-summary": "Manageable" + }, + { + "name": "contentType", + "in": "query", + "required": false, + "type": "string", + "uniqueItems": true, + "enum": [ + "articles", + "pictures", + "updates" + ], + "description": "Optional filter for the given post content types. (Defaults to not filtering)", + "x-ms-summary": "ContentType" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "created_DESC", + "published_DESC", + "updated_DESC" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ], + "x-ms-visibility": "important" + } + }, + "/posts/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of posts that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset for getting the items starting at this number." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/postData" + } + } + } + } + } + }, + "operationId": "PostsSearch", + "summary": "Posts: Search posts (beta)", + "description": "Search posts by query string.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "type": "string", + "description": "Search query string.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned.", + "x-ms-summary": "Limit" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "description": "Sort order for results.", + "x-ms-summary": "Sort" + } + ] + } + }, + "/posts/{pageID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/postData" + } + } + }, + "summary": "Posts: Get a post by ID", + "description": "Requests the specified posts including a set of comments.", + "operationId": "PostsGetByID", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This is the ID of the post.", + "x-ms-visibility": "important", + "x-ms-summary": "PageID" + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "integer", + "format": "int32", + "description": "The Identifier of deletion." + }, + "statusCode": { + "type": "integer", + "format": "int32", + "description": "The status code of the action." + }, + "message": { + "type": "string", + "description": "The message of the action." + }, + "type": { + "type": "string", + "description": "The type of the action." + } + } + } + } + }, + "operationId": "PostsDelete", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post ID defined by the API or if set the post externalID.", + "x-ms-summary": "PageID" + } + ], + "description": "Removes a post from the system.", + "summary": "Posts: Removes a post", + "x-ms-visibility": "advanced" + }, + "put": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "PostsPut", + "description": "Updates a post, only changed field (incremental).", + "summary": "Posts: Updates a post", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "This could be either the post ID defined by the API or if set the post externalID.", + "x-ms-summary": "PageID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "externalID": { + "type": "string", + "description": "Optional: Enter an external ID here." + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "Insert locale like, e.g. de_DE, en_US, etc." + }, + "content": { + "type": "string", + "description": "Enter news content here." + }, + "image": { + "type": "string", + "description": "Enter link to image here." + }, + "teaser": { + "type": "string", + "description": "Enter your teaser here." + }, + "title": { + "type": "string", + "description": "Enter your title here." + }, + "published": { + "type": "string", + "description": "Enter your date published here." + } + } + } + }, + "notificationChannels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "email", + "push" + ] + }, + "description": "Which notification channels to use when publishing this post." + }, + "planned": { + "type": "string", + "description": "ISO 8601 date string for planned publication." + }, + "campaignId": { + "type": "string", + "description": "Optional campaign ID to associate with this post." + } + } + } + } + ] + } + }, + "/posts/{pageID}/acknowledgements": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of acknowledgements." + }, + "data": { + "type": "array", + "items": { + "type": "object" + }, + "description": "List of acknowledgement objects." + }, + "cursor": { + "type": "string", + "description": "Cursor for pagination." + } + } + } + } + }, + "operationId": "PostGetAcknowledgements", + "summary": "Posts: Get read acknowledgements for a post", + "description": "Get the list of users who have acknowledged reading a post.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the post.", + "x-ms-summary": "PageID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "The amount of items that should be returned.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ] + } + }, + "/posts/{pageID}/notifications": { + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "PostResendNotifications", + "summary": "Posts: Resend notifications for a post", + "description": "Resend notifications for a specific post.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "pageID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the post.", + "x-ms-summary": "PageID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "boolean", + "description": "Whether to resend notification via email." + }, + "push": { + "type": "boolean", + "description": "Whether to resend notification via push." + }, + "recipients": { + "type": "string", + "default": "all", + "description": "Which recipients to resend to (default: all)." + } + } + } + } + ] + } + }, + "/spaces": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "limit": { + "type": "integer", + "format": "int32" + }, + "offset": { + "type": "integer", + "format": "int32" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/spaceData" + } + } + } + } + } + }, + "operationId": "GetSpaces", + "summary": "Spaces: Get list of spaces", + "description": "Get a list of spaces.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Offset for pagination.", + "x-ms-summary": "Offset" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "Space created.", + "schema": { + "$ref": "#/definitions/spaceData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "CreateSpace", + "summary": "Spaces: Create a space", + "description": "Create a new space.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the space." + }, + "adminIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Admin user or group IDs." + }, + "accessorIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Accessor user or group IDs." + }, + "sections": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "APP_INTRANET", + "EMAIL" + ] + }, + "description": "Sections this space is visible in." + } + } + } + } + ] + } + }, + "/spaces/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "cursor": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/spaceData" + } + } + } + } + } + }, + "operationId": "SearchSpaces", + "summary": "Spaces: Search spaces", + "description": "Search for spaces by query.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "q", + "in": "query", + "required": false, + "type": "string", + "description": "Search query.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "name_asc", + "name_desc", + "createdAt_desc", + "updatedAt_desc", + "relevance_desc" + ], + "description": "Sort order.", + "x-ms-summary": "Sort" + }, + { + "name": "sections", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by sections (comma-separated).", + "x-ms-summary": "Sections" + } + ] + } + }, + "/spaces/{spaceId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/spaceData" + } + } + }, + "operationId": "GetSpace", + "summary": "Spaces: Get a space by ID", + "description": "Get a specific space by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "spaceId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the space.", + "x-ms-summary": "SpaceID" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/spaceData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "UpdateSpace", + "summary": "Spaces: Update a space", + "description": "Update an existing space.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "spaceId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the space.", + "x-ms-summary": "SpaceID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "adminIDs": { + "type": "array", + "items": { + "type": "string" + } + }, + "accessorIDs": { + "type": "array", + "items": { + "type": "string" + } + }, + "sections": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "APP_INTRANET", + "EMAIL" + ] + } + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Space deleted.", + "schema": {} + } + }, + "operationId": "DeleteSpace", + "summary": "Spaces: Delete a space", + "description": "Delete a specific space by its ID.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "spaceId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the space.", + "x-ms-summary": "SpaceID" + } + ] + } + }, + "/tags": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of tags." + }, + "cursor": { + "type": "string", + "description": "Cursor for pagination." + }, + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The tag ID." + }, + "value": { + "type": "string", + "description": "The tag value." + } + } + } + } + } + } + } + }, + "operationId": "GetTags", + "summary": "Tags: Get list of user profile tags", + "description": "Lists user profile tags for conditional groups. Requires read-only token or higher.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "tag", + "in": "query", + "required": false, + "type": "string", + "description": "Filter tags, e.g. profile:city:berlin.", + "x-ms-summary": "Tag Filter" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "default": 50, + "description": "Items to return (default 50).", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + } + ] + } + }, + "/templates": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32" + }, + "limit": { + "type": "integer", + "format": "int32" + }, + "offset": { + "type": "integer", + "format": "int32" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/templateData" + } + } + } + } + } + }, + "operationId": "GetTemplates", + "summary": "Templates: Get list of page templates", + "description": "Get a list of page templates.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Items to return.", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Offset for pagination.", + "x-ms-summary": "Offset" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "Template created.", + "schema": { + "$ref": "#/definitions/templateData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "CreateTemplate", + "summary": "Templates: Create a page template", + "description": "Create a new page template.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "The template title." + }, + "content": { + "type": "string", + "description": "The template HTML content." + }, + "config": { + "type": "object", + "properties": { + "showPageBackground": { + "type": "boolean", + "description": "Whether to show the page background." + } + } + } + } + } + } + ] + } + }, + "/templates/{templateId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/templateData" + } + } + }, + "operationId": "GetTemplate", + "summary": "Templates: Get a page template by ID", + "description": "Get a specific page template by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "templateId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the template.", + "x-ms-summary": "TemplateID" + } + ] + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/templateData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "UpdateTemplate", + "summary": "Templates: Update a page template", + "description": "Update an existing page template.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "templateId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the template.", + "x-ms-summary": "TemplateID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "config": { + "type": "object", + "properties": { + "showPageBackground": { + "type": "boolean" + } + } + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Template deleted.", + "schema": {} + } + }, + "operationId": "DeleteTemplate", + "summary": "Templates: Delete a page template", + "description": "Delete a specific page template by its ID.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "templateId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the template.", + "x-ms-summary": "TemplateID" + } + ] + } + }, + "/users": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of users that are found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items that are returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current defined offset." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/userData" + } + } + } + } + } + }, + "summary": "User: Get list of users", + "description": "Get a list of users, depending on the API access token.", + "operationId": "UserGetAll", + "produces": [ + "application/vnd.staffbase.accessors.users.v2+json" + ], + "x-ms-visibility": "important", + "parameters": [ + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "SCIM notation can be used to filter.", + "x-ms-summary": "Filter", + "x-ms-visibility": "important" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Fulltext search in any profile field.", + "x-ms-summary": "Query", + "x-ms-visibility": "important" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "description": "Sort order for results.", + "x-ms-summary": "Sort" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 1000, + "description": "The amount of items that should be returned (maximum 1000).", + "x-ms-summary": "Limit" + }, + { + "name": "includeProfile", + "in": "query", + "required": false, + "type": "boolean", + "description": "Whether to include the full user profile in the response.", + "x-ms-summary": "Include Profile" + } + ] + }, + "post": { + "responses": { + "default": { + "description": "default", + "schema": {}, + "headers": { + "HTTP/1.1": { + "description": "HTTP/1.1", + "type": "string" + }, + "Location:": { + "description": "Location:", + "type": "string" + } + } + } + }, + "consumes": [ + "application/vnd.staffbase.accessors.user-invite.v2+json" + ], + "operationId": "UserPost", + "summary": "User: Invite user", + "description": "Invite a new user.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "This is the email address of the user." + }, + "firstName": { + "type": "string", + "description": "This is the firstname of the user." + }, + "lastName": { + "type": "string", + "description": "This is the lastname of the user." + }, + "externalId": { + "type": "string", + "description": "An optional external ID for the user." + }, + "role": { + "type": "string", + "description": "The role of the user (required)." + }, + "locale": { + "type": "string", + "description": "The locale of the user, e.g. en_US (required)." + }, + "userName": { + "type": "string", + "description": "The username for the user." + }, + "profile": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "First name in the user profile." + }, + "lastName": { + "type": "string", + "description": "Last name in the user profile." + }, + "department": { + "type": "string", + "description": "Department in the user profile." + } + } + } + } + } + } + ] + } + }, + "/users/imports": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "fileSize": { + "type": "integer", + "format": "int32" + }, + "recordCount": { + "type": "integer", + "format": "int32" + }, + "state": { + "type": "string" + }, + "owner": { + "type": "object" + } + } + } + } + } + } + } + }, + "operationId": "ListCsvImports", + "summary": "CSV Import: List CSV imports", + "description": "List all CSV user import jobs.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 500, + "default": 20, + "description": "Items to return (max 500, default 20).", + "x-ms-summary": "Limit" + } + ] + }, + "post": { + "responses": { + "201": { + "description": "Import created. See Location header for the import URL.", + "schema": {} + } + }, + "consumes": [ + "multipart/form-data" + ], + "operationId": "CreateCsvImport", + "summary": "CSV Import: Upload CSV file", + "description": "Upload a CSV file to start a new import job. Returns Location header with import URL.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "file", + "in": "formData", + "required": true, + "type": "file", + "description": "The CSV file to import.", + "x-ms-summary": "CSV File" + } + ] + } + }, + "/users/imports/{importId}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "fileSize": { + "type": "integer", + "format": "int32" + }, + "recordCount": { + "type": "integer", + "format": "int32" + }, + "state": { + "type": "string" + }, + "owner": { + "type": "object" + } + } + } + } + }, + "operationId": "GetCsvImport", + "summary": "CSV Import: Get import by ID", + "description": "Get a specific CSV import job by its ID.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "importId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the import.", + "x-ms-summary": "ImportID" + } + ] + }, + "patch": { + "responses": { + "204": { + "description": "Status updated.", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "UpdateCsvImportStatus", + "summary": "CSV Import: Update import status", + "description": "Transition the import state. Valid transitions: DRAFT\u2192PREVIEW_PENDING, PREVIEW_READY\u2192IMPORT_PENDING.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "importId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the import.", + "x-ms-summary": "ImportID" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "state" + ], + "properties": { + "state": { + "type": "string", + "enum": [ + "DRAFT", + "PREVIEW_PENDING", + "IMPORT_PENDING", + "CANCELLED" + ], + "description": "New state for the import." + } + } + } + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "Import deleted.", + "schema": {} + } + }, + "operationId": "DeleteCsvImport", + "summary": "CSV Import: Delete an import", + "description": "Delete a specific CSV import job.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "importId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the import.", + "x-ms-summary": "ImportID" + } + ] + } + }, + "/users/imports/{importId}/config": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "description": "The import configuration object." + } + } + }, + "operationId": "GetCsvImportConfig", + "summary": "CSV Import: Get import configuration", + "description": "Get the configuration for a specific CSV import.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "importId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the import.", + "x-ms-summary": "ImportID" + } + ] + }, + "patch": { + "responses": { + "204": { + "description": "Config updated.", + "schema": {} + } + }, + "consumes": [ + "application/json" + ], + "operationId": "SetCsvImportConfig", + "summary": "CSV Import: Set import configuration", + "description": "Set the configuration for a specific CSV import.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "importId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the import.", + "x-ms-summary": "ImportID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "delta": { + "type": "boolean", + "description": "Delta import (only process changes)." + }, + "encoding": { + "type": "string", + "enum": [ + "UTF-8", + "windows-1252" + ], + "description": "CSV file encoding." + }, + "generateRecoveryCodes": { + "type": "boolean", + "description": "Generate recovery codes for new users." + }, + "partialTag": { + "type": "string", + "description": "Tag for partial import runs." + }, + "reportMailAddress": { + "type": "string", + "description": "Email address to send import report." + }, + "reportOnlyOnErrors": { + "type": "boolean", + "description": "Only send report if errors occur." + }, + "sendMailsNew": { + "type": "boolean", + "description": "Send invitation emails to new users." + }, + "sendMailsPending": { + "type": "boolean", + "description": "Send invitation emails to pending users." + }, + "separator": { + "type": "string", + "enum": [ + ",", + ";", + "|" + ], + "description": "CSV column separator." + }, + "type": { + "type": "string", + "enum": [ + "USER", + "CONTACT" + ], + "description": "Import type." + }, + "mapping": { + "type": "object", + "description": "Column-to-field mapping." + } + } + } + } + ] + } + }, + "/users/imports/{importId}/status": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "totalLines": { + "type": "integer", + "format": "int32", + "description": "Total lines in CSV." + }, + "completedLines": { + "type": "integer", + "format": "int32", + "description": "Processed lines so far." + }, + "status": { + "type": "string", + "description": "Current processing status." + }, + "changes": { + "type": "object", + "properties": { + "created": { + "type": "integer", + "format": "int32" + }, + "updated": { + "type": "integer", + "format": "int32" + }, + "deactivated": { + "type": "integer", + "format": "int32" + }, + "reactivated": { + "type": "integer", + "format": "int32" + }, + "deleted": { + "type": "integer", + "format": "int32" + }, + "hasErrors": { + "type": "boolean" + } + } + } + } + } + } + }, + "operationId": "GetCsvImportStatus", + "summary": "CSV Import: Get import processing status", + "description": "Get the processing status and change summary for an import.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "importId", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the import.", + "x-ms-summary": "ImportID" + } + ] + } + }, + "/users/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of users found." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current offset." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/userData" + } + } + } + } + } + }, + "operationId": "UserSearch", + "produces": [ + "application/vnd.staffbase.accessors.users-search.v1+json" + ], + "summary": "User: Search users", + "description": "Search for users by query or filter.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Full-text search query.", + "x-ms-summary": "Query" + }, + { + "name": "filter", + "in": "query", + "required": false, + "type": "string", + "description": "SCIM filter string.", + "x-ms-summary": "Filter" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "description": "Sort order for results.", + "x-ms-summary": "Sort" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 1000, + "description": "The amount of items to return (maximum 1000).", + "x-ms-summary": "Limit" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "includeProfile", + "in": "query", + "required": false, + "type": "boolean", + "description": "Whether to include the full user profile.", + "x-ms-summary": "Include Profile" + } + ] + } + }, + "/users/sync": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/userData" + }, + "description": "List of users." + }, + "links": { + "type": "object", + "description": "Pagination links." + } + } + } + } + }, + "operationId": "UserSync", + "summary": "User: Sync users by cursor (large datasets)", + "description": "Use includeDelete=true to include users deleted in last 30 days.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "includeDelete", + "in": "query", + "required": false, + "type": "boolean", + "default": false, + "description": "Include users deleted in the last 30 days.", + "x-ms-summary": "Include Deleted" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 1000, + "default": 100, + "description": "The amount of items to return (maximum 1000, default 100).", + "x-ms-summary": "Limit" + } + ] + } + }, + "/users/{userID}": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/userData" + } + } + }, + "summary": "User: Get user information", + "operationId": "UserGetByID", + "produces": [ + "application/vnd.staffbase.accessors.user.v3+json" + ], + "description": "Get specific user information by its user id.", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "x-ms-summary": "UserID", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user." + }, + { + "name": "includeProfile", + "in": "query", + "required": false, + "type": "boolean", + "default": false, + "description": "Whether to include the full user profile in the response.", + "x-ms-summary": "Include Profile" + } + ], + "x-ms-visibility": "important" + }, + "delete": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Delete User", + "operationId": "UserDelete", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + } + ], + "description": "Deletes the specified user." + }, + "put": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/userData" + } + } + }, + "consumes": [ + "application/json" + ], + "operationId": "UserPut", + "summary": "User: Update user information", + "x-ms-visibility": "important", + "description": "Update user information.", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/userData" + } + } + ] + }, + "patch": { + "responses": { + "200": { + "description": "default", + "schema": { + "$ref": "#/definitions/userData" + } + } + }, + "consumes": [ + "application/vnd.staffbase.accessors.user-update.v1+json" + ], + "operationId": "UserPatch", + "summary": "User: Partially update user (preferred over PUT)", + "description": "Only provided fields are changed.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "$ref": "#/definitions/userData" + } + } + ] + } + }, + "/users/{userID}/groups": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of groups." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "The amount of items returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The current offset." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the group." + }, + "name": { + "type": "string", + "description": "The name of the group." + } + } + } + } + } + } + } + }, + "operationId": "UserGetGroups", + "summary": "User: Get groups of a user", + "description": "Get the list of groups a user belongs to.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the user.", + "x-ms-summary": "UserID" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 100, + "description": "The amount of items to return (maximum 100).", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Define an offset for getting the items.", + "x-ms-summary": "Offset" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "created_DESC", + "name_ASC", + "updated_DESC" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" + } + ] + } + }, + "/users/{userID}/groups/search": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "cursor": { + "type": "string", + "description": "Cursor for the next page." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/groupData" + }, + "description": "List of groups." + } + } + } + } + }, + "produces": [ + "application/vnd.staffbase.accessors.user.groups-search.v1+json" + ], + "operationId": "UserGetGroupsSearch", + "summary": "User: Search groups of a user", + "description": "Search the groups a user belongs to. Supports cursor-based pagination and query filtering. Can be called by admins and group admins.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The Staffbase user ID or externalID of the user.", + "x-ms-summary": "UserID" + }, + { + "name": "cursor", + "in": "query", + "required": false, + "type": "string", + "description": "Cursor for pagination.", + "x-ms-summary": "Cursor" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Filter groups by name.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "description": "Maximum number of items to return.", + "x-ms-summary": "Limit" + } + ] + } + }, + "/users/{userID}/groups/visible": { + "get": { + "responses": { + "200": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int32", + "description": "Total number of visible groups." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Items returned." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Current offset." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/groupData" + }, + "description": "List of visible groups." + } + } + } + } + }, + "operationId": "UserGetGroupsVisible", + "summary": "User: Get visible groups of a user", + "description": "Returns groups the user is a member of, filtered by type. Conditional groups are omitted.", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The Staffbase user ID or externalID of the user.", + "x-ms-summary": "UserID" + }, + { + "name": "query", + "in": "query", + "required": false, + "type": "string", + "description": "Filter by group name.", + "x-ms-summary": "Query" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "maximum": 100, + "description": "Maximum number of items to return (max 100).", + "x-ms-summary": "Limit" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "description": "Offset for pagination.", + "x-ms-summary": "Offset" + }, + { + "name": "sort", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "created_DESC", + "name_ASC", + "updated_DESC" + ], + "description": "Sort order for results.", + "x-ms-summary": "Sort" + } + ] + } + }, + "/users/{userID}/recovery": { + "post": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "summary": "User: Send a recovery email", + "description": "Sends a recovery email to the specified user.", + "operationId": "UserPostRecovery", + "x-ms-visibility": "important", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID can be based on either the UserID automatically generated by the Staffbase platform or the externalID, if it is added for the user.", + "x-ms-summary": "UserID" + } + ] + } + }, + "/users/{userID}/sessions": { + "delete": { + "responses": { + "202": { + "description": "Sessions deleted.", + "schema": {} + } + }, + "operationId": "UserDeleteSessions", + "summary": "User: Delete all active sessions (log out user everywhere)", + "description": "Deletes all active sessions for the specified user, effectively logging them out everywhere.", + "x-ms-visibility": "advanced", + "parameters": [ + { + "name": "userID", + "in": "path", + "x-ms-url-encoding": "single", + "required": true, + "type": "string", + "description": "The ID of the user.", + "x-ms-summary": "UserID" + } + ] + } + }, + "/version": { + "get": { + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "operationId": "ProxyVersionGet", + "summary": "Proxy: Get version", + "description": "Returns the current proxy version.", + "parameters": [] + } + } + }, + "definitions": { + "mediaData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the asset." + }, + "ownerID": { + "type": "string", + "description": "This is the ID of the owner of this asset." + }, + "parentID": { + "type": "string", + "description": "This is the ID of the parent media asset." + }, + "publicID": { + "type": "string", "description": "This is the public ID for accessing the asset." }, - "resourceInfo": { + "resourceInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the asset resource type." + }, + "bytes": { + "type": "integer", + "format": "int32", + "description": "This is the resource size (in bytes)." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the resource width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the resource height." + }, + "url": { + "type": "string", + "description": "This is the resource url." + }, + "format": { + "type": "string", + "description": "This is the resource format." + }, + "mimeType": { + "type": "string", + "description": "This is the resource MIME type." + } + } + }, + "fileName": { + "type": "string", + "description": "This is the media filename." + }, + "title": { + "type": "string", + "description": "This is the media title." + }, + "label": { + "type": "string", + "description": "This is the media label." + }, + "created": { + "type": "string", + "description": "The created date of the asset." + } + } + }, + "userData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the user" + }, + "externalID": { + "type": "string", + "description": "The external ID of the user" + }, + "firstName": { + "type": "string", + "description": "The firstname of the user" + }, + "lastName": { + "type": "string", + "description": "The lastname of the user" + }, + "publicEmailAddress": { + "type": "string", + "description": "The public eMail of the user" + }, + "config": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "description": "The locale of the user" + } + } + }, + "emails": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The email address", + "title": "email" + }, + "primary": { + "type": "boolean", + "description": "Is it the primary email?" + } + } + }, + "description": "User email information" + }, + "groupIDs": { + "type": "array", + "items": { + "type": "string", + "description": "List of groups the user is assigned to" + } + }, + "position": { + "type": "string", + "description": "The position of the user" + }, + "department": { + "type": "string", + "description": "The department of the user" + }, + "location": { + "type": "string", + "description": "The location of the user" + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the user" + }, + "created": { + "type": "string", + "description": "The created date of the user" + }, + "updated": { + "type": "string", + "description": "The updated date of the user" + }, + "activated": { + "type": "string", + "description": "Is the user activated?" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags associated with the user." + }, + "status": { + "type": "string", + "description": "The status of the user." + }, + "role": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The role type of the user." + } + }, + "description": "The role of the user." + }, + "mandatoryGroupIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of mandatory group IDs the user is assigned to." + }, + "costcenter": { + "type": "string", + "description": "The cost center of the user." + } + } + }, + "postData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the post." + }, + "author": { + "$ref": "#/definitions/authorObject" + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The post content, which is localized." + }, + "image": { + "$ref": "#/definitions/imageObject" + }, + "teaser": { + "type": "string", + "description": "The post teaser, which is localized." + }, + "title": { + "type": "string", + "description": "The post title, which is localized." + }, + "locale": { + "type": "string", + "description": "This is the locale of the item." + } + } + } + }, + "channel": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "This is the ID of the channel." + }, + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "This is the channel title, which is localized." + }, + "locale": { + "type": "string", + "description": "This is the locale of the channel title." + } + } + } + } + } + } + } + }, + "published": { + "type": "string", + "description": "The published date of the post." + }, + "created": { + "type": "string", + "description": "The created date of the post." + }, + "updated": { + "type": "string", + "description": "The updated date of the post." + } + } + }, + "authorObject": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "This is the firstname of the author." + }, + "id": { + "type": "string", + "description": "This is the ID of the author." + }, + "lastName": { + "type": "string", + "description": "This is the lastname of the author." + }, + "avatar": { + "type": "object", + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the author avatar image original url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar image original width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar image original height." + }, + "size": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar image original sie (in bytes)." + }, + "format": { + "type": "string", + "description": "This is the author avatar original format." + }, + "mimeType": { + "type": "string", + "description": "This is the athor avatar image original mimeType." + }, + "created": { + "type": "string", + "description": "This is the author avatar original created date." + } + } + }, + "icon": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the author avatar icon url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar icon width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar icon height." + }, + "format": { + "type": "string", + "description": "This is the author avatar icon format." + }, + "mimeType": { + "type": "string", + "description": "This is the author avatar icon mimeType." + } + } + }, + "thumb": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the author avatar thumb url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar thumb width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the author avatar thumb height." + }, + "format": { + "type": "string", + "description": "This is the author avatar thumb format." + }, + "mimeType": { + "type": "string", + "description": "This is the athor avatar thumb mimeType." + } + } + }, + "publicID": { + "type": "string", + "description": "This is the author avatar public ID." + } + } + } + } + }, + "imageObject": { + "type": "object", + "x-nullable": true, + "properties": { + "original": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the image original url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the image original width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the image original height." + }, + "size": { + "type": "integer", + "format": "int32", + "description": "This is the image original size (in bytes)." + }, + "format": { + "type": "string", + "description": "This is the image original format." + }, + "mimeType": { + "type": "string", + "description": "This is the image original mimeType." + } + } + }, + "original_scaled": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the image original url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the image original width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the image original height." + }, + "format": { + "type": "string", + "description": "This is the image original format." + }, + "mimeType": { + "type": "string", + "description": "This is the image original mimeType." + } + } + }, + "compact": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "This is the image compact url." + }, + "width": { + "type": "integer", + "format": "int32", + "description": "This is the image compact width." + }, + "height": { + "type": "integer", + "format": "int32", + "description": "This is the image compact height." + }, + "format": { + "type": "string", + "description": "This is the image compact format." + }, + "mimeType": { + "type": "string", + "description": "This is the image compact mimeType." + } + } + } + } + }, + "pageData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The page ID." + }, + "spaceId": { + "type": "string", + "description": "The space ID." + }, + "branchId": { + "type": "string", + "description": "The branch ID." + }, + "createdAt": { + "type": "string", + "description": "Creation timestamp." + }, + "updatedAt": { + "type": "string", + "description": "Last update timestamp." + }, + "publishedAt": { + "type": "string", + "description": "Publication timestamp." + }, + "externalId": { + "type": "string", + "description": "External identifier." + }, + "ownerId": { + "type": "string", + "description": "Owner user ID." + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + } + }, + "description": "Localized content." + }, + "readers": { "type": "object", "properties": { - "type": { - "type": "string", - "description": "This is the asset resource type." - }, - "bytes": { - "type": "integer", - "format": "int32", - "description": "This is the resource size (in bytes)." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the resource width." + "userIds": { + "type": "array", + "items": { + "type": "string" + } }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the resource height." + "groupIds": { + "type": "array", + "items": { + "type": "string" + } }, - "url": { - "type": "string", - "description": "This is the resource url." + "branchAccess": { + "type": "boolean" + } + }, + "description": "Reader access configuration." + }, + "admins": { + "type": "object", + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "string" + } }, - "format": { - "type": "string", - "description": "This is the resource format." + "groupIds": { + "type": "array", + "items": { + "type": "string" + } }, - "mimeType": { - "type": "string", - "description": "This is the resource MIME type." + "branchAccess": { + "type": "boolean" } - } - }, - "fileName": { + }, + "description": "Admin access configuration." + } + } + }, + "groupData": { + "type": "object", + "properties": { + "id": { "type": "string", - "description": "This is the media filename." + "description": "The group ID." }, - "title": { + "type": { "type": "string", - "description": "This is the media title." + "enum": [ + "open", + "internal", + "conditional" + ], + "description": "Group type." }, - "label": { + "externalId": { "type": "string", - "description": "This is the media label." + "description": "External identifier." }, - "created": { + "config": { + "type": "object", + "properties": { + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + }, + "description": "Localization config." + }, + "updatedAt": { "type": "string", - "description": "The created date of the asset." + "description": "Last update timestamp." } } }, - "userData": { + "spaceData": { "type": "object", "properties": { "id": { "type": "string", - "description": "The ID of the user" + "description": "The space ID." }, - "externalID": { + "name": { "type": "string", - "description": "The external ID of the user" + "description": "The space name." }, - "firstName": { + "branchID": { "type": "string", - "description": "The firstname of the user" + "description": "The branch ID." }, - "lastName": { + "parentId": { "type": "string", - "description": "The lastname of the user" + "description": "Parent space ID." }, - "publicEmailAddress": { + "childIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Child space IDs." + }, + "rootMenuNodeId": { "type": "string", - "description": "The public eMail of the user" + "description": "Root menu node ID." }, - "config": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "description": "The locale of the user" - } - } + "adminIDs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Admin user or group IDs." }, - "emails": { + "accessorIDs": { "type": "array", "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The email address", - "title": "email" - }, - "primary": { - "type": "boolean", - "description": "Is it the primary email?" - } - } + "type": "string" }, - "description": "User email information" + "description": "Accessor user or group IDs." }, - "groupIDs": { + "sections": { "type": "array", "items": { - "type": "string", - "description": "List of groups the user is assigned to" - } + "type": "string" + }, + "description": "Sections this space is visible in." + } + } + }, + "campaignData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The campaign ID." }, - "position": { + "branchId": { "type": "string", - "description": "The position of the user" + "description": "The branch ID." }, - "department": { + "title": { "type": "string", - "description": "The department of the user" + "description": "Campaign title." }, - "location": { + "goal": { "type": "string", - "description": "The location of the user" + "description": "Campaign goal." }, - "phoneNumber": { + "color": { "type": "string", - "description": "The phone number of the user" + "description": "Campaign color code." }, - "created": { + "authorId": { "type": "string", - "description": "The created date of the user" + "description": "Author user ID." }, - "updated": { + "startAt": { "type": "string", - "description": "The updated date of the user" + "description": "Campaign start date." }, - "activated": { + "endAt": { "type": "string", - "description": "Is the user activated?" + "description": "Campaign end date." + }, + "createdAt": { + "type": "string", + "description": "Creation timestamp." + }, + "updatedAt": { + "type": "string", + "description": "Last update timestamp." + }, + "stats": { + "type": "object", + "properties": { + "referencesCount": { + "type": "integer" + }, + "totalVisitsCount": { + "type": "integer" + }, + "totalLikesCount": { + "type": "integer" + }, + "totalCommentsCount": { + "type": "integer" + } + }, + "description": "Campaign statistics." } } }, - "postData": { + "referenceData": { "type": "object", "properties": { "id": { "type": "string", - "description": "The ID of the post." + "description": "The reference ID." }, - "author": { - "$ref": "#/definitions/authorObject" + "campaignId": { + "type": "string", + "description": "The campaign ID." }, - "contents": { + "sourceId": { + "type": "string", + "description": "The source post or email ID." + }, + "sourceType": { + "type": "string", + "enum": [ + "POST", + "EMAIL" + ], + "description": "The source type." + }, + "publishedAt": { + "type": "string", + "description": "Publication timestamp." + }, + "scheduledFor": { + "type": "string", + "description": "Scheduled publication date." + }, + "stats": { + "type": "object", + "properties": { + "visitsCount": { + "type": "integer" + }, + "visitorsCount": { + "type": "integer" + }, + "likesCount": { + "type": "integer" + }, + "commentsCount": { + "type": "integer" + } + }, + "description": "Reference statistics." + }, + "createdAt": { + "type": "string", + "description": "Creation timestamp." + }, + "updatedAt": { + "type": "string", + "description": "Last update timestamp." + } + } + }, + "quickLinkData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The Quick Link ID." + }, + "platform": { + "type": "string", + "enum": [ + "desktop", + "mobile" + ], + "description": "Platform." + }, + "localization": { "type": "array", "items": { "type": "object", "properties": { - "content": { - "type": "string", - "description": "The post content, which is localized." - }, - "image": { - "$ref": "#/definitions/imageObject" - }, - "teaser": { - "type": "string", - "description": "The post teaser, which is localized." - }, - "title": { - "type": "string", - "description": "The post title, which is localized." - }, "locale": { - "type": "string", - "description": "This is the locale of the item." + "type": "string" + }, + "name": { + "type": "string" } } - } + }, + "description": "Localized names." }, - "channel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This is the ID of the channel." - }, - "config": { - "type": "object", - "properties": { - "localization": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "This is the channel title, which is localized." - }, - "locale": { - "type": "string", - "description": "This is the locale of the channel title." - } - } - } - } - } - } - } + "link": { + "type": "string", + "description": "URL target." }, - "published": { + "priority": { + "type": "integer", + "description": "Display priority." + }, + "enforceNewWindow": { + "type": "boolean", + "description": "Open in new window." + }, + "showIosNavBar": { + "type": "boolean", + "description": "Show iOS nav bar." + }, + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Accessor IDs." + }, + "visibleInPublicArea": { + "type": "boolean", + "description": "Visible in public area." + } + } + }, + "templateData": { + "type": "object", + "properties": { + "id": { "type": "string", - "description": "The published date of the post." + "description": "The template ID." }, - "created": { + "title": { "type": "string", - "description": "The created date of the post." + "description": "Template title." }, - "updated": { + "content": { "type": "string", - "description": "The updated date of the post." + "description": "Template HTML content." + }, + "config": { + "type": "object", + "properties": { + "showPageBackground": { + "type": "boolean", + "description": "Whether to show the page background." + } + }, + "description": "Template configuration." } } }, - "authorObject": { + "installationData": { "type": "object", "properties": { - "firstName": { + "id": { "type": "string", - "description": "This is the firstname of the author." + "description": "The installation ID." }, - "id": { + "pluginID": { "type": "string", - "description": "This is the ID of the author." + "description": "The plugin ID." }, - "lastName": { + "spaceID": { "type": "string", - "description": "This is the lastname of the author." + "description": "The space ID." }, - "avatar": { + "created": { + "type": "string", + "description": "Creation timestamp." + }, + "updated": { + "type": "string", + "description": "Last update timestamp." + }, + "published": { + "type": "string", + "description": "Publication timestamp." + }, + "contents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "content": { + "type": "string" + } + } + }, + "description": "Localized content." + }, + "config": { "type": "object", "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "This is the author avatar image original url." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar image original width." - }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar image original height." - }, - "size": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar image original sie (in bytes)." - }, - "format": { - "type": "string", - "description": "This is the author avatar original format." - }, - "mimeType": { - "type": "string", - "description": "This is the athor avatar image original mimeType." - }, - "created": { - "type": "string", - "description": "This is the author avatar original created date." + "localization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "locale": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + } } } }, "icon": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "This is the author avatar icon url." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar icon width." - }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar icon height." - }, - "format": { - "type": "string", - "description": "This is the author avatar icon format." - }, - "mimeType": { - "type": "string", - "description": "This is the author avatar icon mimeType." - } - } + "type": "string" }, - "thumb": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "This is the author avatar thumb url." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar thumb width." - }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the author avatar thumb height." - }, - "format": { - "type": "string", - "description": "This is the author avatar thumb format." - }, - "mimeType": { - "type": "string", - "description": "This is the athor avatar thumb mimeType." - } - } + "logo": { + "type": "string" }, - "publicID": { - "type": "string", - "description": "This is the author avatar public ID." + "logoDark": { + "type": "string" } - } + }, + "description": "Installation configuration." } } }, - "imageObject": { + "emailMetadata": { "type": "object", - "x-nullable": true, "properties": { - "original": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "This is the image original url." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the image original width." - }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the image original height." - }, - "size": { - "type": "integer", - "format": "int32", - "description": "This is the image original size (in bytes)." - }, - "format": { - "type": "string", - "description": "This is the image original format." - }, - "mimeType": { - "type": "string", - "description": "This is the image original mimeType." - } - } + "id": { + "type": "string", + "description": "The email ID." }, - "original_scaled": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "This is the image original url." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the image original width." - }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the image original height." - }, - "format": { - "type": "string", - "description": "This is the image original format." - }, - "mimeType": { - "type": "string", - "description": "This is the image original mimeType." - } - } + "subject": { + "type": "string", + "description": "Email subject." }, - "compact": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "This is the image compact url." - }, - "width": { - "type": "integer", - "format": "int32", - "description": "This is the image compact width." - }, - "height": { - "type": "integer", - "format": "int32", - "description": "This is the image compact height." - }, - "format": { - "type": "string", - "description": "This is the image compact format." - }, - "mimeType": { - "type": "string", - "description": "This is the image compact mimeType." - } - } + "createdAt": { + "type": "string", + "description": "Creation timestamp." + }, + "sentAt": { + "type": "string", + "description": "Send timestamp." + }, + "status": { + "type": "string", + "description": "Email status." + }, + "recipientCount": { + "type": "integer", + "format": "int32", + "description": "Total recipients." + } + } + }, + "mediaCollectionData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The collection ID." + }, + "name": { + "type": "string", + "description": "Collection name." + }, + "adminIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Admin user or group IDs." + }, + "accessorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Accessor user or group IDs." + }, + "mediumCount": { + "type": "integer", + "format": "int32", + "description": "Number of media files in the collection." + }, + "createdAt": { + "type": "string", + "description": "Creation timestamp." + }, + "updatedAt": { + "type": "string", + "description": "Last update timestamp." } } } @@ -1467,21 +7540,24 @@ "name": "Authorization" } }, - "security": [{ - "API-Key": [] - }], + "security": [ + { + "API-Key": [] + } + ], "tags": [], - "x-ms-connector-metadata": [{ + "x-ms-connector-metadata": [ + { "propertyName": "Website", "propertyValue": "https://www.staffbase.com" }, { "propertyName": "Privacy policy", - "propertyValue": "https://staffbase.com/en/privacy-policy/" + "propertyValue": "https://staffbase.com/legal/privacy-policy" }, { "propertyName": "Categories", "propertyValue": "Communication;Human Resources" } ] -} +} \ No newline at end of file