Cloud Light

For simplified data processing in Compute service, you can use the pre-configured builds deployed by Edifecs for you. Contact Edifecs support to get the endpoints' URLs to submit data to.

The Cloud Light Service profile has the following endpoints:

  • .../convert/: The endpoint converts XData and JData to the Native format. By default, the endpoint also validates the input files and generates reports in case the validation fails.
  • .../docs/openapi.json: The endpoint returns the Cloud Light API specification in the JSON format.
  • .../translate/: The endpoint converts source EDI files to the target format according to the map file.
  • .../validate/: The endpoint validates EDI files and generates reports.

For comprehensive configuration descriptions, refer to the Cloud Light API specification.

Authorization

To access the endpoints, you have to create an application user and share its name (for example, cloud-light.app@organization) with Edifecs.

For your requests to be authorized, they must contain your application user's credentials (CLAPP token) in headers (click here for instructions on how to download the file with application user token). The following is an example from the Cloud Light API specification:

Copy

Example

"header": [
 {
   "key": "Authorization",
   "value": "CLAPP EA5t6EzbAl71vGbpREwxU...5cIeyuvwc1i2n7",
   "type": "text"
  }

API specification

To get the Cloud Light API specification in the JSON format, send a GET request to the endpoint .../docs/openapi.json.

Sending data

To send data for processing, make a POST request to the endpoint. The request body must contain the two parts in the following order:

  • taskConfig: A configuration file in the JSON format that describes processing modes, formats, and so on. For example:
  • Copy
    validation-config.json
    {
     "processingModes": ["SPLITTING", "VALIDATION"],
     "acknowledgements": ["XDATA"],
     "reports": {
       "AUDIT": {
         "formatSet": ["HTML"]
       },
       "LDNS": {
         "formatSet": ["HTML"]
       }
     }
    }

  • inputDataFile: Your data file to be processed.

The following is an HTTP request example:

Copy

Example

POST /io/endpoints/40eccccccf56fec7c6ac66ccc797bb3b/v1/validate/ HTTP/1.1
Host: compute.sandbox.kollab.link
Authorization: CLAPP EAsMojj3M9AU0fjOO90oP7KLv4LTchzPXU0t6/NzlAnDj512w8U0RswSDKHWtGqqftaflB
Content-Length: 534
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="taskConfig"; filename="/C:/Edifecs/XEServer/profiles/Cloud Light API/config/validation-config.json"
Content-Type: application/json

(data)
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="inputDataFile"; filename="/C:/Edifecs/XEServer/data/native/5010_835_x221_A1.dat"
Content-Type: application/oсtet-stream

(data)
----WebKitFormBoundary7MA4YWxkTrZu0gW

Results

In the response, you receive a .zip archive with a processed data file, reports, acknowledgments, and so on.