websIDE
  • webside
    • Overview
  • API
    • General
      • Dialect
      • Version
      • Colors
      • Logo
      • Stats
      • Themes
      • Icons
      • Save Image
    • Changes
      • Retrieve changes
      • Apply a change
    • Changesets
      • Convert chunks to JSON changes
      • Convert JSON changes to chunks
    • Code
      • Autocompletions
        • Retrieve autocompletions
      • Categories
        • Retrieve categories
        • Retrieve usual categories
      • Classes
        • Retrieve classes
        • Retrieve a class
        • Retrieve categories
        • Retrieve variables
        • Retrieve class variables
        • Retrieve instance variables
        • Retrieve selectors
        • Retrieve methods
        • Retrieve method
        • Retrieve method history
        • Retrieve subclasses
        • Retrieve superclasses
        • Retrieve used categories
      • Methods
        • Retrieve methods
      • Packages
        • Retrieve packages
        • Retrieve a package
        • Retrieve package classes
        • Retrieve package methods
      • Search
      • Selectors
        • Find selector in source code
      • Templates
        • Retrieve class template
        • Retrieve method template
    • Debuggers
      • Retrieve active debuggers
      • Create a debugger
      • Delete debugger
      • Retrieve debugger frames
      • Retrieve debugger frame
      • Retrieve frame bindings
      • Restart debugger
      • Resume debugger
      • Step into debugger
      • Step over debugger
      • Step through debugger
      • Terminate debugger
    • Evaluations
      • Retrieve evaluations
      • Evaluate an expression
      • Cancel evaluation
      • Retrieve evaluation
      • Pause evaluation
      • Resume evaluation
    • Extensions
      • Retrieve extensions
      • Changes extensions
      • Export extensions
      • Search extensions
    • Commands
      • Retrieve command definitions
      • Invoke commands
    • Objects
      • Retrieve pinned objects
      • Pin object
      • Retrieve pinned object
      • Retrieve pinned object slots
        • Custom views
      • Unpin an object
      • Unpin all objects
    • Processes
      • Retrieve active processes
    • Profilers
      • Retrieve active profilers
      • Create a new profiler
      • Delete a profiler
      • Retrieve a profiler
      • Retrieve profiler ranking results
      • Retrieve profiler tree results
    • Testing
      • Run tests
      • Retrieve test run status
      • Retrieve test run results
    • Workspaces
      • Retrieve active workspaces
      • Create a new workspace
      • Delete a workspace
      • Retrieve a workspace
      • Update a workspace
      • Retrieve workspace bindings
Powered by GitBook
On this page
  • API
  • IDs
  • Sections
  • General
  • Code
  • Changes
  • Changesets
  • Evaluations
  • Objects
  • Workspaces
  • Debuggers
  • Testing
  • Profiling
  • Extensions
  • Commands

API

PreviousOverviewNextGeneral

Last updated 2 months ago

API

Webside is based on a Smalltalk system implementing the following web API.

It's worth mentioning that this API is not "pure" REST at the moment of writing this documentation. However, extending it to be a REST-full API could bring some benefits to both Webside and other potential consumers interested in inspecting or controlling a Smalltalk system through HTTP. Of course, such a change would require upgrading Webside and this documentation accordingly.

The implementation of API calls, including helper services, is centralized in a class called .

IDs

Resources are identified by a unique ID. The production of these IDs rely on the backend implementation and may vary from dialect to dialect. The only requirement is that they should be unique. For the sake of simplicity, they will be 1, 2, etc. along this documentation.

Sections

These are the different sections of the API.

Note: URL path does not include the base URI. The base URI targeting a particular Smalltalk system will be prompted at the moment of opening Webside.

These are general endpoints that apply to the system as a whole.

Method
Path
Description
Parameters
Payload

GET

Retrieve the Smalltalk dialect

-

GET

Retrieve system version

-

GET

Retrieve system colors

-

GET

Retrieve system logo

-

GET

Retrieve system stats

-

GET

Retrieve custom themes

-

GET

Retrieve system icons

-

POST

Save the image

-

These are the endpoints used to retrieve system code: packages, classes and methods.

