> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.labelstud.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.labelstud.io/_mcp/server.

# ✨ Get a saved interface

GET http://localhost:8000/api/interfaces/{id}/

This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)

Retrieve a saved interface by ID.

Reference: https://api.labelstud.io/api-reference/api-reference/interfaces/get

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl [https://label-studio-host/api/projects](https://label-studio-host/api/projects) -H "Authorization: Token \[your-token]"

## Request

### Path parameters

- `id` (integer, required) — A unique integer value identifying this interface.

## Response

### 200

- `code` (string, required) — JSX source code for the interface screen module
- `compiled` (string, required)
- `created_at` (datetime, required)
- `created_by` (UserSimple, required) — A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations
- `id` (integer, required)
- `is_system` (boolean, required) — HumanSignal-provided system template visible to all organizations
- `projects_count` (integer, required, default: 0)
- `title` (string, required)
- `updated_at` (datetime, required)
- `artifacts` (any, optional) — AI-produced code snapshots for session continuity
- `data_sample` (any, optional) — Sample task data for preview
- `description` (string, optional)
- `input_schema` (any, optional) — JSON Schema declaring expected task data field types for import validation
- `messages` (any, optional) — Chat conversation history
- `metadata` (any, optional, nullable) — Arbitrary metadata for this interface
- `output_schema` (any, optional) — JSON Schema declaring the annotation output fields this interface produces (for Prompter/auto-labeling)
- `scenarios` (string, optional, nullable)
- `versions` (any, optional) — Code version history
- `workspace` (integer, optional, nullable)

## Types

### UserSimple

A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations

- `avatar` (string, required, nullable)
- `id` (integer, required)
- `username` (string, required)
- `email` (string, optional)
- `first_name` (string, optional)
- `last_name` (string, optional)

## Examples

**Response**

```json
{
  "code": "string",
  "compiled": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "created_by": {
    "avatar": "string",
    "id": 1,
    "username": "string",
    "email": "string",
    "first_name": "string",
    "last_name": "string"
  },
  "id": 1,
  "is_system": true,
  "projects_count": 0,
  "title": "string",
  "updated_at": "2024-01-15T09:30:00Z",
  "artifacts": null,
  "data_sample": null,
  "description": "string",
  "input_schema": null,
  "messages": null,
  "metadata": null,
  "output_schema": null,
  "scenarios": "string",
  "versions": null,
  "workspace": 1
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8000/api/interfaces/1/"

headers = {"Authorization": "Token  <api_key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8000/api/interfaces/1/';
const options = {method: 'GET', headers: {Authorization: 'Token  <api_key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8000/api/interfaces/1/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Token  <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8000/api/interfaces/1/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token  <api_key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8000/api/interfaces/1/")
  .header("Authorization", "Token  <api_key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8000/api/interfaces/1/', [
  'headers' => [
    'Authorization' => 'Token  <api_key>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8000/api/interfaces/1/");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token  <api_key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Token  <api_key>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/api/interfaces/1/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```