Import Shotgun persons

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

Close
POST /import/shotgun/persons

Import persons from Shotgun. Send a JSON list of Shotgun rows. A person that exists in Kitsu, with the same Shotgun identifier or the same email, is not changed, but their department is set to the department of the row. Else, the person is created. The role is manager or admin when permission_rule_set.name is Manager or Admin, user otherwise. A row with the email changeme@email.com is skipped. A row that misses a field is skipped. You must be an administrator.

application/json

Body Required

  • id integer

    Shotgun ID of the person

  • firstname string

    First name

  • lastname string

    Last name

  • email string(email)

    Email address

  • login string

    Desktop login

  • sg_status_list string

    Status list

  • permission_rule_set object

    Permission rule set

    Hide permission_rule_set attribute Show permission_rule_set attribute object
    • name string
  • department object

    Department information

    Hide department attribute Show department attribute object
    • name string

Responses

  • 200 application/json

    The created and updated rows

    Hide response attributes Show response attributes object
    • id string(uuid)

      Person unique identifier

    • first_name string

      First name

    • last_name string

      Last name

    • email string(email)

      Email address

    • role string

      User role

    • created_at string(date-time)

      Creation timestamp

    • updated_at string(date-time)

      Update timestamp

  • 400

    The body is not JSON

  • 403

    You are not an administrator

  • 500

    The body is not a list, or a row breaks a database constraint

POST /import/shotgun/persons
curl -X POST "http://api.example.com/import/shotgun/persons" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '[
  {
    "id": 12345,
    "firstname": "John",
    "lastname": "Doe",
    "email": "john.doe@example.com",
    "login": "jdoe",
    "sg_status_list": "act",
    "permission_rule_set": {
      "name": "Manager"
    },
    "department": {
      "name": "Animation"
    }
  }
]'
import requests

url = "http://api.example.com/import/shotgun/persons"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = [
    {
        "id": 12345,
        "firstname": "John",
        "lastname": "Doe",
        "email": "john.doe@example.com",
        "login": "jdoe",
        "sg_status_list": "act",
        "permission_rule_set": {
            "name": "Manager"
        },
        "department": {
            "name": "Animation"
        }
    }
]

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
Request example
[
  {
    "id": 12345,
    "firstname": "John",
    "lastname": "Doe",
    "email": "john.doe@example.com",
    "login": "jdoe",
    "sg_status_list": "act",
    "permission_rule_set": {
      "name": "Manager"
    },
    "department": {
      "name": "Animation"
    }
  }
]
Response examples (200)
[
  {
    "id": "a24a6ea4-ce75-4665-a070-57453082c250",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "role": "manager",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T11:00:00Z"
  }
]