Method
Path
Description
Parameters
Payload

GET

Retrieve methods satisfying the condition specified in the query (or all the methods in the system if no condition is provided)

selector, category, accessing, using, assigning, sending, referencingClass, selectorMatching, ast, annotations, bytecodes, dissasembly, count

-

GET

Retrieve all subclasses of a given root class (if no root is provided, the uppermost class in the system is used). It is also possible get a tree-like structure as well as to limit the depth in the classes hierarchy

root, names, tree, depth, category

-

GET

Retrieve a given class

-

-

GET

Retrieve superclasses a given class

-

-

GET

Retrieve subclasses a given class

-

-

GET

Retrieve instance and class variables of a given class

-

-

GET

Retrieve instance variables of a given class

-

-

GET

Retrieve class variables of a given class

-

-

GET

Retrieve categories of a given class

-

-

GET

Retrieve categories used throughout the hierarchy of a given class

-

-

GET

Retrieve selectors of a given class

-

-

GET

Retrieve methods of a given class

-

-

GET

Retrieve the method with the given selector in the given class

-

-

GET

Retrieve all categories in the system

-

-

GET

Retrieve popular categories used throughout the system

-

-

GET

Retrieve all packages

names

-

GET

Retrieve a given package

-

-

GET

Retrieve actual classes of a given package

extended, tree, names, category

-

GET

Retrieve actual methods of a given package

-

-

GET

Perform a search on the system

text, ignoreCase, position, type

-

GET

Retrieve completion entries for a given code, position and context

-

-

GET

Provide a class template

package

-

GET

Provide a method template

-

-

POST

Find a selector in a piece of source code

-

-

Endpoints to apply changes and retrieve changes made to the system.

Method
Path
Description
Parameters
Payload

GET

Retrieve changes made to the system

author

-

POST

Apply a change to the system

-

change

GET

Retrieve historical changes on a given method

-

-

For the sake of simplicity, the API encourages the use of a single endpoint /changes for applying any change to the system. However, as this may imply to count on some implementation of refactoring changes on the backend (and might not be the case), a basic set of CRUD operations on main meta-model objects should be provided. The data required for these operations should be the same as the one provided for the corresponding changes.

Method
Path
Description
Parameters
Payload

POST

Add a new package

-

package

DELETE

Remove a given package.

-

-

POST

Define a new class or change the definition of an existing one.

-

class

DELETE

Remove a given class.

-

-

POST

Compile a method in a given class.

-

method

DELETE

Remove a given method.

-

-

Endpoints to convert changesets (chunks file) to/from changes.

Method
Path
Description
Parameters
Payload

POST

Convert a set of changes (JSON) into a chunk formatted-file

-

[change]

POST

Convert a chunk-formatted file into a set of changes (JSON)

-

string

Endpoints to evaluate expressions and manage active evaluations.

Method
Path
Description
Parameters
Payload

POST

Evaluate an expression

-

evaluation

GET

Retrieve active evaluations

-

-

GET

Retrieve the evaluation with a given ID

-

-

DELETE

Cancel the evaluation with a given ID

-

-

POST

Pause the evaluation with a given ID

-

-

POST

Resume the evaluation with a given ID

-

-

Endpoints to retrieve the objects in the system, either globally accessible or as the result of evaluating an expressions.

Method
Path
Description
Parameters
Payload

GET

Retrieve pinned objects

-

-

GET

Retrieve the pinned object with a given ID

-

-

DELETE

Unpin the object with a given ID

-

-

GET

Retrieve the object reached thru the given URI

-

-

POST

Pin the object reached thru the given URI

-

object URI

DELETE

Unpin all pinned objects

-

-

Endpoints to manage workspaces.

Method
Path
Description
Parameters
Payload

GET

Retrieve active workspaces

-

-

POST

Create a new workspace

-

-

GET

Retrieve the workspace with a given ID

-

-

PUT

Update the workspace with a given ID

-

-

DELETE

Delete the workspece with a given ID

-

-

GET

Retrieve bindings of the workspece with a given ID

-

-

Endpoints to manage debuggers and interact with them.

