Przejdź do głównej zawartości

Utwórz lub zastąp skrypt automatyczny

PUT
/api/v3/automaticScripts/{id}
curl --request PUT \
--url https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v3/automaticScripts/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "body": "example", "groupId": 1, "inputDataSchema": "example", "type": "AutomaticScript", "priority": 1, "delaySeconds": 1, "inputUiSchema": "example", "inputDataDefaultsScriptId": 1 }'

Tworzy skrypt o podanym identyfikatorze lub nadpisuje istniejący. Operacja asynchroniczna – zwraca zadanie.

id
wymagane
integer format: int64

Id of the automatic script to update.

Automatic script to create or update.

Request for updating the automatic script.

object
name

Name of the automatic script. Given by user.

string
nullable
body

Body of the automatic script. Written by user.

string
nullable
groupId

The id of the group the script belongs to.

integer format: int64
inputDataSchema

The input data JSON Schema

nullable
type

Type of the script used to determine the kind of UI used for display

string
Dozwolone wartości: AutomaticScript AutomaticAction
priority

Priority of the script, the higher the number the higher the priority.

integer format: int64
delaySeconds

Delay in seconds - how long to wait before executing the script.

integer format: int64
inputUiSchema

(absent ⇒ property omitted)

nullable
inputDataDefaultsScriptId

(absent ⇒ property omitted)

integer format: int64
nullable

Success

object
id
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
payload
nullable
result
nullable
status
string
Dozwolone wartości: New InProgress Completed Failed
command
string
nullable

Bad Request

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