Recipe JSON Format
  • 29 May 2024
  • Dark
    Light
  • PDF

Recipe JSON Format

  • Dark
    Light
  • PDF

Article summary

You can import and export Labels & attributes in the recipe in JSON format. It allows:

  • Saving a backup of your recipe
  • Uploading to new datasets and projects
  • Preparing it outside the Dataloop platform
  • Automating its import.

Recipe JSON Format

{"id":"62dcd88a746376c0d3aa4828",
"creator":"user@dataloop.ai",
"title":"example-ontology",
"roots":
    [
    {"value":
        {"tag":"Label-1",
        "displayLabel":"Label-1",
        "color":"#ff0000",
        "attributes":[],
        "displayData":{}},
        "children":[
            {"value":{"
		        tag":"sub1",
	        	"displayLabel":"sub1",
		        "color":"#f0809a",
		        "attributes":[],
		        "displayData":{}},
		        "children":[]},
	        {"value":{"
		        tag":"sub2",
		        "displayLabel":"sub2",
		        "color":"#154676",
		        "attributes":[],
		        "displayData":{}},
		        "children":[]}]},
     {"value":
        {"tag":"Label-2",
        "displayLabel":"Label-2",
        "color":"#00ff4a",
        "attributes":[],
        "displayData":{}},
        "children":[]},
   {"value":
        {"tag":"Label-3",
        "displayLabel":"Label-3",
        "color":"#9500ff",
        "attributes":[],
        "displayData":{}},
        "children":[]},
   {"value":
        {"tag":"Label-4",
        "displayLabel":"Label-4",
        "color":"#ffdf00",
        "attributes":[],
        "displayData":{}},
        "children":[]}
   ],
"metadata":
    {"system":  
        {"projectIds":["f2278c37-b967-4326-af7c-b8245264e826"],
        "system":false},
        "attributes":[
            {"key":"1",
                "type":"options",
                "scope":["*"],
                "values":["Att1a","Att1b","Att1c"],
                "scriptData":{
                    "scope":"@ontology.sections.1.scope",
                    "title":"Attribute-1",
                    "key":"1",
                    "optional":true,
                    "multi":true}},
          {"key":"2",
                "type":"options",
                "scope":["*"],
                "values":["Att2a","Att2b","Att2c"]
                ,"scriptData":{
                    "scope":"@ontology.sections.2.scope",
                    "title":"Attribute-2",
                    "key":"2",
                    "optional":true,
                    "multi":false}},
         {"key":"3",
               "type":"range",
            "scope":["Label-1","Label-2"],
            "range":{"min":0,"max":1,"step":0.1},
            "scriptData":{
                    "scope":"@ontology.sections.3.scope",
                    "title":"Attribute-3","key":"3",
                    "optional":true,"multi":true}},
       {"key":"4",
            "type":"boolean",
            "scope":["*"],
            "scriptData":{
                "scope":"@ontology.sections.4.scope",
                "title":"Attribute-4",
                "key":"4","optional":true,
                "multi":true}},
      {"key":"5",
            "type":"freeText",
            "scope":["Label-3","Label-4"],
            "scriptData":{
                "scope":"@ontology.sections.5.scope",
                "title":"Attribute5-Text",
                "key":"5",
                "optional":true,
                "multi":true}}
               ]
       },
"attributes":null}

Recipe JSON Fields Description

Key NameDefinitionParent Key
idItem/image IDN/A
datasetIdDataset IDN/A
createdAtTime and date the item/image was uploadedN/A
dirImage location directory in datasetN/A
filenameItem/image full pathN/A
typeItem typeN/A
hiddenSystem propertyN/A
metadataThis key holds all of the item's informationN/A
systemThis key holds all of the item's system informationmetadata
originalnameOriginal item's name when createdsystem
sizeImage size in bytessystem
encodingencodingsystem
mimetypeMedia typesystem
taskStatusLogList of item statuses in given taskssystem
statusInformation about the status of the item in a given tasktaskStatusLog
taskIdTask idstatus
assignmentIdAssignment idstatus
statusThe status of the item in this taskstatus
creatorCreator of the statusstatus
timestampWhen the task status was createdstatus
actionThe action (created/deleted) on the status of this itemtaskStatusLog
refsTask assignment list referencesystem
typetask or assignmentrefs
idID of the task/assignment that the item is linked withrefs
metadataInformation about the item in this task/assignmentrefs
creatorUsername of the creator of the status of the item in this task/assignmentmetadata
statusStatus of this item in this task/assignment – completed/discard/complete/custom status created by the task creator (this attribute will not show if no status has been created yet)metadata
timestampDate and time when the status was createdmetadata
isBinaryIs the item a binary filesystem
executionLogsInformation about executions the item went throughsystem
image-preprocessInformation about preprocess the item went through (e.g., export metadata)executionLogs
default-moduleName of the moduleimage-preprocess
on_createName of the functiondefault-module
61d5eb9da833ff954bdb16e4Execution IDon_create
statusExecution progress61d5eb9da833ff954bdb16e4
progressExecution status61d5eb9da833ff954bdb16e4
pipeline-utilsFaaS name (as seen in application hub library)executionLogs
default_moduleApp module namepipeline-utils
move_to_taskFunction namedefault_module
61d5eb9da833ff1cabdb16faExecution of the move_to_task functionmove_to_task
statusThe status of the execution61d5eb9da833ff1cabdb16fa
progressThe progress of the execution61d5eb9da833ff1cabdb16fa
channelsImage color dimensions (1 black and white; 3 color (rgb); 4 with transparency effect)system
exif[exif](https://docs.dataloop.ai/docs/exif-orientation-value){target="_blank"} informationsystem
heightImage resolutionsystem
thumbnailAnnotationsIdThumbnail Annotation idsystem
thumbnailIdThumbnail idsystem
widthImage resolutionsystem
nameUpdated item nameN/A
urlAPI URL for itemsN/A
datasetAPI URL for datasetN/A
creatorItem creatorN/A
annotationsCountNumber of annotationsN/A
annotatedTrue shows that the item is annotatedN/A
streamAPI URL for streamN/A
thumbnailAPI URL for thumbnailN/A
annotationsInformation about annotationsN/A