Method
Path
Description
Parameters
Payload

GET

Retrieve open debuggers

-

-

POST

Create a debugger upon an given process (evaluation)

-

evaluation

GET

Retrieve frames of the debugger with a given ID

-

-

GET

Retrieve the i-th frame withing the debugger with a given ID

-

-

GET

Retrieve the bindings of the i-th frame withing the debugger with a given ID

-

-

POST

Step over the current sentence in the debugger with a given ID

-

-

POST

Step through the current sentence in the debugger with a given ID

-

-

POST

Step into the current sentence in the debugger with a given ID

-

-

POST

Restart the debugger with a given ID

-

-

POST

Resume the process of the debugger with a given ID

-

-

POST

Terminate process being debugged and closesthe debugger with a given ID

-

-

DELETE

Closes the debugger with a given ID (terminating the process being debugged)

-

-

Endpoints to run tests and retrieve their results.

Method
Path
Description
Parameters
Payload

POST

Create and run of a test suite

-

suite

GET

Retrieve the status of a given test suite run

-

-

GET

Retrieve the restuls of a given test suite run

-

-

POST

Re-run a given test suite

-

-

POST

Debug a test withing a test suite run

-

-

POST

Stop an active test suite run

-

-

DELETE

Delete a test suite run

-

-

Endpoints to manage profilers and access their results.

Method
Path
Description
Parameters
Payload

POST

Create a new profiler on a given expression

-

expression

GET

Retrieve active profilers

-

-

GET

Retrieve the profiler with a given ID

-

-

GET

Retrieve a tree-like results of a given profiler

-

-

GET

Retrieve ranked results of a given profiler

-

-

DELETE

Delete a given profiler

-

-

Retrieve IDE extensions defined by the backend.

Method
Path
Description
Parameters
Payload

GET

Retrieve list of extensions

-

-

Retrieve definitions and process commands.

Method
Path
Description
Parameters
Payload

GET

Retrieve command definitions

-

-

POST

Process a command

command

-

API
General
Code
Changes
Basic CRUD operations
Changesets
Evaluations
Objects
Workspaces
Debuggers
Testing
Profiling
Extensions
Commands
/dialect
/version
/colors
/logo
/stats
/themes
/icons
/save
/methods
/classes
/classes/{name}
/classes/{name}/superclasses
/classes/{name}/subclasses
/classes/{name}/variables
/classes/{name}/instance-variables
/classes/{name}/class-variables
/classes/{name}/categories
/classes/{name}/used-categories
/classes/{name}/selectors
/classes/{name}/methods
/classes/{name}/methods/{selector}
/categories
/usual-categories
/packages
/packages/{name}
/packages/{name}/classes
/packages/{name}/methods
/search
/autocompletions
/classtemplate
/methodtemplate
/selectors
/changes
/changes
/classes/{name}/methods/{selector}/history
/packages
/packages/{name}
/classes
/classes/{name}
/classes/{name}/methods
/classes/{name}/methods/{selector}
/changesets/download
/changesets/upload
/evaluations
/evaluations
/evaluations/id
/evaluations/id
/evaluations/id/pause
/evaluations/id/resume
/objects
/objects/{id}
/objects/{id}
/objects/{id}/*
/objects
/objects
/workspaces
/workspaces
/workspaces/{id}
/workspaces/{id}
/workspaces/{id}
/workspaces/{id}/bindings
/debuggers
/debuggers
/debuggers/{id}/frames
/debuggers/{id}/frames/{index}
/debuggers/{id}/frames/{index}/bindings
/debuggers/{id}/stepover
/debuggers/{id}/stepthrough
/debuggers/{id}/stepinto
/debuggers/{id}/restart
/debuggers/{id}/resume
/debuggers/{id}/terminate
/debuggers/{id}
/test-runs
/test-runs/{id}
/test-runs/{id}/results
/test-runs/{id}/run
/test-runs/{id}/debug
/test-runs/{id}/stop
/test-runs/{id}
/profilers
/profilers
/profilers/{id}
/profilers/{id}/tree
/profilers/{id}/ranking
/profilers/{id}
/extensions
/command-definitions
/commands