# Step

This endpoint is used to see the output for a job step.

### Entity fields:

| Path                       | Type   | Description                                                                              |
| -------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| data.type                  | string | Should be "step"                                                                         |
| data.attributes.output     | string | URL with the output for the step                                                         |
| data.attributes.status     | string | Step status(pending or completed)                                                        |
| data.attributes.stepNumber | int    | A job can have several steps, this field is used to identity the order for the execution |

### Example:

```
{
  "data": {
    "type": "step",
    "attributes": {
      "output": "URL with the step output",
      "stepNumber": "Step Number Order",
      "status": "Terraform Provider"
    }
  }
}
```

### Supported Operations

## GET /step/{stepId}

> Returns an instance of type step

```json
{"openapi":"3.0.1","info":{"title":"Elide Service","version":"0.0.1"},"tags":[{"name":"step"}],"servers":[{"url":"/api/v1"}],"paths":{"/step/{stepId}":{"get":{"tags":["step"],"description":"Returns an instance of type step","parameters":[{"name":"fields[step]","in":"query","description":"Selects the set of step fields that should be returned in the result.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["name","output","status","stepNumber","job"]}}},{"name":"include","in":"query","description":"Selects the set of relationships that should be expanded as a compound document in the result.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["job"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/step"},"included":{"uniqueItems":true,"type":"array","description":"Included resources","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"attributes":{"type":"object"},"relationships":{"type":"object"}}}}}}}}}}}}},"components":{"schemas":{"step":{"type":"object","properties":{"type":{"type":"string","description":""},"id":{"type":"string"},"attributes":{"type":"object","properties":{"name":{"type":"string","readOnly":false,"writeOnly":false},"output":{"type":"string","readOnly":false,"writeOnly":false},"status":{"type":"string","readOnly":false,"writeOnly":false,"enum":["pending","waitingApproval","approved","queue","running","completed","noChanges","notExecuted","rejected","cancelled","failed","unknown"]},"stepNumber":{"type":"integer","format":"int32","readOnly":false,"writeOnly":false}}},"relationships":{"type":"object","properties":{"job":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["job"]},"id":{"type":"string"}},"readOnly":false,"writeOnly":false}}}}}}}}}}}
```

{% hint style="info" %}
For a complete list of organization operation please visit the [OpenAPI specification](https://github.com/AzBuilder/terrakube-server/tree/main/openapi-spec)
{% endhint %}
