ImportProcess

Description: Imports a specified PRCX file into the Rulex Server. The PRC file to be imported can either be provided in JSON plain text or as a form-data pair.

URL/importProcess

Method: POST

Header: You must provide the authentication token in the header, using the following syntax:

{ 
	Authorization : "Bearer" +" "+ token 
}


JSON parameters

In JSON the following parameters are accepted:

Name

Data Type

Mandatory

Default Value

Description

label

string

(tick)

n/a

The name you want to give to the process.

overwrite

boolean

(error)

False

Set to true to overwrite existing Rulex processes with the same label.

The body of the text must be as follows:

JSON
{ 
	process : { 
		encoding : "base64", 
		data : "cV028GRmrtyJTgreTw7HDpsOaKQT..." 
	},
	label : prc label
}


Form-data parameters

In the form-data key value pair, the "key" name is process followed by the prcx file as value, and the following parameters are accepted:

Name

Data Type

Mandatory

Default Value

Description

overwrite

boolean

(error)

False

Set to true to overwrite existing Rulex processes with the same label.

label

string

(error)

label extracted from prcx filename

The name you want to give to the process.

The header has the following format:

Form-data Header
{ 
	Content-Type : "application/ 
	x-www-form-urlencoded" 
}


Response Codes

Code

Result

Response

Success

200

Success

Warnings

307

Temporary redirect

{ 
	resultUrl : url 
}

Client errors

400

Bad request

404

Not found

409

Conflict - Error that occurs when there is already a process with the same name

415

Unsupported Media Type