Cloud APIs
LuauExecutionApi
luauExecutionTask

luauExecutionTask

Gets a luau execution task.

Parameters

NameTypeDescription
universeIdIdentifierThe ID of the universe to get the luau execution task from.
placeIdIdentifierThe ID of the place to get the luau execution task from.
version?numberThe optional version number of the place to get the luau execution task for.
sessionIdstringThe ID of the session to get the luau execution task for.
taskIdstringThe ID of the task to get the luau execution task for.
view?"BASIC" | "FULL"If the response should return the script source ("FULL") instead of an empty string.

Example

import { pollMethod } from "openblox/helpers";
 
type Results = number[];
const { data: executedTask } = await pollMethod(
  LuauExecutionApi.luauExecutionTask<Results>({
    universeId: 5795192361,
    placeId: 16866553538,
    version: 26,
    sessionId: "67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
    taskId: "67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
  }),
  async ({ data }, stopPolling) => data.state === "COMPLETE" && stopPolling(),
); 

Example Data

{
  path: "universes/5795192361/places/16866553538/versions/26/luau-execution-sessions/67823af7-1f99-4fc5-b3bb-da7ab3456b5d/tasks/67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
  createTime: 2024-10-01T02:31:46.304Z,
  updateTime: 2024-10-01T02:31:49.959Z,
  user: "45348281",
  state: "COMPLETE",
  script: "",
  output: { results: [7] },
  universeId: "5795192361",
  placeId: "16866553538",
  version: 26,
  sessionId: "67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
  taskId: "67823af7-1f99-4fc5-b3bb-da7ab3456b5d",
} 

Endpoint

GET /cloud/v2/universes/{universeId}/places/{placeId}/luau-execution-session-tasks
GET /cloud/v2/universes/{universeId}/places/{placeId}/versions/{version}/luau-execution-session-tasks
GET /cloud/v2/universes/{universeId}/places/{placeId}/luau-execution-sessions/{sessionId}/tasks
GET /cloud/v2/universes/{universeId}/places/{placeId}/versions/{version}/luau-execution-sessions/{sessionId}/tasks