---
title: "POST /workspace/{workspaceId}/job"
method: POST
path: "/workspace/{workspaceId}/job"
tags: ["job"]
---

# POST /workspace/{workspaceId}/job

`POST /workspace/{workspaceId}/job`

## Request

- Base URL: `https://4014930676-files.gitbook.io/api/v1`
- URL: `https://4014930676-files.gitbook.io/api/v1/workspace/{workspaceId}/job`
- Auth: none declared
- TypeScript: <https://skmtc.dev/terrakube/apis/elide-service/docs/workspace/:workspaceId/job/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an item of type job and adds it to job

## Request body

- object
  - `data` Job
    - `type` string: Create Permissions : (team manage job)
    - `id` string
    - `attributes` object
      - `approvalTeam` string: Read Permissions : (team view job) Update Permissions : (user is a super service)
      - `comments` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `createdBy` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `createdDate` string, date-time: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `output` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `status` 'pending' | 'waitingApproval' | 'approved' | 'queue' | 'running' | 'completed' | 'rejected' | 'cancelled' | 'failed': Read Permissions : (team view job) Update Permissions : (team approve job OR user is a super service)
      - `tcl` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `templateReference` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `terraformPlan` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `updatedBy` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `updatedDate` string, date-time: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
    - `relationships` object
      - `organization` object: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
        - `id` string
        - `type` 'organization'
      - `step` object: Read Permissions : (team view job) Update Permissions : (user is a super service)
        - `id` string
        - `type` 'step'
      - `workspace` object: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
        - `id` string
        - `type` 'workspace'

## Response `201`

Successful response

- object
  - `data` Job
    - `type` string: Create Permissions : (team manage job)
    - `id` string
    - `attributes` object
      - `approvalTeam` string: Read Permissions : (team view job) Update Permissions : (user is a super service)
      - `comments` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `createdBy` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `createdDate` string, date-time: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `output` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `status` 'pending' | 'waitingApproval' | 'approved' | 'queue' | 'running' | 'completed' | 'rejected' | 'cancelled' | 'failed': Read Permissions : (team view job) Update Permissions : (team approve job OR user is a super service)
      - `tcl` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `templateReference` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `terraformPlan` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `updatedBy` string: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
      - `updatedDate` string, date-time: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
    - `relationships` object
      - `organization` object: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
        - `id` string
        - `type` 'organization'
      - `step` object: Read Permissions : (team view job) Update Permissions : (user is a super service)
        - `id` string
        - `type` 'step'
      - `workspace` object: Read Permissions : (team view job) Update Permissions : (team manage job OR user is a super service)
        - `id` string
        - `type` 'workspace'

---

[API](https://skmtc.dev/terrakube/apis/elide-service.md) - [All operations](https://skmtc.dev/terrakube/apis/elide-service/llms.txt) - [OpenAPI document](https://skmtc.dev/terrakube/apis/elide-service/revisions/e7891deb8c02?raw)
