Skip to main content

Compile

Compile

This method compiles source code files. It permits the compilation of more than one source code file at a time. It returns an array of corresponding source code file objects.

The list of files to be compiled is passed in the body of the http request as a JSON array. For example, [ "%Api.DocDB.cls", ... ].

For an example and additional details, refer to Compiling a File.

URL

POST https://<baseURL>/api/atelier/v1/namespace/action/compile

Where <baseURL> is the base URL for your instance.

This call requires the header Content-Type application/json.

URL Parameters

  • The URL parameter 'flags' can be passed (default "cuk") which will be passed to the compiler.

  • The URL parameter 'source' can be passed with a value of 0 if you don't want the source of the compiled source code file to be returned.

JSON Messages

The following is the returned content when compiling Atelier.NewClass1:

{
  "status": {
    "errors": [],
    "summary": ""
  },
  "console": [
    "Compilation started on 01/12/2016 17:44:00 with qualifiers 'cuk'",
    "Compiling class Atelier.NewClass1",
    "Compiling table Atelier.NewClass1",
    "Compiling routine Atelier.NewClass1.1",
    "Compilation finished successfully in 0.067s.",
    ""
  ],
  "result": {
    "content": [
      {
        "name": "Atelier.NewClass1.cls",
        "status": "",
        "content": [
          "Storage Default",
          "{",
          "<Data name=\"NewClass1DefaultData\">",
          "<Value name=\"1\">",
          "<Value>%%CLASSNAME</Value>",
          "</Value>",
          "</Data>",
          "<DataLocation>^Atelier.NewClass1D</DataLocation>",
          "<DefaultData>NewClass1DefaultData</DefaultData>",
          "<IdLocation>^Atelier.NewClass1D</IdLocation>",
          "<IndexLocation>^Atelier.NewClass1I</IndexLocation>",
          "<StreamLocation>^Atelier.NewClass1S</StreamLocation>",
          "<Type>%Storage.Persistent</Type>",
          "}",
          ""
        ],
        "db": "IRISSYS",
        "ts": "2016-01-12 17:44:00.053",
        "enc": false,
        "flags": 1
      }
    ]
  }
}

Errors pertaining to a source code file will be in the status property of each source code file object.

If compiling a persistent class causes the storage definition to change, the storage definition is returned as the content of a source code file object. Otherwise the result content will be empty.

HTTP Return Codes

  • HTTP 200 if OK.

  • HTTP 400 if the resource name is an invalid source code file name.

  • HTTP 404 if the resource is not found.

  • HTTP 423 if the source code file is locked.

  • HTTP 500 if an unexpected error occurred (details will be in status error array).

FeedbackOpens in a new tab