Przejdź do głównej zawartości

Wywołaj skrypt jako funkcję HTTP (POST)

POST
/api/v1/automaticScripts/{id}/runAsHttpFunction
curl --request POST \
--url https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v1/automaticScripts/1/runAsHttpFunction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "additionalProperty": {} }'

Uruchamia skrypt automatyczny jak endpoint HTTP i przekazuje mu treść żądania (JSON). Pozwala wywoływać skrypty z zewnętrznych systemów, np. jako odbiorcę webhooków.

id
wymagane
integer format: int64

Id of the script to start.

Parameters of the run. They will be passed to the script in object with name data.

object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
Examplegenerated
{
"additionalProperty": {}
}

Success

integer format: int64

Bad Request

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties

Not Found

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties