Entity - InstructionSets - handles instruction set management

Page version: 12, last updated:

Minimum API version 3.1 



VerbRequestNotesPermissions required
GET/Consumer/InstructionSets/

Returns all instruction sets

Return payload
[{
	"Id" : 1
	"Name" : "MyFirstGroup",
	"Description" : "somegroup",
	"Icon" : []
},
{
	"Id" : 2
	"Name" : "MyOtherGroup",
	"Description" : "someothergroup",
	"Icon" : []
}]
'Read' on instruction set management
GET/Consumer/InstructionSets/IncludeCounts

Returns all instruction sets and also includes the number of instructions assigned to each set

Return payload
[{
	"Id" : 1
	"Name" : "MyFirstGroup",
	"Description" : "somegroup",
	"Icon" : [],
        "CountOfDefinitions": 194
},
{
	"Id" : 2
	"Name" : "MyOtherGroup",
	"Description" : "someothergroup",
	"Icon" : [],
        "CountOfDefinitions": 0
},
{
        "Id": null,
        "Name": "Unassigned",
        "Description": "Instruction definitions not assigned to a set",
        "Icon": null,
        "CountOfDefinitions": 9
}]

 Note the last entry, Id=null, which reports the total number of instruction definitions that have not been assigned to any set.

 

'Read' on instruction set management
GET/Consumer/InstructionSets/Id/{id}

Returns instruction set by Id

Return payload
{
	"Id" : 1
	"Name" : "MyFirstGroup",
	"Description" : "This is my first group",
	"Icon" : []
}
'Read' on instruction set management
GET/Consumer/InstructionSets/Name/{name}

Returns instruction set by name

Payload as above

'Read' on instruction set management
POST/Consumer/InstructionSets/

Creates a new instruction set

Payload
{
	"Name" : "",
	"Description" : "",
	"Icon" : []
}

Note - icon is in binary form

'Add' on instruction set management
PUT/Consumer/InstructionSets/

Modifies an existing instruction set

Payload same as for the POST method above

'Add' on instruction set management
DELETE/Consumer/InstructionSets/Id/{id}?deleteContent={true/false}

Deletes an instruction set with a specific Id.

All instruction definitions that belong to that set will become 'unassigned' unless you specify 'true' on the optional deleteContent flag..

OPTIONAL - you can add deleteContent parameter to the query string. If this parameter is set to true all instruction definitions that belong to the set being deleted will be deleted as well.

NOTE - This operation will fail if any of the instruction definition being affected have pending instructions.

'Delete' on instruction set management
GET/Consumer/InstructionSets/Id/{id}/ExportExports all instructions in a given set to a zip file which will contain each definition in a separate xml file. This Zip file can be uploaded as as product pack'Read' on instruction set management
POST/Consumer/InstructionSets/Contents

Adds given instruction definitions to a specific instruction set

Payload
{
	"SetId": 0,
	"InstructionDefinitionIds" : [0,1,2,...]
}

SetId can be a valid Instruction Set Id or null, which means 'unassigned'.

InstructionDefinitionIds array had to contain valid instruction definition Ids.

None of the instruction definitions can have in-flight instructions.

'Add' on instruction set management
DELETE/Consumer/InstructionSets/Contents

Removes given instruction definitions from a specific instruction set.

Payload is the same as in the Add method above.

SetId has to be a valid Instruction Set Id.

'Delete' on instruction set management
DELETE/Consumer/InstructionSets/Id/{id}/Clear

Removes all instruction definitions from given set.

This does not delete the set itself or any of the instruction definitions. The set becomes empty and all instruction definitions become 'unassigned'

NOTE - This operation will fail if any of the instruction definition being affected have pending instructions.

'Read' on instruction set management