Wiki

Clone wiki

iledocs / REST Services

As the whole software is made up of 3 main component the backend with its REST services is one component.

REST Endpoints

List all projects

Returning all projects by their names in a array.

["BlueDroplet","Reflection","STOMP","ArrayList"]

URL: GET /
HTTP Code: 200
Content-Type: application/json

Upload project information

Each project may have its own information with comments about the project, usage and examples.

URL: POST /{project} HTTP Code: 200, 400 Content-Type: application/json

Get project information

Returns the project information.

URL: GET /{project}
HTTP Code: 200 , 404
Content-Type: application/json

Delete project information

Deletes the project information. Depending on the frontend this may not result in the removal of the project from being displayed as there may be some modules with this project. There query parameter scope=full also removes all module documentation.

URL: DELETE /{project}
HTTP Code: 200
Query Parameter: scope=full

List all project modules

Returns a list of all modules for a specific project.

["stompext_amq_h.rpgle","stompext_h.rpgle","stompcmd_h.rpgle","stompframe_h.rpgle","stomp_h.rpgle"]

URL: GET /{project}/modules
HTTP Code: 200 , 404
Content-Type: application/json

Get program documentation

Returns the documentation of a specific program.

URL: GET /{project}/modules/{program}
HTTP Code: 200 , 404
Content-Type: application/json

Upload module documentation

Uploads the documentation of a specific program. Any previously uploaded documentation of this program will be overwritten.

URL: POST /{project}/modules/{program} HTTP Code: 200 , 400

Delete module documentation

Deletes the documentation from a specific program.

URL: DELETE /{project}/modules/{program}
HTTP Code: 200

Data Model

Project Info

{
    "project" : "Project",
    "title" : "Project Info Title",
    "description" : "The project information.",
    "date" : "31.01.2019",
    "author" : "Yourself",
    "infos" : [ "info" , "info" ],
    "warnings" : [ "warning" , "warning" ],
    "links" : [ { "url":"http://localhost" , "title":"Link title" } ],
    "deprecated" : "Deprecated information",
    "version" : "Project version number"
}

Required attributes: project, title, description.

Program

{
    "project" : "Project",
    "source" : "either file name or member name",
    "title" : "Program title",
    "description" : "Program description",
    "date" : "19.12.2020",
    "author" : "Mihael Schmidt",
    "infos" : [ "info" , "info" ],
    "warnings" : [ "warning" , "warning" ],
    "links" : [ { "url":"http://localhost" , "title":"Link title" } ],
    "deprecated" : "Deprecated information",
    "version" : "Project version number",
    "includes" : [ "copybook.rpgle" , "copybook.rpgle" ],
    "files" : [ { "name":"filename" , "description":"object description" } ],
    "variables" : [ variable , variable ],
    "procedures" : [ procedure, procedure ],
    "parameters" : [ variable, variable ],
    "constants" : [ { "name":"c1" , "description":"exact description of constant" } ],
    "escapeMessages" : [ escapeMessage , escapeMessage ],
    "revisions" : [ revision , revision ]
}

Required attributes: project, source, title, description.

The data model for variable, procedure, revision and escapeMessage is described below.

Procedure

{
    "project" : "Project",
    "source" : "either file name or member name",
    "title" : "Program title",
    "description" : "Program description",
    "date" : "19.12.2020",
    "author" : "Mihael Schmidt",
    "infos" : [ "info" , "info" ],
    "warnings" : [ "warning" , "warning" ],
    "links" : [ { "url":"http://localhost" , "title":"Link title" } ],
    "deprecated" : "Deprecated information",
    "version" : "Project version number",
    "exported" : true,
    "parameters" : [ variable, variable ]
    "returnValue" : variable,
    "escapeMessages" : [ escapeMessage , escapeMessage ],
    "revisions" : [ revision , revision ]
}

The project attribute does not need to be filled for a procedure. The variable for returnValue attribute does not need to have a name attribute.

The data model for variable, revision and escapeMessage is described below.

Variable

{
    "name" : "variable name",
    "description" : "Program description",
    "type" : "type",
    "length" : 10,
    "decimalPositions" : 0,
    "keywords" : [ "keyword" , "keyword" ],
    "like" : "template name",
    "exported" : true,
    "imported" : false
}

Type can have a value of:

Integer, Char, Varchar, Binary, PackedDecimal, ZonedDecimal, Float, Pointer, 
UnsignedInteger, Boolean, Date, Timestamp, Time, DataStructure, Graph, Object, UCS2

Revision

{
    "date" : "31.01.2021",
    "author" : "user",
    "description" : "description of the modification"
}

EscapeMessage

{
    "id" : "CPF9898",
    "description" : "description of the escape message"
}

Updated