Sign In
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
  • endpoint_type
    nullable string
    • hostname
    • path

Request

  • region
    nullable string
  • tags
    unknown
  • build
    nullable string
  • build_tags
    nullable unknown
  • runtime
    nullable 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 empty object
        • network.ports[key].routing.host
          nullable empty object
  • resources
    nullable 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].hostname
          nullable string
        • actor.network.ports[key].port
          nullable integer
        • actor.network.ports[key].path
          nullable string
        • actor.network.ports[key].url
          nullable string

          Fully formed connection URL including protocol, hostname, port, and path, if applicable.

        • actor.network.ports[key].routing
          object
          • actor.network.ports[key].routing.guard
            nullable empty object
          • 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
      string

      RFC3339 timestamp

    • actor.started_at
      nullable string

      RFC3339 timestamp

    • actor.destroyed_at
      nullable string

      RFC3339 timestamp

Suggest changes to this page