Platform API

actor.create


Description

Create a new dynamic actor.


Code Examples

# Write the request body to body.json before running
curl -X POST -d '@body.json' 'https://api.rivet.gg/actors'



Schema

Request Parameters

  • project
    nullable string query parameter
  • environment
    nullable string query parameter

Request

  • region
    string
  • tags
    unknown
  • build
    nullable string
  • buildTags
    nullable unknown
  • runtime
    object
    • runtime.environment
      nullable map
  • network
    nullable object
    • network.mode
      nullable string
      • bridge
      • host
    • network.ports
      nullable map
      • network.ports[key].protocol
        string
        • http
        • https
        • tcp
        • tcp_tls
        • udp
      • network.ports[key].internal_port
        nullable integer
      • network.ports[key].routing
        nullable object
        • network.ports[key].routing.guard
          nullable object
          • network.ports[key].routing.guard.authorization
            nullable object
            • network.ports[key].routing.guard.authorization.bearer
              nullable string
            • network.ports[key].routing.guard.authorization.query
              nullable object
              • network.ports[key].routing.guard.authorization.query.key
                string
              • network.ports[key].routing.guard.authorization.query.value
                string
        • network.ports[key].routing.host
          nullable empty object
  • resources
    object
    • resources.cpu
      integer

      The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores.

    • resources.memory
      integer

      The amount of memory in megabytes

  • lifecycle
    nullable object
    • lifecycle.kill_timeout
      nullable integer

      The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed.

    • lifecycle.durable
      nullable boolean

      If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully.

Response

  • actor
    object
    • actor.id
      string
    • actor.region
      string
    • actor.tags
      unknown
    • actor.runtime
      object
      • actor.runtime.build
        string
      • actor.runtime.arguments
        nullable array of strings
      • actor.runtime.environment
        nullable map
    • actor.network
      object
      • actor.network.mode
        string
        • bridge
        • host
      • actor.network.ports
        map
        • actor.network.ports[key].protocol
          string
          • http
          • https
          • tcp
          • tcp_tls
          • udp
        • actor.network.ports[key].internal_port
          nullable integer
        • actor.network.ports[key].public_hostname
          nullable string
        • actor.network.ports[key].public_port
          nullable integer
        • actor.network.ports[key].routing
          object
          • actor.network.ports[key].routing.guard
            nullable object
            • actor.network.ports[key].routing.guard.authorization
              nullable object
              • actor.network.ports[key].routing.guard.authorization.bearer
                nullable string
              • actor.network.ports[key].routing.guard.authorization.query
                nullable object
                • actor.network.ports[key].routing.guard.authorization.query.key
                  string
                • actor.network.ports[key].routing.guard.authorization.query.value
                  string
          • actor.network.ports[key].routing.host
            nullable empty object
    • actor.resources
      object
      • actor.resources.cpu
        integer

        The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores.

      • actor.resources.memory
        integer

        The amount of memory in megabytes

    • actor.lifecycle
      object
      • actor.lifecycle.kill_timeout
        nullable integer

        The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed.

      • actor.lifecycle.durable
        nullable boolean

        If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully.

    • actor.created_at
      integer
    • actor.started_at
      nullable integer
    • actor.destroyed_at
      nullable integer