Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P Portal-api
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • doc
  • Portal-api
  • Wiki
  • App API

Last edited by Jurjen Brouwer May 02, 2022
Page history

App API

Actions

Create

Create a new app for the user that has authenticated itself.

https://portal.robotsindeklas.nl/API/v1/app/create

Parameters:

  • name - string: the new name of the app
  • type - string: the type of the app. Currently available:
    • blocklykids: a simple basic app where most of the programming blocks consist out of icons;
    • presentation: an advanced app where you could create presentations;
    • code: an advanced+ app where you could learn how to use functions and variables;
    • calc: practice math exercises with the robot;
    • agenda: with the agenda app, you can let the robot say certain reminders at a pre-defined time.

Info

Get the document of a particular app.

https://portal.robotsindeklas.nl/API/v1/app/info

Parameter:

  • app - string: the object id of the app you want the info of.

Copy

Create a copy of an existing app.

https://portal.robotsindeklas.nl/API/v1/app/copy

Parameters:

  • app - string: the object id of the app you want to copy;
  • name - string - (optional, default: name of the original app): the new name of the copied app.

Lock

Lock an app. If an app is locked, users with play or edit share rights will no longer have access to the content of the app.

https://portal.robotsindeklas.nl/API/v1/app/lock

Parameters:

  • app - string: the object id of the app you want to lock;
  • lock - boolean - (optional, default: false): lock (true) or unlock (false) this app.

Share

Share an app with a user or group. We define four levels of share rights:

  • 0 (revoked rights): user or group will no longer have access to this app;
  • 1 (play rights): user or group will be able to only play this app, but not edit it or share it further with other users;
  • 2 (edit rights): user or group will be able to play and edit this app, but won't be able to share it further with other users;
  • 3 (admin rights): user or group will be able to play, edit and share this app with other users.
https://portal.robotsindeklas.nl/API/v1/app/share

Parameters:

  • app - string: the object id of the app you want to share;
  • level - integer: the share level we want to assign to the user or group with this request;
  • oid - string: the object id of the user or group we want the share this app with.

Trash

Remove an app or bring it back from the trash bin.

https://portal.robotsindeklas.nl/API/v1/app/trash

Parameters:

  • app - string: the object id of the app we want to trash;
  • del - boolean: delete (true) or restore (false) deleted item.

Send

Send a copy of an app to another user.

https://portal.robotsindeklas.nl/API/v1/app/send

Parameters:

  • app - string: the object id of the app we want to send;
  • send - array<string>: the object id of the user or group we want the send a copy of the app to.

Assign

Assign a basic (basis) program to a set of users or groups. When assigning a basic program, the users receiving the app will be able to make the assignment but not see the answer.

https://portal.robotsindeklas.nl/API/v1/app/assign

Parameters:

  • app - string: the object id of the app we want to assign;
  • oid - string: the id of a user or group we want to assign this app to;
  • assign - boolean: assign or remove assignment.

Link

Link an agenda to a robot.

https://portal.robotsindeklas.nl/API/v1/app/link

Parameters:

  • app - string: the object id of the app we want to link;
  • rid - string: the robot id we want to link this app with;
  • link - boolean: link (true) or de-link (false).

List

Get a list of apps the user has access to.

https://portal.robotsindeklas.nl/API/v1/app/link

Parameters:

  • filter - dictionary: a dictionary containing the following keys to further define the search parameters:
    • search - string - (optional, default: ""): search in the description and the name for a specific keyword;
    • sort - string - (optional, default: ""): sort the result based on name (the name of the app), edit (last edit date) or create (creation date);
    • owner - string - (optional, default: "user"): search either through my apps with: user or shared apps with the value: shared;
    • folder - string - (optional, default: ""): only search through a specific folder using the id of the folder;

Response

If the request was successful, you will receive the following response:

Model:

{
  '_id': ObjectId - The id of the app
  'name': String - The name of the app, visible in the portal
  'type': String - The type of the app
  'info': String - Additional info describing this app
  'tags': Array - An array of tags describing this app
  'owner': ObjectId - The user id of the user who owns the app 
  'author': ObjectId - The user id of the user who created the app 
  'locked': Boolean - Is the app locked
  'access': Integer - The access level you have over this app
}

Example:

{
  '_id': {
    '$oid': '626115b4e69c43478560325e'
  }, 
  'name': 'Demo app API', 
  'type': 'code', 
  'info': 'Example app', 
  'tags': ['Programming'], 
  'owner': {'$oid': '62611595f9d60d94226223'}, 
  'author': {'$oid': '62611595f9d60d94226223'}, 
  'locked': False, 
  'access': 2
}
Clone repository
  • App API
  • Folder API
  • Group API
  • Robot API
  • User API
  • Home