• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums

How to create a private system entity from cloud code?

Scheduled Pinned Locked Moved Cloud Code
global entitiescloud code
1 Posts 1 Posters 261 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Carlos Barcenilla
    wrote on last edited by
    #1

    I want to create a private system entity. I can do it using the portal with "ACL: Private".

    However, from Cloud Code (S2S) I cannot manage to do it:

    This creates a public system entity:
    createSystemEntity(entityType, timeToLive, null, data)

    This raises an error:
    createSystemEntity(entityType, timeToLive, { "other": 0 }, data)

    {
    "reason_code": 40564,
    "status_message": "Processing exception: ACL must be readable",
    "status": 400
    }
    

    This workaround does the job in two API calls:
    createSystemEntity(entityType, timeToLive, { "other": 1 }, data) -> creates a public system entity
    updateSystemEntityAcl(createResult.data.entityId, -1, { other: 0 }) -> makes the entity private

    If I can update the entity to make it private I should be able to create it as private.

    Is there a way to do do it in the creation call?

    Tnx

    1 Reply Last reply
    0

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users