7.4 Create/Update

POST http://{{rip_ip}}:5438/resources

Adds a file to the resource database of the account when no Resource GUID is provided. If a Resource GUID is provided the specified resource is replaced by the uploaded data.

There are 2 possible methods to update a resource and 1 to create a resource. This is determined by the Content-Type of the request:

  • multipart/form-data : Both data and metadata are supplied. Suitable for Create and Update operations. When no Resource GUID is specified in either the URL or metadata then the operation is considered to be a Create.
  • application/octet-stream : Data to update the content of the resource specified by the ResourceGUID in the URL. Only usable for Update operations or creation of PMMs.

Content-Type: multipart/form-data

Form data 1: required
  • Name: Meta
  • Content-Type: application/json
  • JSON object containing:
    • Guid (guid, optional) : The Resource GUID, when it refers to an existing GUID then the existing resource will be updated with the new information.
    • Name (string) : Name of the resource as shown to the user.
    • Type (string) : the type of the resource. Known resource types: RipConfiguration, PMM, NormalProfile, FotobaMarks, Template, Label, ColorMap, DefectProfile, Grommet, ICCProfile, LayoutTemplate, Library, PlateCurve, ToolMapping, Substrate, Document, Thumbnail, Preview, JobXml, CuttingMarks, NestSettings
    • Meta (object) JSON object containing the metadata about the resource;
      • MediaType (string, optional) : required for “PMM” and “NormalProfile” - the Media tag from the PMM.
      • ProfileGroup (string, optional) : required for “PMM” and “NormalProfile” - the ProfileGroup tag from the PMM
      • Name (string) : required
Form data 2: required
  • Name: Resource
  • Content-Type: application/octet-stream
  • Binary content of the resource
  • Only one file accepted

Content-Type: application/octet-stream

Binary content of the resource

Errors

  • 400 Bad Request : {"Message":"Metadata content incorrect"}
  • 400 Bad Request : {"Message":"ResourceType mismatch"}
  • 404 Not Found : {"Message":"File not found"}
  • 404 Not Found : {"Message":"No Metadata found"}