Resources

Add/Update resource

Add or update (if any resource with given resource guid is found) the posted resource.
 
URL:
POST http://api.aurelon.com/api/v2/resource
 
Request Headers:
Content-Type : multipart/form-data
MisKey : see Authentication
HardwareHash : see Authentication
SerialNumber : see Authentication
ApplicationVersion : see Authentication
Timestamp : ISO format UTC time.
The modification date/time of the resource like “2018-11-01T08:41:34Z”. When the Timestamp is not provided than ‘now’ is assumed. The timestamp is compared against the timestamp of the resource in the cloud store. Only newer resources are accepted.
 
Request Body:
Form data 1: required

    • Name: JsonString
    • Content-Type: application/json
    • JSON object containing:
    • ResourceGUID – required – the Resource GUID
    • ResourceChecksum – required – SHA1 checksum of the resource in upper-case format.

 

  • ResourceType – required
    • the type of the resource
    • known resource type: “NormalProfile”, “DefectProfile”, “FotobaMarks”, “Label”, “ColorMapping”, “Template”, “LayoutTemplate”, “Library”, “Preview”
    • resource type can be a custom value
    • if resource type is not specify the resource type is set as “Generic”
  • Meta – JSON object containing the metadata about the resource;
  • MediaType – required for “NormalProfile” – the Media tag from the PMM.
  • ProfileGroup – required for “NormalProfile” – the ProfileGroup tag from the PMM
  • Name – required

Form data 2: required

  • Name: Name of the resource, any name allowed
  • Content-Type: application/octet-stream
  • Binary content of the resource
  • Only one file accepted

 
Response:
Content type of the response is in JSON format
 
Success:

  • 200 OK : “Resource successfully added”

 
Error:

  • 401 Unauthorized : {“Message”:”Invalid HardwareHash”}
  • 401 Unauthorized : {“Message”:”Invalid MisKey”}
  • 415 Unsupported Media Type : {“Message”:”This request is not properly formatted”}
  • 401 Unauthorized : {“Message”: “”MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header are required”}
  • 400 Bad Request : {“Message”:”No input file specified”}
  • 400 Bad Request : {“Message”:””ResourceGUID”, “ResourceChecksum” and  “ResourceType” are required”}
  • 400 Bad Request : {“Message”:”Validation of Timestamp failed”}
  • 500 Internal Server Error : {“Message”:”Internal Server Error”}

 

Get Resource

Get the resource file
 
URL:
GET http://api.aurelon.com/api/v2/resource/<ResourceGUID>
 
Request Headers:
MisKey : see Authentication
HardwareHash : see Authentication
SerialNumber : see Authentication
ApplicationVersion : see Authentication
 
Response:
Return the resource file specify in command as content type application/octet-stream
 
Success:

  • 200 OK : Resource file binary stream

 
Error:

  • 401 Unauthorized : {“Message”: “Invalid MisKey”}
  • 401 Unauthorized : {“Message”:”Invalid HardwareHash”}
  • 404 Unauthorized : {“Message”:”ResourceGUID not found”}
  • 401 Unauthorized : {“Message”: “”MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header required”}
  • 500 Internal Server Error : {“Message”:”Internal Server Error”}

Delete resource

Delete the resource with given resource GUID.
 
URL:
DELETE http://api.aurelon.com/api/v2/resource/<ResourceGUID>
 
Request Headers:
MisKey : see Authentication
HardwareHash : see Authentication
SerialNumber : see Authentication
ApplicationVersion : see Authentication
 
Response:
Content type application/json containing the result of the operation.
 
Success:

  • 200 OK : “Resource successfully deleted”

 
Error:

  • 400 Bad Request : {“Message”:””ResourceGUID” value required”}
  • 400 Bad Request : {“Message”:”Resource still in use”}
  • 401 Unauthorized : {“Message”:”Invalid HardwareHash”}
  • 401 Unauthorized : {“Message”:”Invalid MisKey”}
  • 401 Unauthorized : {“Message”: “”MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header are required”}
  • 404 Not Found : {“Message”:”ResourceGUID is not found”}
  • 500 Internal Server Error : {“Message”:”Internal Server Error”}

 

List resources

Get a filtered list of all the resources in the organization
 
URL:
POST http://api.aurelon.com/api/v2/resource/list
 
Request Headers:
Content-Type : application/json
MisKey : see Authentication
HardwareHash : see Authentication
SerialNumber : see Authentication
ApplicationVersion : see Authentication
 
Request Body:
JSON object containing the type to filter on:

  • ResourceTypes – required – an array with one or more of the following types (*,NormalProfile, DefectProfile, FotobaMarks, Label, ColorMapping, Template, LayoutTemplate, Library, Preview). When * is used then all resources are listed.
  • Domain – optional – Domain to query, allowed values Private and Public. Default if Private when not specified.

 
Ex:
{“ResourceTypes”:[“Label”,”Template”]}
 
Response:
Return the company resources filtered by request body filter. The list is a packed array of arrays. Each item in the array as a resource represented by an array of 4 elements.
Packed method is used to save space in the transfer. The following 4 elements are presented in the following order:

  1. ResourceGUID
  2. ResourceType
  3. SHA1 checksum
  4. Name

 
Success:

  • 200 OK : Return resource list

[
 [“88de5c02-cce6-411f-950f-be309caa4439″,”Label”,”acox3″,”MyName”],
 [“1cb6e329-d001-4aff-970e-7cfaf025f27b”,”Label”,”1r3ff”,”Ticket”],
 [“267437af-459b-4b9d-8ace-5d52658c4626″,”Template”,”erffeff”,”MyTmp”]
]
 
Error:

  • 401 Unauthorized : {“Message”:”Invalid HardwareHash”}
  • 401 Unauthorized : {“Message”:”Invalid MisKey”}
  • 401 Unauthorized : {“Message”: “”MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header are required”}
  • 415 Unsupported Media Type : {“Message”:”Expected type: application/json”}
  • 500 Internal Server Error : {“Message”:”Internal Server Error”}

 

Get Resource Info  

Get the resource file basic info for synchronization purposes
 
URL:
GET http://api.aurelon.com/api/v2/resource/info/<ResourceGUID>
 
Request Headers:
MisKey : see Authentication
HardwareHash : see Authentication
SerialNumber : see Authentication
ApplicationVersion : see Authentication
 
Response:
Return the resource information in JSON format
 
Success:

  • 200 OK : JSON formatted resource information. ResourceGUID, ResourceChecksum, ResourceType, Timestamp, Meta and Meta.Name are always available.
    {“ResourceGUID”: “”
    “ResourceChecksum”: “CF837A01C1F0342B121911A4FE17449D6B463310”,
    “ResourceType”: “NormalProfile”,
    “Timestamp”: “2018-11-01T08:41:34Z”,
    “Domain”: “Private”,
    “Meta”: {
      “Name”: “Media > Mode”,
      “ProfileGroup”: “PDF”,
      “Media”: “Paper”,
      “Mode”: “600dpi”
    }

 
Errors:

  • 401 Unauthorized : {“Message”:”Invalid MisKey”}
  • 401 Unauthorized : {“Message”:”Invalid HardwareHash”}
  • 401 Unauthorized : {“Message”:””MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header required”}
  • 401 Unauthorized : {“Message”:”ResourceGUID no access”}
  • 404 Unauthorized : {“Message”:”ResourceGUID not found”}
  • 500 Internal Server Error : {“Message”:”Internal Server Error”}
Updated on March 12, 2019

Was this article helpful?